As I mentioned in #23 I wanted to make Scalar::to/from_bytes also take/return 57-byte arrays to make it easier to work with EdDSA since RFC 8032 encodes scalars as 57-byte arrays.
I gave it a shot but that makes the X448 implementation akward because RFC 7748 encodes scalar as 56-byte arrays :smiling_face_with_tear:
This is not a huge deal, we can leave this as-is and that should be good enough, but here are some possible ideas:
Leave as is (makes Ed448 awkward, requiring removing a byte when encoding)
Change everything to 57-byte arrays (makes X448 awkard, requring adding a zero byte when decoding)
Add a new method to encode as 57-byte array (to_canonical_bytes()? though to_bytes() is also canonical...)
As I mentioned in #23 I wanted to make
Scalar::to/from_bytes
also take/return 57-byte arrays to make it easier to work with EdDSA since RFC 8032 encodes scalars as 57-byte arrays.I gave it a shot but that makes the X448 implementation akward because RFC 7748 encodes scalar as 56-byte arrays :smiling_face_with_tear:
This is not a huge deal, we can leave this as-is and that should be good enough, but here are some possible ideas:
to_canonical_bytes()
? thoughto_bytes()
is also canonical...)