Skip to content

Commit

Permalink
Use a bit-size in the algorithm name
Browse files Browse the repository at this point in the history
Call it “SHAKE256-512”, just like SHA3-512 has 512 bits of output.
SHAKE256-64 looks like it's 64 bits of output, but this is 64 bytes.

Signed-off-by: Gilles Peskine <[email protected]>
  • Loading branch information
gilles-peskine-arm committed Mar 3, 2021

Verified

This commit was signed with the committer’s verified signature.
richiware Ricardo González
1 parent 9e7eb00 commit 7dc3ad6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/psa/crypto_values.h
Original file line number Diff line number Diff line change
@@ -803,13 +803,13 @@
#define PSA_ALG_SHA3_384 ((psa_algorithm_t)0x02000012)
/** SHA3-512 */
#define PSA_ALG_SHA3_512 ((psa_algorithm_t)0x02000013)
/** The first 64 bytes of the SHAKE256 output.
/** The first 512 bits (64 bytes) of the SHAKE256 output.
*
* This is the prehashing for Ed448ph (see #PSA_ALG_ED448PH). For other
* scenarios where a hash function based on SHA3/SHAKE is desired, SHA3-512
* has the same output size and a (theoretically) higher security strength.
*/
#define PSA_ALG_SHAKE256_64 ((psa_algorithm_t)0x02000015)
#define PSA_ALG_SHAKE256_512 ((psa_algorithm_t)0x02000015)

/** In a hash-and-sign algorithm policy, allow any hash algorithm.
*

0 comments on commit 7dc3ad6

Please sign in to comment.