Commit 11c2565
committed
Merge #7193: fix: reject identity elements in deserialization and key generation
42b707b fix: reject identity elements in deserialization and key generation (UdjinM6)
Pull request description:
## Issue being fixed or feature implemented
Identity elements are mathematically valid curve points but have no legitimate use in the protocol.
## What was done?
Reject BLS identity elements (point at infinity for G1/G2) at the deserialization boundary in SetBytes(). Also reject zero private keys in MakeNewKey(). Identity elements would not pass further validation anyway, reject them early.
## How Has This Been Tested?
Run tests
## Breaking Changes
n/a
## Checklist:
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e tests
- [ ] I have made corresponding changes to the documentation
- [ ] I have assigned this pull request to a milestone
ACKs for top commit:
PastaPastaPasta:
utACK 42b707b
Tree-SHA512: 047b098fd56b5da07099fde9b03ada7dd4b42698f47cdc84d3c855c11b0122d46a74765fcaaad5d73465abd0d19605445c9e4b6ab6182cf2b318bfe695d2ef0a2 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