You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd also appreciate some assistance in tracking down whether we can load a bare key or if we need to wrap the key in ASN.1 and use d2i_PrivateKey_bio/d2i_PUBKEY_bio to load them.
Re: just bytes vs ASN.1: I'm fairly sure that all of the Python x25519 libraries I'm aware of (which is a pretty small sample size -- I only know of 3! -- and two of them wrap AGL's Donna 25519) expose some variation on "raw bytes" (or perhaps ascii-armored ones). So, exposing a raw-bytes de/serialization would be useful, at least to support drop-in compatibility with preexisting libraries (I'm biased though; I personally have a use case for this).
Okay, public key serialization to bytes is working and I think there's a path to loading a public key via EVP_PKEY_type and EVP_PKEY_set1_tls_encodedpoint, but I have been unable to figure out how to load a private key (which we need for testing purposes) except via PKCS8.
Activity
reaperhulk commentedon Jun 5, 2017
The plot thickens a bit. OpenSSL is using https://tools.ietf.org/html/draft-ietf-curdle-pkix-03#section-3 for serialization. Do we want to just have the bytes or do we want to support this model? If we want the bytes we'll have to parse the ASN.1 and extract the bare key.
reaperhulk commentedon Jun 5, 2017
I'd also appreciate some assistance in tracking down whether we can load a bare key or if we need to wrap the key in ASN.1 and use
d2i_PrivateKey_bio/d2i_PUBKEY_bioto load them.reaperhulk commentedon Jun 5, 2017
For reference, here's some early work: master...reaperhulk:x25519
Badg commentedon Jun 5, 2017
Re: just bytes vs ASN.1: I'm fairly sure that all of the Python x25519 libraries I'm aware of (which is a pretty small sample size -- I only know of 3! -- and two of them wrap AGL's Donna 25519) expose some variation on "raw bytes" (or perhaps ascii-armored ones). So, exposing a raw-bytes de/serialization would be useful, at least to support drop-in compatibility with preexisting libraries (I'm biased though; I personally have a use case for this).
reaperhulk commentedon Jun 6, 2017
There was some back channel conversation today and the decision is to move forward with a raw bytes API.
reaperhulk commentedon Jun 6, 2017
Okay, public key serialization to bytes is working and I think there's a path to loading a public key via
EVP_PKEY_typeandEVP_PKEY_set1_tls_encodedpoint, but I have been unable to figure out how to load a private key (which we need for testing purposes) except via PKCS8.evilaliv3 commentedon Aug 28, 2018
@alex: is there a reason why serialization functions for the private key are missing for X25519?