Add brainpoolP320r1 elliptic curve#14906
Open
sfarestam-iproov wants to merge 1 commit into
Open
Conversation
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.
0b12d33 to
6350b87
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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