mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-26 11:47:13 +09:00
This adds a new API crypto_sign_publickey, which works similarly to the existing crypto_sign_keypair() API, but supports a 32-byte user-specified seed value (k). This API is necessary for implementing Ed25519 test vectors, for example, since we need to pass in a known seed to ensure we're computing the public key correctly. The name and implementation are largely borrowed from Brian Warner's python-ed25519 library. See: https://github.com/warner/python-ed25519/blob/d42d4b7049baf323e7113359f4f6bf88703543bc/src/ed25519.c#L21 That said, perhaps a different name would be more descriptive, since it still returns a keypair, not just the public key? Or perhaps that's needless bikeshedding since this name is already in use.