mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-18 14:42:24 +00:00
Fix typo and style
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
03d948c47f
commit
459ee35062
@ -1818,7 +1818,7 @@
|
|||||||
* HKDF-Expand using HMAC-SHA-256.
|
* HKDF-Expand using HMAC-SHA-256.
|
||||||
*
|
*
|
||||||
* This key derivation algorithm uses the following inputs:
|
* This key derivation algorithm uses the following inputs:
|
||||||
* - PSA_KEY_DERIVATION_INPUT_SECRET is the pseudoramdom key (PRK).
|
* - PSA_KEY_DERIVATION_INPUT_SECRET is the pseudorandom key (PRK).
|
||||||
* - PSA_KEY_DERIVATION_INPUT_INFO is the info string.
|
* - PSA_KEY_DERIVATION_INPUT_INFO is the info string.
|
||||||
*
|
*
|
||||||
* The inputs are mandatory and must be passed in the order above.
|
* The inputs are mandatory and must be passed in the order above.
|
||||||
|
@ -4414,7 +4414,6 @@ static psa_status_t psa_key_derivation_hkdf_read( psa_hkdf_key_derivation_t *hkd
|
|||||||
if( hkdf->block_number == last_block )
|
if( hkdf->block_number == last_block )
|
||||||
return( PSA_ERROR_BAD_STATE );
|
return( PSA_ERROR_BAD_STATE );
|
||||||
|
|
||||||
|
|
||||||
/* We need a new block */
|
/* We need a new block */
|
||||||
++hkdf->block_number;
|
++hkdf->block_number;
|
||||||
hkdf->offset_in_block = 0;
|
hkdf->offset_in_block = 0;
|
||||||
@ -4429,24 +4428,24 @@ static psa_status_t psa_key_derivation_hkdf_read( psa_hkdf_key_derivation_t *hkd
|
|||||||
if( hkdf->block_number != 1 )
|
if( hkdf->block_number != 1 )
|
||||||
{
|
{
|
||||||
status = psa_mac_update( &hkdf->hmac,
|
status = psa_mac_update( &hkdf->hmac,
|
||||||
hkdf->output_block,
|
hkdf->output_block,
|
||||||
hash_length );
|
hash_length );
|
||||||
if( status != PSA_SUCCESS )
|
if( status != PSA_SUCCESS )
|
||||||
return( status );
|
return( status );
|
||||||
}
|
}
|
||||||
status = psa_mac_update( &hkdf->hmac,
|
status = psa_mac_update( &hkdf->hmac,
|
||||||
hkdf->info,
|
hkdf->info,
|
||||||
hkdf->info_length );
|
hkdf->info_length );
|
||||||
if( status != PSA_SUCCESS )
|
if( status != PSA_SUCCESS )
|
||||||
return( status );
|
return( status );
|
||||||
status = psa_mac_update( &hkdf->hmac,
|
status = psa_mac_update( &hkdf->hmac,
|
||||||
&hkdf->block_number, 1 );
|
&hkdf->block_number, 1 );
|
||||||
if( status != PSA_SUCCESS )
|
if( status != PSA_SUCCESS )
|
||||||
return( status );
|
return( status );
|
||||||
status = psa_mac_sign_finish( &hkdf->hmac,
|
status = psa_mac_sign_finish( &hkdf->hmac,
|
||||||
hkdf->output_block,
|
hkdf->output_block,
|
||||||
sizeof( hkdf->output_block ),
|
sizeof( hkdf->output_block ),
|
||||||
&hmac_output_length );
|
&hmac_output_length );
|
||||||
if( status != PSA_SUCCESS )
|
if( status != PSA_SUCCESS )
|
||||||
return( status );
|
return( status );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user