123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- #ifndef OCRYPTO_ED25519_H
- #define OCRYPTO_ED25519_H
- #include <stddef.h>
- #include <stdint.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define ocrypto_ed25519_PUBLIC_KEY_BYTES (32)
- #define ocrypto_ed25519_SECRET_KEY_BYTES (32)
- #define ocrypto_ed25519_BYTES (64)
- void ocrypto_ed25519_public_key(uint8_t pk[ocrypto_ed25519_PUBLIC_KEY_BYTES],
- const uint8_t sk[ocrypto_ed25519_SECRET_KEY_BYTES]);
- void ocrypto_ed25519_sign(uint8_t sig[ocrypto_ed25519_BYTES],
- const uint8_t *m, size_t m_len,
- const uint8_t sk[ocrypto_ed25519_SECRET_KEY_BYTES],
- const uint8_t pk[ocrypto_ed25519_PUBLIC_KEY_BYTES]);
- int ocrypto_ed25519_verify(const uint8_t sig[ocrypto_ed25519_BYTES],
- const uint8_t *m, size_t m_len,
- const uint8_t pk[ocrypto_ed25519_PUBLIC_KEY_BYTES]);
- #ifdef __cplusplus
- }
- #endif
- #endif
|