123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- #ifndef NRF_CRYPTO_EDDSA_H__
- #define NRF_CRYPTO_EDDSA_H__
- #include <stdint.h>
- #include <stddef.h>
- #include "nrf_crypto_error.h"
- #include "nrf_crypto_ecc.h"
- #include "nrf_crypto_eddsa_shared.h"
- #include "nrf_crypto_eddsa_backend.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define NRF_CRYPTO_EDDSA_ED25519_SIGNATURE_SIZE (2 * 256 / 8)
- typedef nrf_crypto_backend_ed25519_sign_context_t nrf_crypto_eddsa_sign_context_t;
- typedef nrf_crypto_backend_ed25519_verify_context_t nrf_crypto_eddsa_verify_context_t;
- ret_code_t nrf_crypto_eddsa_sign(nrf_crypto_eddsa_sign_context_t * p_context,
- nrf_crypto_ecc_private_key_t const * p_private_key,
- uint8_t const * p_message,
- size_t message_size,
- uint8_t * p_signature,
- size_t * p_signature_size);
- ret_code_t nrf_crypto_eddsa_verify(nrf_crypto_eddsa_verify_context_t * p_context,
- nrf_crypto_ecc_public_key_t const * p_public_key,
- uint8_t const * p_message,
- size_t message_size,
- uint8_t const * p_signature,
- size_t signature_size);
- #ifdef __cplusplus
- }
- #endif
- #endif
|