The current API emulates the NIST code to follow along with the standardisation process. Now that is all done we can do a proper cleanup to make it more idiomatic along with general quality of life improvements. A non-comprehensive list of to-do's:
[ ] Keypair with no visible fields
[ ] Remove redundant public key field from Keypair
[x] Runtime public key function to extract from secret key
[x] Generate new Keypair struct from existing private key
[ ] Keypair - impl Hash - For public key only, non-cryptographic hashes often used
[ ] Keypair - impl Debug - For public key only, elide secret key from any possible logging
[ ] Keypair - impl PartialEq - For public key only, make note in docs that it is not constant time
[ ] Keypair - impl Eq
[ ] Keypair - impl Zeroize - will require an alternative api using Pin/ Box along with documentation. Needs a locally instantiated SecretBuffer by the end user to prevent return value optimisations copying everything willynilly.
[ ] Replace type alias for SharedSecret with a concrete type, implement the same traits as for Keypair above.
Related to #59, it's preferable to get this all wrapped up into one release.
The current API emulates the NIST code to follow along with the standardisation process. Now that is all done we can do a proper cleanup to make it more idiomatic along with general quality of life improvements. A non-comprehensive list of to-do's:
Keypair
with no visible fieldsKeypair
Keypair
struct from existing private keyKeypair
struct from 64 byte seedimpl AsRef<PublicKey>
/impl AsRef<SecretKey>
Keypair
-impl Hash
- For public key only, non-cryptographic hashes often usedKeypair
-impl Debug
- For public key only, elide secret key from any possible loggingKeypair
-impl PartialEq
- For public key only, make note in docs that it is not constant timeKeypair
-impl Eq
Keypair
-impl Zeroize
- will require an alternative api usingPin
/Box
along with documentation. Needs a locally instantiatedSecretBuffer
by the end user to prevent return value optimisations copying everything willynilly.SharedSecret
with a concrete type, implement the same traits as forKeypair
above.Related to #59, it's preferable to get this all wrapped up into one release.