mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-15 15:39:58 +00:00
Language / verbiage fixes
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
parent
aaec341c9b
commit
7de9e2db1f
@ -1,8 +1,5 @@
|
|||||||
Features
|
Features
|
||||||
* Added PSA_ALG_AEAD_WITH_AT_LEAST_THIS_LENGTH_TAG and
|
* In the PSA API, the policy for a MAC or AEAD algorithm can specify a
|
||||||
PSA_ALG_AT_LEAST_THIS_LENGTH_MAC as wildcard algorithms in PSA Crypto.
|
minimum MAC or tag length thanks to the new wildcards
|
||||||
These algorithm values describe that a key is allowed to be used with any
|
PSA_ALG_AT_LEAST_THIS_LENGTH_MAC and
|
||||||
algorithm that matches the specified base algorithm (e.g PSA_ALG_CCM for
|
PSA_ALG_AEAD_WITH_AT_LEAST_THIS_LENGTH_TAG.
|
||||||
AEAD or PSA_ALG_CMAC for MAC) and has a tag/MAC length which is at least
|
|
||||||
as long as the one encoded in the AT_LEAST_THIS_LENGTH_MAC/TAG wildcard
|
|
||||||
algorithm.
|
|
||||||
|
@ -675,7 +675,7 @@ static psa_algorithm_t psa_key_policy_algorithm_intersection(
|
|||||||
return( alg1 );
|
return( alg1 );
|
||||||
}
|
}
|
||||||
/* If the policies are from the same AEAD family, check whether
|
/* If the policies are from the same AEAD family, check whether
|
||||||
* one f them is a minimum-tag-length wildcard. Calculate the most
|
* one of them is a minimum-tag-length wildcard. Calculate the most
|
||||||
* restrictive tag length. */
|
* restrictive tag length. */
|
||||||
if( PSA_ALG_IS_AEAD( alg1 ) && PSA_ALG_IS_AEAD( alg2 ) &&
|
if( PSA_ALG_IS_AEAD( alg1 ) && PSA_ALG_IS_AEAD( alg2 ) &&
|
||||||
( PSA_ALG_AEAD_WITH_SHORTENED_TAG( alg1, 0 ) ==
|
( PSA_ALG_AEAD_WITH_SHORTENED_TAG( alg1, 0 ) ==
|
||||||
@ -685,7 +685,7 @@ static psa_algorithm_t psa_key_policy_algorithm_intersection(
|
|||||||
size_t alg2_len = PSA_ALG_AEAD_GET_TAG_LENGTH( alg2 );
|
size_t alg2_len = PSA_ALG_AEAD_GET_TAG_LENGTH( alg2 );
|
||||||
size_t max_len = alg1_len > alg2_len ? alg1_len : alg2_len;
|
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_AEAD_MINIMUM_LENGTH_FLAG ) != 0 ) &&
|
if( ( ( alg1 & PSA_ALG_AEAD_MINIMUM_LENGTH_FLAG ) != 0 ) &&
|
||||||
( ( alg2 & PSA_ALG_AEAD_MINIMUM_LENGTH_FLAG ) != 0 ) )
|
( ( alg2 & PSA_ALG_AEAD_MINIMUM_LENGTH_FLAG ) != 0 ) )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user