Commit a135fe1
Forbid setting EC public key to point at infinity
The point at infinity is not a valid EC public key. We already refuse to
parse it. This CL makes it forbidden to set an EC public key to a
manually-constructed point at infinity.
This change will allow callers to assume that ECDH is infallible
given a valid peer public key.
Update-Note: EC_KEY_set_public_key will now return an error if
configuring the point at infinity as a public key. This does not impact
parsing, which already rejected such a point, and the resulting key
would have failed all operations already.
Change-Id: I202307a510543f4305b1cb46094d2c83174047af
Fixed: 438493754
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/81267
Commit-Queue: Lily Chen <chlily@google.com>
Reviewed-by: David Benjamin <davidben@google.com>1 parent fa47b1d commit a135fe1
File tree
3 files changed
+17
-1
lines changed- crypto/fipsmodule/ec
- include/openssl
3 files changed
+17
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
216 | 221 | | |
217 | 222 | | |
218 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
456 | 467 | | |
457 | 468 | | |
458 | 469 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
0 commit comments