Commit 42b707b
fix: reject identity elements in deserialization and key generation
Reject BLS identity elements (point at infinity for G1/G2) at the
deserialization boundary in SetBytes(). Also reject zero private keys
in MakeNewKey(), though these would not pass further validation.
Identity elements are mathematically valid curve points but have no
legitimate use in the protocol.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 2e6a225 commit 42b707b
2 files changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
114 | 119 | | |
115 | 120 | | |
116 | 121 | | |
| |||
0 commit comments