Skip to content

EdDSA key handling with OTP 27.1.3 #177

@neelima32

Description

@neelima32

public_key:pem_entry_decode decodes an EdDSA public key with this change.

Key = <<"-----BEGIN PUBLIC KEY-----
   MCowBQYDK2VwAyEAa8MfbSJ4B2UTZBOwtZ5LvT2Zx5O/FnlzQZ9PnlG6kcI=
   -----END PUBLIC KEY-----">>.
<<"-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAa8MfbSJ4B2UTZBOwtZ5LvT2Zx5O/FnlzQZ9PnlG6kcI=\n-----END PUBLIC KEY-----">>
5> [Decoded] = public_key:pem_decode(Key).
[{'SubjectPublicKeyInfo',<<48,42,48,5,6,3,43,101,112,3,33,
                           0,107,195,31,109,34,120,7,101,
                           19,100,19,176,181,158,...>>,
                         not_encrypted}]
7> public_key:pem_entry_decode(Decoded).
{{'ECPoint',<<107,195,31,109,34,120,7,101,19,100,19,176,
              181,158,75,189,61,153,199,147,191,22,121,
              115,65,159,...>>},
 {namedCurve,{1,3,101,112}}}

I'm not sure erlang-jose handles the EdDSA decoded entries correctly based on this ticket. Previously, the public_key:pem_entry_decode failed for Ed25519 and Ed448 keys. This was handled differently.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions