- Notifications
You must be signed in to change notification settings - Fork507
Commit441b742
ec: validate that a point before deriving keys
This update checks to make sure that the public key passed in toECDH is a point that actually exists on the curve. This isimportant to prevent a twist attack that can be used to revealthe private key of a party in an ECDH operation over a number ofoccurances.For more details on the attack see this blog post:https://github.com/christianlundkvist/blog/blob/master/2020_05_26_secp256k1_twist_attacks/secp256k1_twist_attacks.mdCVE:CVE-2020-284981 parente71b2d9 commit441b742
2 files changed
+17
-0
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
100 | 100 |
| |
101 | 101 |
| |
102 | 102 |
| |
| 103 | + | |
| 104 | + | |
| 105 | + | |
103 | 106 |
| |
104 | 107 |
| |
105 | 108 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + |
0 commit comments
Comments
(0)