Provides functionality related to Edwards-curve Digital Signature Algorithm (EdDSA).
More...
|
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 |
| |
|
| 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...
|
| |
Provides functionality related to Edwards-curve Digital Signature Algorithm (EdDSA).
| #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.
Sign a message using Edwards-curve Digital Signature Algorithm (EdDSA).
- Parameters
-
| [in] | p_context | Pointer 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_key | Pointer to the structure that holds a private key. |
| [in] | p_message | Pointer to the message to sign. |
| [in] | message_size | Number of bytes in p_message. |
| [out] | p_signature | Pointer to the array where EdDSA signature is to be put. Minimum bytes required: NRF_CRYPTO_EDDSA_ED25519_SIGNATURE_SIZE. |
| [in,out] | p_signature_size | Pointer 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_context | Pointer 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_key | Pointer to the structure that holds a public key. |
| [in] | p_message | Pointer to the message to verify. |
| [in] | message_size | Number of bytes in p_message. |
| [in] | p_signature | Pointer to the array that contains EdDSA signature. |
| [in] | signature_size | Number of bytes in p_signature. |
- Returns
- NRF_SUCCESS on success.