Skip to content

Commit 8144355

Browse files
tomi-fontnordicjm
authored andcommitted
nrf_security: drivers: cracen: fix Ed25519 and Ed448 spelling
Capitalize them properly. Signed-off-by: Tomi Fontanilles <[email protected]>
1 parent 2029018 commit 8144355

File tree

9 files changed

+55
-55
lines changed

9 files changed

+55
-55
lines changed

subsys/nrf_security/src/drivers/cracen/cracenpsa/src/sign.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ static psa_status_t cracen_signature_ecc_sign(int message, const psa_key_attribu
339339
sign.r = (char *)signature;
340340
sign.s = (char *)signature + *signature_length / 2;
341341

342-
/* ED25519PH requires prehashing and supports sign and verify message
342+
/* Ed25519ph requires prehashing and supports sign and verify message
343343
* the message is therefore hashed here before si_sig_verify is called
344344
*/
345345
if (alg == PSA_ALG_ED25519PH && message) {
@@ -419,7 +419,7 @@ static psa_status_t cracen_signature_ecc_verify(int message, const psa_key_attri
419419
sign.sz = signature_length;
420420
sign.r = (char *)signature;
421421
sign.s = (char *)signature + signature_length / 2;
422-
/* ED25519PH requires prehashing and supports sign and verify message
422+
/* Ed25519ph requires prehashing and supports sign and verify message
423423
* the message is therefore hashed here before si_sig_verify is called
424424
*/
425425
if (alg == PSA_ALG_ED25519PH && message) {

subsys/nrf_security/src/drivers/cracen/sicrypto/include/sicrypto/ed25519ph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extern "C" {
1616

1717
#include "sig.h"
1818

19-
/** Signature definitions for ED25519PH keys.
19+
/** Signature definitions for Ed25519ph keys.
2020
*
2121
* The following constraints apply when using Ed25519ph keys:
2222
*

subsys/nrf_security/src/drivers/cracen/sicrypto/src/ed25519ph.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
/* This is the ASCII string with the
4949
* PHflag 1 and context size 0 appended as defined in:
5050
* https://datatracker.ietf.org/doc/html/rfc8032.html#section-2
51-
* used for domain seperation between ED25519 and ED25519PH
51+
* used for domain seperation between Ed25519 and Ed25519ph
5252
*/
5353
const char dom2[34] = {
5454
0x53, 0x69, 0x67, 0x45, 0x64, 0x32, 0x35,

subsys/nrf_security/src/drivers/cracen/silexpk/include/silexpk/cmddefs/edwards.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ struct sx_pk_cmd_def;
2424
*
2525
* All operands for this command use a little endian representation.
2626
* Operands should be decoded and clamped as defined in specifications
27-
* for ED25519 or ED448.
27+
* for Ed25519 or Ed448.
2828
*/
2929
extern const struct sx_pk_cmd_def *const SX_PK_CMD_EDDSA_PTMUL;
3030

3131
/** EdDSA 2nd part of signature operation
3232
*
3333
* All operands for this command use a little endian representation.
3434
* Operands should be decoded and clamped as defined in specifications
35-
* for ED25519 or ED448.
35+
* for Ed25519 or Ed448.
3636
*/
3737
extern const struct sx_pk_cmd_def *const SX_PK_CMD_EDDSA_SIGN;
3838

3939
/** EdDSA signature verification operation
4040
*
4141
* All operands for this command use a little endian representation.
4242
* Operands should be decoded and clamped as defined in specifications
43-
* for ED25519 or ED448.
43+
* for Ed25519 or Ed448.
4444
*/
4545
extern const struct sx_pk_cmd_def *const SX_PK_CMD_EDDSA_VER;
4646

subsys/nrf_security/src/drivers/cracen/silexpk/include/silexpk/ed25519.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ extern "C" {
1313

1414
#include "core.h"
1515

16-
/** Size in bytes of a reduced value in ED25519 operations */
16+
/** Size in bytes of a reduced value in Ed25519 operations */
1717
#define SX_ED25519_SZ 32
1818

19-
/** Size in bytes of an encoded ED25519 point */
19+
/** Size in bytes of an encoded Ed25519 point */
2020
#define SX_ED25519_PT_SZ 32
2121

22-
/** Size in bytes of a digest in ED25519 operations */
22+
/** Size in bytes of a digest in Ed25519 operations */
2323
#define SX_ED25519_DGST_SZ (32 * 2)
2424

2525
/**
@@ -28,25 +28,25 @@ extern "C" {
2828
* @{
2929
*/
3030

31-
/** An encoded ED25519 point */
31+
/** An encoded Ed25519 point */
3232
struct sx_ed25519_pt {
33-
/** Bytes array representing encoded point for ED25519 **/
33+
/** Bytes array representing encoded point for Ed25519 **/
3434
char encoded[SX_ED25519_PT_SZ];
3535
};
3636

37-
/** A ED25519 scalar value */
37+
/** A Ed25519 scalar value */
3838
struct sx_ed25519_v {
39-
/** Bytes array representing scalar for ED25519 **/
39+
/** Bytes array representing scalar for Ed25519 **/
4040
char bytes[SX_ED25519_SZ];
4141
};
4242

43-
/** A hash digest used in the ED25519 protocol */
43+
/** A hash digest used in the Ed25519 protocol */
4444
struct sx_ed25519_dgst {
4545
/** Bytes array of hash digest **/
4646
char bytes[SX_ED25519_DGST_SZ];
4747
};
4848

49-
/** EdDSA point multiplication (ED25519)
49+
/** EdDSA point multiplication (Ed25519)
5050
*
5151
* Compute R = r * G, where r is a scalar which can be up to twice the
5252
* size of the other operands. G is the generator point for the curve.
@@ -75,7 +75,7 @@ struct sx_ed25519_dgst {
7575
*/
7676
int sx_ed25519_ptmult(const struct sx_ed25519_dgst *r, struct sx_ed25519_pt *pt);
7777

78-
/** Asynchronous EdDSA point multiplication (ED25519)
78+
/** Asynchronous EdDSA point multiplication (Ed25519)
7979
*
8080
* Start an EdDSA point multiplication on the accelerator
8181
* and return immediately.
@@ -91,7 +91,7 @@ int sx_ed25519_ptmult(const struct sx_ed25519_dgst *r, struct sx_ed25519_pt *pt)
9191
*/
9292
struct sx_pk_acq_req sx_async_ed25519_ptmult_go(const struct sx_ed25519_dgst *r);
9393

94-
/** Collect the result of asynchronous EdDSA point multiplication (ED25519)
94+
/** Collect the result of asynchronous EdDSA point multiplication (Ed25519)
9595
*
9696
* Get the output operands of the EdDSA point multiplication
9797
* and release the reserved resources.
@@ -107,7 +107,7 @@ struct sx_pk_acq_req sx_async_ed25519_ptmult_go(const struct sx_ed25519_dgst *r)
107107
*/
108108
void sx_async_ed25519_ptmult_end(sx_pk_req *req, struct sx_ed25519_pt *pt);
109109

110-
/** Compute signature scalar s for pure EdDSA (ED25519).
110+
/** Compute signature scalar s for pure EdDSA (Ed25519).
111111
*
112112
* This represents the second step in computing an EdDSA signature.
113113
*
@@ -136,9 +136,9 @@ void sx_async_ed25519_ptmult_end(sx_pk_req *req, struct sx_ed25519_pt *pt);
136136
int sx_ed25519_sign(const struct sx_ed25519_dgst *k, const struct sx_ed25519_dgst *r,
137137
const struct sx_ed25519_v *s, struct sx_ed25519_v *sig_s);
138138

139-
/** Asynchronous second part signature generation for pure EdDSA (ED25519).
139+
/** Asynchronous second part signature generation for pure EdDSA (Ed25519).
140140
*
141-
* Start an ED25519 signature generation on the accelerator
141+
* Start an Ed25519 signature generation on the accelerator
142142
* and return immediately.
143143
*
144144
* @remark When the operation finishes on the accelerator,
@@ -157,23 +157,23 @@ struct sx_pk_acq_req sx_pk_async_ed25519_sign_go(const struct sx_ed25519_dgst *k
157157
const struct sx_ed25519_dgst *r,
158158
const struct sx_ed25519_v *s);
159159

160-
/** Collect the result of asynchronous computation of ED25519 signature scalar
160+
/** Collect the result of asynchronous computation of Ed25519 signature scalar
161161
*
162-
* Get the output operands of the ED25519 signature generation
162+
* Get the output operands of the Ed25519 signature generation
163163
* and release the reserved resources.
164164
*
165165
* @pre The operation on the accelerator must be finished before
166166
* calling this function.
167167
*
168168
* @param[in,out] req The previously acquired acceleration
169169
* request for this operation
170-
* @param[out] sig_s Second part of the ED25519 signature
170+
* @param[out] sig_s Second part of the Ed25519 signature
171171
*
172172
* @see sx_pk_async_ed25519_sign_go() and sx_ed25519_sign()
173173
*/
174174
void sx_async_ed25519_sign_end(sx_pk_req *req, struct sx_ed25519_v *sig_s);
175175

176-
/** Verify an EdDSA signature (ED25519)
176+
/** Verify an EdDSA signature (Ed25519)
177177
*
178178
* It checks if sig_s * G - k * A matches R.
179179
*
@@ -205,9 +205,9 @@ void sx_async_ed25519_sign_end(sx_pk_req *req, struct sx_ed25519_v *sig_s);
205205
int sx_ed25519_verify(const struct sx_ed25519_dgst *k, const struct sx_ed25519_pt *a,
206206
const struct sx_ed25519_v *sig_s, const struct sx_ed25519_pt *r);
207207

208-
/** Asynchronous (non-blocking) verify an ED25519 signature.
208+
/** Asynchronous (non-blocking) verify an Ed25519 signature.
209209
*
210-
* Start an ED25519 signature generation on the accelerator
210+
* Start an Ed25519 signature generation on the accelerator
211211
* and return immediately.
212212
*
213213
* @remark When the operation finishes on the accelerator,

subsys/nrf_security/src/drivers/cracen/silexpk/include/silexpk/ed448.h

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** Simpler functions for base ED448 operations
1+
/** Simpler functions for base Ed448 operations
22
*
33
* @file
44
*/
@@ -17,13 +17,13 @@ extern "C" {
1717

1818
#include "core.h"
1919

20-
/** Size in bytes of a reduced value in ED448 operations */
20+
/** Size in bytes of a reduced value in Ed448 operations */
2121
#define SX_ED448_SZ 57
2222

23-
/** Size in bytes of an encoded ED448 point */
23+
/** Size in bytes of an encoded Ed448 point */
2424
#define SX_ED448_PT_SZ 57
2525

26-
/** Size in bytes of a digest in ED448 operations */
26+
/** Size in bytes of a digest in Ed448 operations */
2727
#define SX_ED448_DGST_SZ (57 * 2)
2828

2929
/**
@@ -32,25 +32,25 @@ extern "C" {
3232
* @{
3333
*/
3434

35-
/** An encoded ED448 point */
35+
/** An encoded Ed448 point */
3636
struct sx_ed448_pt {
37-
/** Bytes array representing encoded point for ED448 **/
37+
/** Bytes array representing encoded point for Ed448 **/
3838
char encoded[SX_ED448_PT_SZ];
3939
};
4040

41-
/** A ED448 scalar value */
41+
/** A Ed448 scalar value */
4242
struct sx_ed448_v {
43-
/** Bytes array representing scalar for ED448 **/
43+
/** Bytes array representing scalar for Ed448 **/
4444
char bytes[SX_ED448_SZ];
4545
};
4646

47-
/** A hash digest used in the ED448 protocol */
47+
/** A hash digest used in the Ed448 protocol */
4848
struct sx_ed448_dgst {
4949
/** Bytes array of hash digest **/
5050
char bytes[SX_ED448_DGST_SZ];
5151
};
5252

53-
/** EdDSA point multiplication (ED448)
53+
/** EdDSA point multiplication (Ed448)
5454
*
5555
* Compute R = r * G, where r is a scalar which can be up to twice the
5656
* size of the other operands. G is the generator point for the curve.
@@ -79,7 +79,7 @@ struct sx_ed448_dgst {
7979
*/
8080
int sx_ed448_ptmult(const struct sx_ed448_dgst *r, struct sx_ed448_pt *pt);
8181

82-
/** Asynchronous EdDSA point multiplication (ED448)
82+
/** Asynchronous EdDSA point multiplication (Ed448)
8383
*
8484
* Start an EdDSA point multiplication on the accelerator
8585
* and return immediately.
@@ -95,7 +95,7 @@ int sx_ed448_ptmult(const struct sx_ed448_dgst *r, struct sx_ed448_pt *pt);
9595
*/
9696
struct sx_pk_acq_req sx_async_ed448_ptmult_go(const struct sx_ed448_dgst *r);
9797

98-
/** Collect the result of asynchronous EdDSA point multiplication (ED448)
98+
/** Collect the result of asynchronous EdDSA point multiplication (Ed448)
9999
*
100100
* Get the output operands of the EdDSA point multiplication
101101
* and release the reserved resources.
@@ -111,7 +111,7 @@ struct sx_pk_acq_req sx_async_ed448_ptmult_go(const struct sx_ed448_dgst *r);
111111
*/
112112
void sx_async_ed448_ptmult_end(sx_pk_req *req, struct sx_ed448_pt *pt);
113113

114-
/** Compute signature scalar s for pure EdDSA (ED448).
114+
/** Compute signature scalar s for pure EdDSA (Ed448).
115115
*
116116
* This represents the second step in computing an EdDSA signature.
117117
*
@@ -140,9 +140,9 @@ void sx_async_ed448_ptmult_end(sx_pk_req *req, struct sx_ed448_pt *pt);
140140
int sx_ed448_sign(const struct sx_ed448_dgst *k, const struct sx_ed448_dgst *r,
141141
const struct sx_ed448_v *s, struct sx_ed448_v *sig_s);
142142

143-
/** Asynchronous second part signature generation for pure EdDSA (ED448).
143+
/** Asynchronous second part signature generation for pure EdDSA (Ed448).
144144
*
145-
* Start an ED448 signature generation on the accelerator
145+
* Start an Ed448 signature generation on the accelerator
146146
* and return immediately.
147147
*
148148
* @remark When the operation finishes on the accelerator,
@@ -161,23 +161,23 @@ struct sx_pk_acq_req sx_pk_async_ed448_sign_go(const struct sx_ed448_dgst *k,
161161
const struct sx_ed448_dgst *r,
162162
const struct sx_ed448_v *s);
163163

164-
/** Collect the result of asynchronous computation of ED448 signature scalar
164+
/** Collect the result of asynchronous computation of Ed448 signature scalar
165165
*
166-
* Get the output operands of the ED448 signature generation
166+
* Get the output operands of the Ed448 signature generation
167167
* and release the reserved resources.
168168
*
169169
* @pre The operation on the accelerator must be finished before
170170
* calling this function.
171171
*
172172
* @param[in,out] req The previously acquired acceleration
173173
* request for this operation
174-
* @param[out] sig_s Second part of the ED448 signature
174+
* @param[out] sig_s Second part of the Ed448 signature
175175
*
176176
* @see sx_pk_async_ed448_sign_go() and sx_ed448_sign()
177177
*/
178178
void sx_async_ed448_sign_end(sx_pk_req *req, struct sx_ed448_v *sig_s);
179179

180-
/** Verify an EdDSA signature (ED448)
180+
/** Verify an EdDSA signature (Ed448)
181181
*
182182
* It checks if sig_s * G - k * A matches R.
183183
*
@@ -209,9 +209,9 @@ void sx_async_ed448_sign_end(sx_pk_req *req, struct sx_ed448_v *sig_s);
209209
int sx_ed448_verify(const struct sx_ed448_dgst *k, const struct sx_ed448_pt *a,
210210
const struct sx_ed448_v *sig_s, const struct sx_ed448_pt *r);
211211

212-
/** Asynchronous (non-blocking) verify an ED448 signature.
212+
/** Asynchronous (non-blocking) verify an Ed448 signature.
213213
*
214-
* Start an ED448 signature generation on the accelerator
214+
* Start an Ed448 signature generation on the accelerator
215215
* and return immediately.
216216
*
217217
* @remark When the operation finishes on the accelerator,

subsys/nrf_security/src/drivers/cracen/silexpk/src/ed25519.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
#include <silexpk/cmddefs/edwards.h>
1515
#include <string.h>
1616

17-
/** Write a ED25519 digest into a pair of operand slots.
17+
/** Write a Ed25519 digest into a pair of operand slots.
1818
*
19-
* A ED25519 digest has twice as many bytes as the normal operand size.
19+
* A Ed25519 digest has twice as many bytes as the normal operand size.
2020
*
2121
* \param op The digest bytes to write into the operand slot.
2222
* \param slots The pair of slots to write the operand into.
@@ -134,7 +134,7 @@ static inline int ed25519_decode_pt_x(const struct sx_ed25519_pt *pt)
134134
return (pt->encoded[SX_ED25519_PT_SZ - 1] >> 7) & 1;
135135
}
136136

137-
/** Write the y affine coordinate of an encoded ED25519 point into memory */
137+
/** Write the y affine coordinate of an encoded Ed25519 point into memory */
138138
static inline void ed25519_pt_write_y(const struct sx_ed25519_pt *pt, char *ay)
139139
{
140140
sx_wrpkmem(ay, pt->encoded, SX_ED25519_PT_SZ);

subsys/nrf_security/src/drivers/cracen/silexpk/src/ed448.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
#include <silexpk/iomem.h>
1414
#include <silexpk/cmddefs/edwards.h>
1515

16-
/** Write a ED448 digest into a pair of operand slots.
16+
/** Write a Ed448 digest into a pair of operand slots.
1717
*
18-
* A ED448 digest has twice as many bytes as the normal operand size.
18+
* A Ed448 digest has twice as many bytes as the normal operand size.
1919
*
2020
* \param op The digest bytes to write into the operand slot.
2121
* \param slots The pair of slots to write the operand into.
@@ -133,7 +133,7 @@ static inline int ed448_decode_pt_x(const struct sx_ed448_pt *pt)
133133
return (pt->encoded[SX_ED448_PT_SZ - 1] >> 7) & 1;
134134
}
135135

136-
/** Write the y affine coordinate of an encoded ED448 point into memory */
136+
/** Write the y affine coordinate of an encoded Ed448 point into memory */
137137
static inline void ed448_pt_write_y(const struct sx_ed448_pt *pt, char *ay)
138138
{
139139
sx_wrpkmem(ay, pt->encoded, SX_ED448_PT_SZ - 1);

subsys/nrf_security/src/drivers/cracen/sxsymcrypt/include/sxsymcrypt/sha3.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ extern const struct sxhashalg sxhashalg_sha3_384;
5151
/** Hash algorithm SHA-3 512*/
5252
extern const struct sxhashalg sxhashalg_sha3_512;
5353

54-
/** Hash algorithm SHAKE256, with output size fixed to 114 bytes (for ED448). */
54+
/** Hash algorithm SHAKE256, with output size fixed to 114 bytes (for Ed448). */
5555
extern const struct sxhashalg sxhashalg_shake256_114;
5656

5757
/** Creates a SHA3-224 hash operation context

0 commit comments

Comments
 (0)