diff options
author | Jeffrey Walton <noloader@gmail.com> | 2021-09-10 08:35:55 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2021-09-10 08:35:55 -0400 |
commit | 6638f245e44d164b6ff29c433d29f4d26af1a274 (patch) | |
tree | 90c7b9ee8949e6b64868f38a7c3eafcbf3a70545 /xed25519.cpp | |
parent | 93c846a705b9c77d6edc96d8691fcebebec589cc (diff) | |
download | cryptopp-git-6638f245e44d164b6ff29c433d29f4d26af1a274.tar.gz |
Add Cryptlib OID for curve25519
Diffstat (limited to 'xed25519.cpp')
-rw-r--r-- | xed25519.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xed25519.cpp b/xed25519.cpp index 5095b5d2..1c1132be 100644 --- a/xed25519.cpp +++ b/xed25519.cpp @@ -152,9 +152,12 @@ void x25519::BERDecodeAndCheckAlgorithmID(BufferedTransformation &bt) // if the OIDs do not match.
OID oid(bt);
+ // 1.3.6.1.4.1.3029.1.5.1/curvey25519 from Cryptlib used by OpenPGP.
+ // https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-rfc4880bis
if (!m_oid.Empty() && m_oid != oid)
BERDecodeError(); // Only accept user specified OID
- else if (oid == ASN1::curve25519() || oid == ASN1::X25519())
+ else if (oid == ASN1::curve25519() || oid == ASN1::X25519() ||
+ oid == OID(1)+3+6+1+4+1+3029+1+5)
m_oid = oid; // Accept any of the x25519 OIDs
else
BERDecodeError();
|