nRF5 SDK v17.1.0
Macros | Typedefs | Functions
Edwards-curve Digital Signature Algorithm (EdDSA)

Provides functionality related to Edwards-curve Digital Signature Algorithm (EdDSA). More...

Macros

#define NRF_CRYPTO_EDDSA_ED25519_SIGNATURE_SIZE   (2 * 256 / 8)
 Size of the EdDSA Ed25519 signature. More...
 

Typedefs

typedef
nrf_crypto_backend_ed25519_sign_context_t 
nrf_crypto_eddsa_sign_context_t
 Context used to store temporary data during the verification with EdDSA Ed25519.
 
typedef
nrf_crypto_backend_ed25519_verify_context_t 
nrf_crypto_eddsa_verify_context_t
 

Functions

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)
 Sign a message using Edwards-curve Digital Signature Algorithm (EdDSA). More...
 
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)
 Verify a message using Edwards-curve Digital Signature Algorithm (EdDSA). More...
 

Detailed Description

Provides functionality related to Edwards-curve Digital Signature Algorithm (EdDSA).

Macro Definition Documentation

#define NRF_CRYPTO_EDDSA_ED25519_SIGNATURE_SIZE   (2 * 256 / 8)

Size of the EdDSA Ed25519 signature.

<Context used to store temporary data during the signing with EdDSA Ed25519.

Function Documentation

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 
)

Sign a message using Edwards-curve Digital Signature Algorithm (EdDSA).

Parameters
[in]p_contextPointer to the temporary structure that holds context information. If it is NULL, the required data is allocated with NRF_CRYPTO_ALLOC and freed at the end of the function.
[in]p_private_keyPointer to the structure that holds a private key.
[in]p_messagePointer to the message to sign.
[in]message_sizeNumber of bytes in p_message.
[out]p_signaturePointer to the array where EdDSA signature is to be put. Minimum bytes required: NRF_CRYPTO_EDDSA_ED25519_SIGNATURE_SIZE.
[in,out]p_signature_sizePointer to the maximum number of bytes that p_signature buffer can hold on input, and to the actual number of bytes used by the data on output (NRF_CRYPTO_EDDSA_ED25519_SIGNATURE_SIZE).
Returns
NRF_SUCCESS on success.
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 
)

Verify a message using Edwards-curve Digital Signature Algorithm (EdDSA).

Parameters
[in]p_contextPointer to the temporary structure that holds context information. If it is NULL, necessary data is allocated with NRF_CRYPTO_ALLOC and freed at the end of the function.
[in]p_public_keyPointer to the structure that holds a public key.
[in]p_messagePointer to the message to verify.
[in]message_sizeNumber of bytes in p_message.
[in]p_signaturePointer to the array that contains EdDSA signature.
[in]signature_sizeNumber of bytes in p_signature.
Returns
NRF_SUCCESS on success.

Documentation feedback | Developer Zone | Subscribe | Updated