123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- #ifndef OBERON_BACKEND_ECDSA_H__
- #define OBERON_BACKEND_ECDSA_H__
- #include "sdk_config.h"
- #include "nordic_common.h"
- #if NRF_MODULE_ENABLED(NRF_CRYPTO) && NRF_MODULE_ENABLED(NRF_CRYPTO_BACKEND_OBERON)
- #include <stdint.h>
- #include "nrf_crypto_ecc_shared.h"
- #include "nrf_crypto_ecdsa_shared.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- #if NRF_MODULE_ENABLED(NRF_CRYPTO_BACKEND_OBERON_ECC_SECP256R1)
- ret_code_t nrf_crypto_backend_secp256r1_sign(
- void * p_context,
- void const * p_private_key,
- uint8_t const * p_data,
- size_t data_size,
- uint8_t * p_signature);
- ret_code_t nrf_crypto_backend_secp256r1_verify(
- void * p_context,
- void const * p_public_key,
- uint8_t const * p_data,
- size_t data_size,
- uint8_t const * p_signature);
- #define NRF_CRYPTO_BACKEND_SECP256R1_SIGN_CONTEXT_SIZE 0
- #define NRF_CRYPTO_BACKEND_SECP256R1_VERIFY_CONTEXT_SIZE 0
- typedef uint32_t nrf_crypto_backend_secp256r1_sign_context_t;
- typedef uint32_t nrf_crypto_backend_secp256r1_verify_context_t;
- #endif
- #if NRF_MODULE_ENABLED(NRF_CRYPTO_BACKEND_OBERON_ECC_CURVE25519)
- #define NRF_CRYPTO_BACKEND_CURVE25519_SIGN_CONTEXT_SIZE 0
- #define NRF_CRYPTO_BACKEND_CURVE25519_VERIFY_CONTEXT_SIZE 0
- typedef uint32_t nrf_crypto_backend_curve25519_sign_context_t;
- typedef uint32_t nrf_crypto_backend_curve25519_verify_context_t;
- #define nrf_crypto_backend_curve25519_sign NULL
- #define nrf_crypto_backend_curve25519_verify NULL
- #endif
- #ifdef __cplusplus
- }
- #endif
- #endif
- #endif
|