-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nrf_security: cracen: Add support for ED25519PH
Adding ED25519PH to the supported algorithms for cracen Updated logic for selecting which algorithm to use cracen key_management.c to handle different algorithms using same curve and key_bits Signed-off-by: Dag Erik Gjørvad <[email protected]>
- Loading branch information
Showing
9 changed files
with
590 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
subsys/nrf_security/src/drivers/cracen/sicrypto/include/sicrypto/ed25519ph.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** Ed25519 signature-related operations. | ||
* | ||
* @file | ||
* | ||
* @copyright Copyright (c) 2023 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
#ifndef SICRYPTO_ED25519PH_HEADER_FILE | ||
#define SICRYPTO_ED25519PH_HEADER_FILE | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include "sig.h" | ||
|
||
/** Signature definitions for ED25519PH keys. | ||
* | ||
* The following constraints apply when using Ed25519ph keys: | ||
* | ||
* When generating a signature with si_sig_create_sign(): | ||
* - The task needs a workmem buffer of at least 160 bytes. | ||
* - The message to be signed must be given with a single call to | ||
* si_task_consume(). | ||
* - The buffer for private key material must be in DMA memory. | ||
* - The signature buffer must be in DMA memory. | ||
* | ||
* When verifying a signature with si_sig_create_verify(): | ||
* - The task needs a workmem buffer of at least 64 bytes. | ||
* - The buffer for public key material must be in DMA memory. | ||
* - The signature buffer must be in DMA memory. | ||
* - The task can use partial processing. For the first partial run, the sum of | ||
* the sizes of the provided message chunks plus 64 must be a multiple of | ||
* 128 bytes. For any other partial run, the sum of the sizes of the provided | ||
* message chunks must be a multiple of 128 bytes. | ||
* | ||
* When computing a public key with si_sig_create_pubkey(): | ||
* - The task needs a workmem buffer of at least 64 bytes. | ||
* - The buffer for private key material must be in DMA memory. | ||
*/ | ||
extern const struct si_sig_def *const si_sig_def_ed25519ph; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.