Fix typos & copy-paste errors

Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
Steven Cooreman 2021-02-25 10:20:29 +01:00
parent fb9cb92055
commit a1d8322f74
3 changed files with 9 additions and 9 deletions

View file

@ -941,7 +941,7 @@
/** Macro to build a MAC minimum-MAC-length wildcard algorithm.
*
* A mininimum-MAC-length MAC wildcard algorithm permits all MAC algorithms
* A minimum-MAC-length MAC wildcard algorithm permits all MAC algorithms
* sharing the same base algorithm, and where the (potentially truncated) MAC
* length of the specific algorithm is equal to or larger then the wildcard
* algorithm's minimum MAC length.
@ -1192,7 +1192,7 @@
/** Macro to build an AEAD minimum-tag-length wildcard algorithm.
*
* A mininimum-tag-length AEAD wildcard algorithm permits all AEAD algorithms
* A minimum-tag-length AEAD wildcard algorithm permits all AEAD algorithms
* sharing the same base algorithm, and where the tag length of the specific
* algorithm is equal to or larger then the minimum tag length specified by the
* wildcard algorithm.

View file

@ -714,7 +714,7 @@ static psa_algorithm_t psa_key_policy_algorithm_intersection(
size_t alg2_len = PSA_MAC_TRUNCATED_LENGTH( alg2 );
size_t max_len = alg1_len > alg2_len ? alg1_len : alg2_len;
/* If both are wildcards, return most restricitve wildcard */
/* If both are wildcards, return most restrictive wildcard */
if( ( ( alg1 & PSA_ALG_MAC_AT_LEAST_THIS_LENGTH_FLAG ) != 0 ) &&
( ( alg2 & PSA_ALG_MAC_AT_LEAST_THIS_LENGTH_FLAG ) != 0 ) )
{

View file

@ -272,9 +272,9 @@ void mac_algorithm( int alg_arg, int classification_flags,
mac_algorithm_core( policy_alg, classification_flags | ALG_IS_WILDCARD,
key_type, key_bits, n );
TEST_EQUAL( PSA_ALG_FULL_LENGTH_MAC( policy_alg ), alg );
/* Check that calling PSA_ALG_TRUNCATED_MAC twice gives the length
* of the outer truncation (even if the outer length is smaller than
* the inner length). */
/* Check that calling PSA_ALG_AT_LEAST_THIS_LENGTH_MAC twice gives the
* length of the outer truncation (even if the outer length is smaller
* than the inner length). */
TEST_EQUAL( PSA_ALG_AT_LEAST_THIS_LENGTH_MAC( policy_alg, 1 ),
PSA_ALG_AT_LEAST_THIS_LENGTH_MAC( alg, 1 ) );
TEST_EQUAL( PSA_ALG_AT_LEAST_THIS_LENGTH_MAC( policy_alg, length - 1 ),
@ -347,7 +347,7 @@ void aead_algorithm( int alg_arg, int classification_flags,
aead_algorithm_core( truncated_alg, classification_flags, n );
TEST_EQUAL( PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG( truncated_alg ),
alg );
/* Check that calling PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG twice gives
/* Check that calling PSA_ALG_AEAD_WITH_SHORTENED_TAG twice gives
* the length of the outer truncation (even if the outer length is
* smaller than the inner length). */
TEST_EQUAL( PSA_ALG_AEAD_WITH_SHORTENED_TAG( truncated_alg, 1 ),
@ -365,8 +365,8 @@ void aead_algorithm( int alg_arg, int classification_flags,
aead_algorithm_core( policy_alg, classification_flags | ALG_IS_WILDCARD, n );
TEST_EQUAL( PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG( policy_alg ),
alg );
/* Check that calling PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG twice gives
* the length of the outer truncation (even if the outer length is
/* Check that calling PSA_ALG_AEAD_WITH_AT_LEAST_THIS_LENGTH_TAG twice
* gives the length of the outer truncation (even if the outer length is
* smaller than the inner length). */
TEST_EQUAL( PSA_ALG_AEAD_WITH_AT_LEAST_THIS_LENGTH_TAG( policy_alg, 1 ),
PSA_ALG_AEAD_WITH_AT_LEAST_THIS_LENGTH_TAG( alg, 1 ) );