Add brainpoolP320r1 elliptic curve - #14906
Conversation
0b12d33 to
6350b87
Compare
|
This PR has the same concern as #14905, so it will be dependent on the aws-lc outcome. |
|
The aws-lc dependency is resolved — Brainpool curve support (all five: P224, P256, P320, P384, P512) has been merged into aws-lc: aws/aws-lc#3286 brainpoolP320r1 is now fully supported in aws-lc (EC group, ECDSA, ECDH), so the Ready for review whenever convenient. |
|
Great, I think we’ll wait for an aws-lc release, lift the gates, then these PRs can be rebased. |
|
aws-lc v5.6.0 was released today with Brainpool support: https://github.com/aws/aws-lc/releases/tag/v5.6.0 Ready to rebase and remove the |
Add brainpoolP320r1 (320-bit, OID 1.3.36.3.3.2.8.1.1.9) from RFC 5639. This curve is fully supported by OpenSSL (NID 929) and used by the Netherlands for DG15 Active Authentication keys in ePassport documents per ICAO 9303. brainpoolP224r1 is deferred as it requires a NID addition to the openssl Rust crate first.
6350b87 to
4258784
Compare
|
Rebased onto current main in anticipation of the aws-lc gates being lifted. |
Summary
Add brainpoolP320r1 as a named elliptic curve. It is defined in RFC 5639 and fully supported by OpenSSL (NID 929).
Motivation
ICAO Doc 9303 (the international standard for machine-readable travel documents / ePassports), Part 12, Section 4.1.6.3 recommends BSI TR-03111 for elliptic curve selection. TR-03111 includes brainpoolP320r1 as an approved curve for ePassport use.
This curve is deployed in production:
Addressing #4767
I'm aware that a generic request to add Brainpool curves was declined in #4767 as lacking a concrete use case. This request is different: it is driven by a specific international standard (ICAO 9303), backed by real-world data from production ePassport PKI deployments.
Security
brainpoolP320r1 provides 160-bit security, between secp256r1 and secp384r1. ICAO considers it adequate for ePassport documents with 10-year validity.
What this PR does
BrainpoolP320R1curve class to the Python API (ec.py)oid.rs(1.3.36.3.3.2.8.1.1.9)ec.rs), gated behind#[cfg(not(any(CRYPTOGRAPHY_IS_BORINGSSL, CRYPTOGRAPHY_IS_AWSLC)))]_CURVE_TYPES,_OID_TO_CURVE, andEllipticCurveOIDWhat this PR does NOT do
opensslRust crate first)References