mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-25 07:25:39 +00:00
Merge pull request #139 from ARMmbed/psa-PSA_ALG-block_cipher_padding
Correct and simplify block-based cipher modes
This commit is contained in:
commit
40363fe3f5
|
@ -775,65 +775,8 @@ typedef uint32_t psa_algorithm_t;
|
|||
(((alg) & (PSA_ALG_CATEGORY_MASK | PSA_ALG_MAC_SUBCATEGORY_MASK)) == \
|
||||
PSA_ALG_CIPHER_MAC_BASE)
|
||||
|
||||
#define PSA_ALG_CIPHER_SUBCATEGORY_MASK ((psa_algorithm_t)0x00c00000)
|
||||
#define PSA_ALG_BLOCK_CIPHER_BASE ((psa_algorithm_t)0x04000000)
|
||||
#define PSA_ALG_BLOCK_CIPHER_MODE_MASK ((psa_algorithm_t)0x000000ff)
|
||||
#define PSA_ALG_BLOCK_CIPHER_PADDING_MASK ((psa_algorithm_t)0x003f0000)
|
||||
|
||||
/** Use a block cipher mode without padding.
|
||||
*
|
||||
* This padding mode may only be used with messages whose lengths are a
|
||||
* whole number of blocks for the chosen block cipher.
|
||||
*/
|
||||
#define PSA_ALG_BLOCK_CIPHER_PAD_NONE ((psa_algorithm_t)0x00000000)
|
||||
|
||||
#define PSA_ALG_BLOCK_CIPHER_PAD_PKCS7 ((psa_algorithm_t)0x00010000)
|
||||
|
||||
/** Whether the specified algorithm is a block cipher.
|
||||
*
|
||||
* A block cipher is a symmetric cipher that encrypts or decrypts messages
|
||||
* by chopping them into fixed-size blocks. Processing a message requires
|
||||
* applying a _padding mode_ to transform the message into one whose
|
||||
* length is a whole number of blocks. To construct an algorithm
|
||||
* identifier for a block cipher, apply a bitwise-or between the block
|
||||
* cipher mode and the padding mode. For example, CBC with PKCS#7 padding
|
||||
* is `PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_PKCS7`.
|
||||
*
|
||||
* The transformation applied to each block is determined by the key type.
|
||||
* For example, to use AES-128-CBC-PKCS7, use the algorithm above with
|
||||
* a key of type #PSA_KEY_TYPE_AES and a length of 128 bits (16 bytes).
|
||||
*
|
||||
* \param alg An algorithm identifier (value of type #psa_algorithm_t).
|
||||
*
|
||||
* \return 1 if \p alg is a block cipher algorithm, 0 otherwise.
|
||||
* This macro may return either 0 or 1 if \p alg is not a supported
|
||||
* algorithm identifier or if it is not a symmetric cipher algorithm.
|
||||
*/
|
||||
#define PSA_ALG_IS_BLOCK_CIPHER(alg) \
|
||||
(((alg) & (PSA_ALG_CATEGORY_MASK | PSA_ALG_CIPHER_SUBCATEGORY_MASK)) == \
|
||||
PSA_ALG_BLOCK_CIPHER_BASE)
|
||||
|
||||
/** The CBC block cipher mode.
|
||||
*/
|
||||
#define PSA_ALG_CBC_BASE ((psa_algorithm_t)0x04000001)
|
||||
#define PSA_ALG_CFB_BASE ((psa_algorithm_t)0x04000002)
|
||||
#define PSA_ALG_OFB_BASE ((psa_algorithm_t)0x04000003)
|
||||
#define PSA_ALG_XTS_BASE ((psa_algorithm_t)0x04000004)
|
||||
|
||||
#define PSA_ALG_STREAM_CIPHER_BASE ((psa_algorithm_t)0x04800000)
|
||||
|
||||
/** The CTR stream cipher mode.
|
||||
*
|
||||
* CTR is a stream cipher which is built from a block cipher. The
|
||||
* underlying block cipher is determined by the key type. For example,
|
||||
* to use AES-128-CTR, use this algorithm with
|
||||
* a key of type #PSA_KEY_TYPE_AES and a length of 128 bits (16 bytes).
|
||||
*/
|
||||
#define PSA_ALG_CTR ((psa_algorithm_t)0x04800001)
|
||||
|
||||
/** The ARC4 stream cipher algorithm.
|
||||
*/
|
||||
#define PSA_ALG_ARC4 ((psa_algorithm_t)0x04800002)
|
||||
#define PSA_ALG_CIPHER_STREAM_FLAG ((psa_algorithm_t)0x00800000)
|
||||
#define PSA_ALG_CIPHER_FROM_BLOCK_FLAG ((psa_algorithm_t)0x00400000)
|
||||
|
||||
/** Whether the specified algorithm is a stream cipher.
|
||||
*
|
||||
|
@ -848,8 +791,50 @@ typedef uint32_t psa_algorithm_t;
|
|||
* algorithm identifier or if it is not a symmetric cipher algorithm.
|
||||
*/
|
||||
#define PSA_ALG_IS_STREAM_CIPHER(alg) \
|
||||
(((alg) & (PSA_ALG_CATEGORY_MASK | PSA_ALG_CIPHER_SUBCATEGORY_MASK)) == \
|
||||
PSA_ALG_STREAM_CIPHER_BASE)
|
||||
(((alg) & (PSA_ALG_CATEGORY_MASK | PSA_ALG_CIPHER_STREAM_FLAG)) == \
|
||||
(PSA_ALG_CATEGORY_CIPHER | PSA_ALG_CIPHER_STREAM_FLAG))
|
||||
|
||||
/** The ARC4 stream cipher algorithm.
|
||||
*/
|
||||
#define PSA_ALG_ARC4 ((psa_algorithm_t)0x04800001)
|
||||
|
||||
/** The CTR stream cipher mode.
|
||||
*
|
||||
* CTR is a stream cipher which is built from a block cipher.
|
||||
* The underlying block cipher is determined by the key type.
|
||||
* For example, to use AES-128-CTR, use this algorithm with
|
||||
* a key of type #PSA_KEY_TYPE_AES and a length of 128 bits (16 bytes).
|
||||
*/
|
||||
#define PSA_ALG_CTR ((psa_algorithm_t)0x04c00001)
|
||||
|
||||
#define PSA_ALG_CFB ((psa_algorithm_t)0x04c00002)
|
||||
|
||||
#define PSA_ALG_OFB ((psa_algorithm_t)0x04c00003)
|
||||
|
||||
/** The XTS cipher mode.
|
||||
*
|
||||
* XTS is a cipher mode which is built from a block cipher. It requires at
|
||||
* least one full block of input, but beyond this minimum the input
|
||||
* does not need to be a whole number of blocks.
|
||||
*/
|
||||
#define PSA_ALG_XTS ((psa_algorithm_t)0x044000ff)
|
||||
|
||||
/** The CBC block cipher chaining mode, with no padding.
|
||||
*
|
||||
* The underlying block cipher is determined by the key type.
|
||||
*
|
||||
* This symmetric cipher mode can only be used with messages whose lengths
|
||||
* are whole number of blocks for the chosen block cipher.
|
||||
*/
|
||||
#define PSA_ALG_CBC_NO_PADDING ((psa_algorithm_t)0x04600100)
|
||||
|
||||
/** The CBC block cipher chaining mode with PKCS#7 padding.
|
||||
*
|
||||
* The underlying block cipher is determined by the key type.
|
||||
*
|
||||
* This is the padding method defined by PKCS#7 (RFC 2315) §10.3.
|
||||
*/
|
||||
#define PSA_ALG_CBC_PKCS7 ((psa_algorithm_t)0x04600101)
|
||||
|
||||
#define PSA_ALG_CCM ((psa_algorithm_t)0x06000001)
|
||||
#define PSA_ALG_GCM ((psa_algorithm_t)0x06000002)
|
||||
|
|
|
@ -1226,28 +1226,26 @@ static const mbedtls_cipher_info_t *mbedtls_cipher_info_from_psa(
|
|||
|
||||
if( PSA_ALG_IS_CIPHER( alg ) || PSA_ALG_IS_AEAD( alg ) )
|
||||
{
|
||||
if( PSA_ALG_IS_BLOCK_CIPHER( alg ) )
|
||||
{
|
||||
alg &= ~PSA_ALG_BLOCK_CIPHER_PADDING_MASK;
|
||||
}
|
||||
|
||||
switch( alg )
|
||||
{
|
||||
case PSA_ALG_STREAM_CIPHER_BASE:
|
||||
case PSA_ALG_ARC4:
|
||||
mode = MBEDTLS_MODE_STREAM;
|
||||
break;
|
||||
case PSA_ALG_CBC_BASE:
|
||||
mode = MBEDTLS_MODE_CBC;
|
||||
break;
|
||||
case PSA_ALG_CFB_BASE:
|
||||
mode = MBEDTLS_MODE_CFB;
|
||||
break;
|
||||
case PSA_ALG_OFB_BASE:
|
||||
mode = MBEDTLS_MODE_OFB;
|
||||
break;
|
||||
case PSA_ALG_CTR:
|
||||
mode = MBEDTLS_MODE_CTR;
|
||||
break;
|
||||
case PSA_ALG_CFB:
|
||||
mode = MBEDTLS_MODE_CFB;
|
||||
break;
|
||||
case PSA_ALG_OFB:
|
||||
mode = MBEDTLS_MODE_OFB;
|
||||
break;
|
||||
case PSA_ALG_CBC_NO_PADDING:
|
||||
mode = MBEDTLS_MODE_CBC;
|
||||
break;
|
||||
case PSA_ALG_CBC_PKCS7:
|
||||
mode = MBEDTLS_MODE_CBC;
|
||||
break;
|
||||
case PSA_ALG_CCM:
|
||||
mode = MBEDTLS_MODE_CCM;
|
||||
break;
|
||||
|
@ -2425,37 +2423,32 @@ static psa_status_t psa_cipher_setup( psa_cipher_operation_t *operation,
|
|||
}
|
||||
|
||||
#if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING)
|
||||
if( ( alg & ~PSA_ALG_BLOCK_CIPHER_PADDING_MASK ) == PSA_ALG_CBC_BASE )
|
||||
switch( alg )
|
||||
{
|
||||
psa_algorithm_t padding_mode = alg & PSA_ALG_BLOCK_CIPHER_PADDING_MASK;
|
||||
mbedtls_cipher_padding_t mode;
|
||||
|
||||
switch ( padding_mode )
|
||||
{
|
||||
case PSA_ALG_BLOCK_CIPHER_PAD_PKCS7:
|
||||
mode = MBEDTLS_PADDING_PKCS7;
|
||||
break;
|
||||
case PSA_ALG_BLOCK_CIPHER_PAD_NONE:
|
||||
mode = MBEDTLS_PADDING_NONE;
|
||||
break;
|
||||
default:
|
||||
psa_cipher_abort( operation );
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
}
|
||||
ret = mbedtls_cipher_set_padding_mode( &operation->ctx.cipher, mode );
|
||||
if( ret != 0 )
|
||||
{
|
||||
psa_cipher_abort( operation );
|
||||
return( mbedtls_to_psa_error( ret ) );
|
||||
}
|
||||
case PSA_ALG_CBC_NO_PADDING:
|
||||
ret = mbedtls_cipher_set_padding_mode( &operation->ctx.cipher,
|
||||
MBEDTLS_PADDING_NONE );
|
||||
break;
|
||||
case PSA_ALG_CBC_PKCS7:
|
||||
ret = mbedtls_cipher_set_padding_mode( &operation->ctx.cipher,
|
||||
MBEDTLS_PADDING_PKCS7 );
|
||||
break;
|
||||
default:
|
||||
/* The algorithm doesn't involve padding. */
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
if( ret != 0 )
|
||||
{
|
||||
psa_cipher_abort( operation );
|
||||
return( mbedtls_to_psa_error( ret ) );
|
||||
}
|
||||
#endif //MBEDTLS_CIPHER_MODE_WITH_PADDING
|
||||
|
||||
operation->key_set = 1;
|
||||
operation->block_size = ( PSA_ALG_IS_BLOCK_CIPHER( alg ) ?
|
||||
PSA_BLOCK_CIPHER_BLOCK_SIZE( slot->type ) :
|
||||
1 );
|
||||
if( PSA_ALG_IS_BLOCK_CIPHER( alg ) || alg == PSA_ALG_CTR )
|
||||
operation->block_size = ( PSA_ALG_IS_STREAM_CIPHER( alg ) ? 1 :
|
||||
PSA_BLOCK_CIPHER_BLOCK_SIZE( slot->type ) );
|
||||
if( alg & PSA_ALG_CIPHER_FROM_BLOCK_FLAG )
|
||||
{
|
||||
operation->iv_size = PSA_BLOCK_CIPHER_BLOCK_SIZE( slot->type );
|
||||
}
|
||||
|
@ -2547,7 +2540,7 @@ psa_status_t psa_cipher_update( psa_cipher_operation_t *operation,
|
|||
psa_status_t status;
|
||||
int ret;
|
||||
size_t expected_output_size;
|
||||
if( PSA_ALG_IS_BLOCK_CIPHER( operation->alg ) )
|
||||
if( ! PSA_ALG_IS_STREAM_CIPHER( operation->alg ) )
|
||||
{
|
||||
/* Take the unprocessed partial block left over from previous
|
||||
* update calls, if any, plus the input to this call. Remove
|
||||
|
@ -2596,24 +2589,13 @@ psa_status_t psa_cipher_finish( psa_cipher_operation_t *operation,
|
|||
status = PSA_ERROR_BAD_STATE;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if( operation->ctx.cipher.operation == MBEDTLS_ENCRYPT &&
|
||||
PSA_ALG_IS_BLOCK_CIPHER( operation->alg ) )
|
||||
operation->alg == PSA_ALG_CBC_NO_PADDING &&
|
||||
operation->ctx.cipher.unprocessed_len != 0 )
|
||||
{
|
||||
psa_algorithm_t padding_mode =
|
||||
operation->alg & PSA_ALG_BLOCK_CIPHER_PADDING_MASK;
|
||||
if( operation->ctx.cipher.unprocessed_len >= operation->block_size )
|
||||
{
|
||||
status = PSA_ERROR_TAMPERING_DETECTED;
|
||||
status = PSA_ERROR_INVALID_ARGUMENT;
|
||||
goto error;
|
||||
}
|
||||
if( padding_mode == PSA_ALG_BLOCK_CIPHER_PAD_NONE )
|
||||
{
|
||||
if( operation->ctx.cipher.unprocessed_len != 0 )
|
||||
{
|
||||
status = PSA_ERROR_INVALID_ARGUMENT;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cipher_ret = mbedtls_cipher_finish( &operation->ctx.cipher,
|
||||
|
|
|
@ -167,8 +167,7 @@ cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block( void )
|
|||
key_bits = 256,
|
||||
part_size = block_size,
|
||||
};
|
||||
const psa_algorithm_t alg = PSA_ALG_CBC_BASE |
|
||||
PSA_ALG_BLOCK_CIPHER_PAD_NONE;
|
||||
const psa_algorithm_t alg = PSA_ALG_CBC_NO_PADDING;
|
||||
|
||||
psa_status_t status;
|
||||
size_t output_len = 0;
|
||||
|
@ -216,8 +215,7 @@ static psa_status_t cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi( void )
|
|||
part_size = 10,
|
||||
};
|
||||
|
||||
const psa_algorithm_t alg = PSA_ALG_CBC_BASE |
|
||||
PSA_ALG_BLOCK_CIPHER_PAD_PKCS7;
|
||||
const psa_algorithm_t alg = PSA_ALG_CBC_PKCS7;
|
||||
|
||||
psa_status_t status;
|
||||
size_t output_len = 0;
|
||||
|
|
|
@ -47,34 +47,11 @@ static int psa_snprint_key_type(char *buffer, size_t buffer_size,
|
|||
return required_size;
|
||||
}
|
||||
|
||||
static void append_padding_mode(char **buffer, size_t buffer_size,
|
||||
size_t *required_size,
|
||||
psa_algorithm_t padding_mode)
|
||||
{
|
||||
size_t n;
|
||||
append(buffer, buffer_size, required_size, " | ", 3);
|
||||
switch (padding_mode) {
|
||||
%(padding_mode_cases)s
|
||||
default:
|
||||
n = snprintf(*buffer, buffer_size - *required_size,
|
||||
"0x%%08lx", (unsigned long) padding_mode);
|
||||
if (n < buffer_size - *required_size) *buffer += n;
|
||||
*required_size += n;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static int psa_snprint_algorithm(char *buffer, size_t buffer_size,
|
||||
psa_algorithm_t alg)
|
||||
{
|
||||
size_t required_size = 0;
|
||||
psa_algorithm_t padding_mode = -1;
|
||||
psa_algorithm_t alg_without_padding = alg;
|
||||
if (PSA_ALG_IS_CIPHER(alg) && PSA_ALG_IS_BLOCK_CIPHER(alg)) {
|
||||
padding_mode = alg & PSA_ALG_BLOCK_CIPHER_PADDING_MASK;
|
||||
alg_without_padding = alg & ~PSA_ALG_BLOCK_CIPHER_PADDING_MASK;
|
||||
}
|
||||
switch (alg_without_padding) {
|
||||
switch (alg) {
|
||||
%(algorithm_cases)s
|
||||
default:
|
||||
%(algorithm_code)s{
|
||||
|
@ -83,9 +60,6 @@ static int psa_snprint_algorithm(char *buffer, size_t buffer_size,
|
|||
}
|
||||
break;
|
||||
}
|
||||
if (padding_mode != (psa_algorithm_t) -1) {
|
||||
append_padding_mode(&buffer, buffer_size, &required_size, padding_mode);
|
||||
}
|
||||
buffer[0] = 0;
|
||||
return required_size;
|
||||
}
|
||||
|
@ -125,10 +99,10 @@ key_type_from_curve_template = '''if (%(tester)s(type)) {
|
|||
PSA_KEY_TYPE_GET_CURVE(type));
|
||||
} else '''
|
||||
|
||||
algorithm_from_hash_template = '''if (%(tester)s(alg_without_padding)) {
|
||||
algorithm_from_hash_template = '''if (%(tester)s(alg)) {
|
||||
append_with_hash(&buffer, buffer_size, &required_size,
|
||||
"%(builder)s", %(builder_length)s,
|
||||
PSA_ALG_GET_HASH(alg_without_padding));
|
||||
PSA_ALG_GET_HASH(alg));
|
||||
} else '''
|
||||
|
||||
bit_test_template = '''\
|
||||
|
@ -149,7 +123,6 @@ class MacroCollector:
|
|||
self.ecc_curves = set()
|
||||
self.algorithms = set()
|
||||
self.hash_algorithms = set()
|
||||
self.block_cipher_padding_modes = set()
|
||||
self.algorithms_from_hash = {}
|
||||
self.key_usages = set()
|
||||
|
||||
|
@ -175,11 +148,8 @@ class MacroCollector:
|
|||
self.key_types_from_curve[name] = name[:13] + 'IS_' + name[13:]
|
||||
elif name.startswith('PSA_ECC_CURVE_') and not parameter:
|
||||
self.ecc_curves.add(name)
|
||||
elif name.startswith('PSA_ALG_BLOCK_CIPHER_PAD_') and not parameter:
|
||||
self.block_cipher_padding_modes.add(name)
|
||||
elif name.startswith('PSA_ALG_') and not parameter:
|
||||
if name in ['PSA_ALG_BLOCK_CIPHER_BASE',
|
||||
'PSA_ALG_ECDSA_BASE',
|
||||
if name in ['PSA_ALG_ECDSA_BASE',
|
||||
'PSA_ALG_RSA_PKCS1V15_SIGN_BASE']:
|
||||
# Ad hoc skipping of duplicate names for some numerical values
|
||||
return
|
||||
|
@ -250,10 +220,6 @@ class MacroCollector:
|
|||
return '\n '.join(map(self.make_return_case,
|
||||
sorted(self.hash_algorithms)))
|
||||
|
||||
def make_padding_mode_cases(self):
|
||||
return '\n '.join(map(self.make_inner_append_case,
|
||||
sorted(self.block_cipher_padding_modes)))
|
||||
|
||||
def make_algorithm_cases(self):
|
||||
return '\n '.join(map(self.make_append_case,
|
||||
sorted(self.algorithms)))
|
||||
|
@ -279,7 +245,6 @@ class MacroCollector:
|
|||
data['key_type_cases'] = self.make_key_type_cases()
|
||||
data['key_type_code'] = self.make_key_type_code()
|
||||
data['hash_algorithm_cases'] = self.make_hash_algorithm_cases()
|
||||
data['padding_mode_cases'] = self.make_padding_mode_cases()
|
||||
data['algorithm_cases'] = self.make_algorithm_cases()
|
||||
data['algorithm_code'] = self.make_algorithm_code()
|
||||
data['key_usage_code'] = self.make_key_usage_code()
|
||||
|
|
|
@ -5,16 +5,16 @@ PSA fill 250 slots
|
|||
fill_slots:250
|
||||
|
||||
PSA import/export raw: 0 bytes
|
||||
import_export:"":PSA_KEY_TYPE_RAW_DATA:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_USAGE_EXPORT:0:0:PSA_SUCCESS:1
|
||||
import_export:"":PSA_KEY_TYPE_RAW_DATA:0:PSA_KEY_USAGE_EXPORT:0:0:PSA_SUCCESS:1
|
||||
|
||||
PSA import/export raw: 1 bytes
|
||||
import_export:"2a":PSA_KEY_TYPE_RAW_DATA:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_USAGE_EXPORT:8:0:PSA_SUCCESS:1
|
||||
import_export:"2a":PSA_KEY_TYPE_RAW_DATA:0:PSA_KEY_USAGE_EXPORT:8:0:PSA_SUCCESS:1
|
||||
|
||||
PSA import/export raw: 1 bytes, larger buffer
|
||||
import_export:"2a":PSA_KEY_TYPE_RAW_DATA:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_USAGE_EXPORT:8:1:PSA_SUCCESS:1
|
||||
import_export:"2a":PSA_KEY_TYPE_RAW_DATA:0:PSA_KEY_USAGE_EXPORT:8:1:PSA_SUCCESS:1
|
||||
|
||||
PSA import/export raw: 2 bytes, buffer too small
|
||||
import_export:"2a2b":PSA_KEY_TYPE_RAW_DATA:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_USAGE_EXPORT:16:-1:PSA_ERROR_BUFFER_TOO_SMALL:1
|
||||
import_export:"2a2b":PSA_KEY_TYPE_RAW_DATA:0:PSA_KEY_USAGE_EXPORT:16:-1:PSA_ERROR_BUFFER_TOO_SMALL:1
|
||||
|
||||
PSA import/export AES-128
|
||||
depends_on:MBEDTLS_AES_C
|
||||
|
@ -114,7 +114,7 @@ import_export_public_key:"3082025e02010002818100af057d396ee84fb75fdbb5c2b13c7fe5
|
|||
|
||||
PSA import/export-public: cannot export-public a symmetric key
|
||||
depends_on:MBEDTLS_PK_PARSE_C:MBEDTLS_PK_WRITE_C:MBEDTLS_RSA_C
|
||||
import_export_public_key:"2b7e151628aed2a6abf7158809cf4f3c":PSA_KEY_TYPE_AES:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:128:0:PSA_ERROR_INVALID_ARGUMENT
|
||||
import_export_public_key:"2b7e151628aed2a6abf7158809cf4f3c":PSA_KEY_TYPE_AES:PSA_ALG_CBC_NO_PADDING:128:0:PSA_ERROR_INVALID_ARGUMENT
|
||||
|
||||
PSA import/export EC secp256r1: good
|
||||
depends_on:MBEDTLS_PK_PARSE_C:MBEDTLS_PK_WRITE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED
|
||||
|
@ -183,7 +183,7 @@ depends_on:MBEDTLS_PK_PARSE_C:MBEDTLS_RSA_C
|
|||
import_rsa_made_up:PSA_VENDOR_RSA_MAX_KEY_BITS+8:0:PSA_ERROR_NOT_SUPPORTED
|
||||
|
||||
PSA key policy set and get
|
||||
key_policy:PSA_KEY_USAGE_ENCRYPT:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE
|
||||
key_policy:PSA_KEY_USAGE_ENCRYPT:PSA_ALG_CBC_NO_PADDING
|
||||
|
||||
PSA key policy: MAC, sign | verify
|
||||
depends_on:MBEDTLS_MD_C:MBEDTLS_SHA256_C
|
||||
|
@ -211,7 +211,7 @@ cipher_key_policy:PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT:PSA_ALG_CTR:PSA_
|
|||
|
||||
PSA key policy: cipher, wrong algorithm
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_key_policy:PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT:PSA_ALG_CTR:PSA_KEY_TYPE_AES:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa":PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE
|
||||
cipher_key_policy:PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT:PSA_ALG_CTR:PSA_KEY_TYPE_AES:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa":PSA_ALG_CBC_NO_PADDING
|
||||
|
||||
PSA key policy: cipher, encrypt but not decrypt
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR
|
||||
|
@ -343,7 +343,7 @@ mac_setup:PSA_KEY_TYPE_HMAC:"000102030405060708090a0b0c0d0e0f1011121314151617181
|
|||
|
||||
PSA MAC setup: bad algorithm (not a MAC algorithm)
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
mac_setup:PSA_KEY_TYPE_AES:"000102030405060708090a0b0c0d0e0f":PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_ERROR_INVALID_ARGUMENT
|
||||
mac_setup:PSA_KEY_TYPE_AES:"000102030405060708090a0b0c0d0e0f":PSA_ALG_CBC_NO_PADDING:PSA_ERROR_INVALID_ARGUMENT
|
||||
|
||||
PSA MAC setup: invalid key type, HMAC-SHA-256
|
||||
depends_on:MBEDTLS_MD_C:MBEDTLS_SHA256_C
|
||||
|
@ -482,127 +482,127 @@ cipher_setup:PSA_KEY_TYPE_ARC4:"000102030405060708090a0b0c0d0e0f":PSA_ALG_CTR:PS
|
|||
|
||||
PSA symmetric encrypt: AES-CBC-nopad, 16 bytes, good
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_encrypt:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":"a076ec9dfbe47d52afc357336f20743b":PSA_SUCCESS
|
||||
cipher_encrypt:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":"a076ec9dfbe47d52afc357336f20743b":PSA_SUCCESS
|
||||
|
||||
PSA symmetric encrypt: AES-CBC-PKCS#7, 16 bytes, good
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_encrypt:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":"a076ec9dfbe47d52afc357336f20743bca7e8a15dc3c776436314293031cd4f3":PSA_SUCCESS
|
||||
cipher_encrypt:PSA_ALG_CBC_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":"a076ec9dfbe47d52afc357336f20743bca7e8a15dc3c776436314293031cd4f3":PSA_SUCCESS
|
||||
|
||||
PSA symmetric encrypt: AES-CBC-PKCS#7, 15 bytes, good
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_encrypt:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e11739317":"6279b49d7f7a8dd87b685175d4276e24":PSA_SUCCESS
|
||||
cipher_encrypt:PSA_ALG_CBC_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e11739317":"6279b49d7f7a8dd87b685175d4276e24":PSA_SUCCESS
|
||||
|
||||
PSA symmetric encrypt: AES-CBC-nopad, input too short
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_encrypt:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee223":"6bc1bee223":PSA_ERROR_INVALID_ARGUMENT
|
||||
cipher_encrypt:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee223":"6bc1bee223":PSA_ERROR_INVALID_ARGUMENT
|
||||
|
||||
PSA symmetric encrypt: AES-CTR, 16 bytes, good
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_MODE_CTR
|
||||
cipher_encrypt:PSA_ALG_CTR | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":"8f9408fe80a81d3e813da3c7b0b2bd32":PSA_SUCCESS
|
||||
cipher_encrypt:PSA_ALG_CTR:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":"8f9408fe80a81d3e813da3c7b0b2bd32":PSA_SUCCESS
|
||||
|
||||
PSA symmetric encrypt: AES-CTR, 15 bytes, good
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_MODE_CTR
|
||||
cipher_encrypt:PSA_ALG_CTR | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e11739317":"8f9408fe80a81d3e813da3c7b0b2bd":PSA_SUCCESS
|
||||
cipher_encrypt:PSA_ALG_CTR:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e11739317":"8f9408fe80a81d3e813da3c7b0b2bd":PSA_SUCCESS
|
||||
|
||||
PSA symmetric encrypt: DES-CBC-nopad, 8 bytes, good
|
||||
depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_encrypt:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_DES:"01020407080b0d0e":"eda4011239bc3ac9":"64f917b0152f8f05":PSA_SUCCESS
|
||||
cipher_encrypt:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_DES:"01020407080b0d0e":"eda4011239bc3ac9":"64f917b0152f8f05":PSA_SUCCESS
|
||||
|
||||
PSA symmetric encrypt: 2-key 3DES-CBC-nopad, 8 bytes, good
|
||||
depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_encrypt:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_DES:"01020407080b0d0ec1c2c4c7c8cbcdce":"eda4011239bc3ac9":"5d0652429c5b0ac7":PSA_SUCCESS
|
||||
cipher_encrypt:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_DES:"01020407080b0d0ec1c2c4c7c8cbcdce":"eda4011239bc3ac9":"5d0652429c5b0ac7":PSA_SUCCESS
|
||||
|
||||
PSA symmetric encrypt: 3-key 3DES-CBC-nopad, 8 bytes, good
|
||||
depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_encrypt:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_DES:"01020407080b0d0ec1c2c4c7c8cbcdce31323437383b3d3e":"eda4011239bc3ac9":"817ca7d69b80d86a":PSA_SUCCESS
|
||||
cipher_encrypt:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_DES:"01020407080b0d0ec1c2c4c7c8cbcdce31323437383b3d3e":"eda4011239bc3ac9":"817ca7d69b80d86a":PSA_SUCCESS
|
||||
|
||||
PSA symmetric decrypt: AES-CBC-nopad, 16 bytes, good
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_decrypt:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"396ee84fb75fdbb5c2b13c7fe5a654aa":"49e4e66c89a86b67758df89db9ad6955":PSA_SUCCESS
|
||||
cipher_decrypt:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"396ee84fb75fdbb5c2b13c7fe5a654aa":"49e4e66c89a86b67758df89db9ad6955":PSA_SUCCESS
|
||||
|
||||
PSA symmetric decrypt: AES-CBC-PKCS#7, 16 bytes, good
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_decrypt:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"a076ec9dfbe47d52afc357336f20743bca7e8a15dc3c776436314293031cd4f3":"6bc1bee22e409f96e93d7e117393172a":PSA_SUCCESS
|
||||
cipher_decrypt:PSA_ALG_CBC_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"a076ec9dfbe47d52afc357336f20743bca7e8a15dc3c776436314293031cd4f3":"6bc1bee22e409f96e93d7e117393172a":PSA_SUCCESS
|
||||
|
||||
PSA symmetric decrypt: AES-CBC-PKCS#7, 15 bytes, good
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_decrypt:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6279b49d7f7a8dd87b685175d4276e24":"6bc1bee22e409f96e93d7e11739317":PSA_SUCCESS
|
||||
cipher_decrypt:PSA_ALG_CBC_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6279b49d7f7a8dd87b685175d4276e24":"6bc1bee22e409f96e93d7e11739317":PSA_SUCCESS
|
||||
|
||||
PSA symmetric decrypt: AES-CBC-PKCS#7, input too short (15 bytes)
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_decrypt:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e11739317":"49e4e66c89a86b67758df89db9ad6955":PSA_ERROR_BAD_STATE
|
||||
cipher_decrypt:PSA_ALG_CBC_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e11739317":"49e4e66c89a86b67758df89db9ad6955":PSA_ERROR_BAD_STATE
|
||||
|
||||
PSA symmetric decrypt: AES-CTR, 16 bytes, good
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_MODE_CTR
|
||||
cipher_decrypt:PSA_ALG_CTR | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"396ee84fb75fdbb5c2b13c7fe5a654aa":"dd3b5e5319b7591daab1e1a92687feb2":PSA_SUCCESS
|
||||
cipher_decrypt:PSA_ALG_CTR:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"396ee84fb75fdbb5c2b13c7fe5a654aa":"dd3b5e5319b7591daab1e1a92687feb2":PSA_SUCCESS
|
||||
|
||||
PSA symmetric decrypt: AES-CBC-nopad, input too short (5 bytes)
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_decrypt:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee223":"6bc1bee223":PSA_ERROR_BAD_STATE
|
||||
cipher_decrypt:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee223":"6bc1bee223":PSA_ERROR_BAD_STATE
|
||||
|
||||
PSA symmetric decrypt: DES-CBC-nopad, 8 bytes, good
|
||||
depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_decrypt:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_DES:"01020407080b0d0e":"64f917b0152f8f05":"eda4011239bc3ac9":PSA_SUCCESS
|
||||
cipher_decrypt:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_DES:"01020407080b0d0e":"64f917b0152f8f05":"eda4011239bc3ac9":PSA_SUCCESS
|
||||
|
||||
PSA symmetric decrypt: 2-key 3DES-CBC-nopad, 8 bytes, good
|
||||
depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_decrypt:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_DES:"01020407080b0d0ec1c2c4c7c8cbcdce":"5d0652429c5b0ac7":"eda4011239bc3ac9":PSA_SUCCESS
|
||||
cipher_decrypt:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_DES:"01020407080b0d0ec1c2c4c7c8cbcdce":"5d0652429c5b0ac7":"eda4011239bc3ac9":PSA_SUCCESS
|
||||
|
||||
PSA symmetric decrypt: 3-key 3DES-CBC-nopad, 8 bytes, good
|
||||
depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_decrypt:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_DES:"01020407080b0d0ec1c2c4c7c8cbcdce31323437383b3d3e":"817ca7d69b80d86a":"eda4011239bc3ac9":PSA_SUCCESS
|
||||
cipher_decrypt:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_DES:"01020407080b0d0ec1c2c4c7c8cbcdce31323437383b3d3e":"817ca7d69b80d86a":"eda4011239bc3ac9":PSA_SUCCESS
|
||||
|
||||
PSA symmetric encrypt/decrypt: AES-CBC-nopad, 16 bytes, good
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_verify_output:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a"
|
||||
cipher_verify_output:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a"
|
||||
|
||||
PSA symmetric encrypt/decrypt: AES-CBC-PKCS#7, 16 bytes
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7
|
||||
cipher_verify_output:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a"
|
||||
cipher_verify_output:PSA_ALG_CBC_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a"
|
||||
|
||||
PSA symmetric encrypt/decrypt: AES-CBC-PKCS#7, 15 bytes
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7
|
||||
cipher_verify_output:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e11739317"
|
||||
cipher_verify_output:PSA_ALG_CBC_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e11739317"
|
||||
|
||||
PSA symmetric encrypt/decrypt: AES-CTR
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR
|
||||
cipher_verify_output:PSA_ALG_CTR | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a"
|
||||
cipher_verify_output:PSA_ALG_CTR:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a"
|
||||
|
||||
PSA symmetric encryption multipart: AES-CBC-nopad, 7+9 bytes
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_encrypt_multipart:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":7:"a076ec9dfbe47d52afc357336f20743b"
|
||||
cipher_encrypt_multipart:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":7:"a076ec9dfbe47d52afc357336f20743b"
|
||||
|
||||
PSA symmetric encryption multipart: AES-CBC-nopad, 3+13 bytes
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_encrypt_multipart:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":3:"a076ec9dfbe47d52afc357336f20743b"
|
||||
cipher_encrypt_multipart:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":3:"a076ec9dfbe47d52afc357336f20743b"
|
||||
|
||||
PSA symmetric encryption multipart: AES-CBC-nopad, 4+12 bytes
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_encrypt_multipart:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":4:"a076ec9dfbe47d52afc357336f20743b"
|
||||
cipher_encrypt_multipart:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":4:"a076ec9dfbe47d52afc357336f20743b"
|
||||
|
||||
PSA symmetric encryption multipart: AES-CBC-nopad, 11+5 bytes
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_encrypt_multipart:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":11:"a076ec9dfbe47d52afc357336f20743b"
|
||||
cipher_encrypt_multipart:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":11:"a076ec9dfbe47d52afc357336f20743b"
|
||||
|
||||
PSA symmetric decryption multipart: AES-CBC-nopad, 7+9 bytes
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_decrypt_multipart:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"a076ec9dfbe47d52afc357336f20743b":7:"6bc1bee22e409f96e93d7e117393172a"
|
||||
cipher_decrypt_multipart:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"a076ec9dfbe47d52afc357336f20743b":7:"6bc1bee22e409f96e93d7e117393172a"
|
||||
|
||||
PSA symmetric decryption multipart: AES-CBC-nopad, 3+13 bytes
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_decrypt_multipart:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"a076ec9dfbe47d52afc357336f20743b":3:"6bc1bee22e409f96e93d7e117393172a"
|
||||
cipher_decrypt_multipart:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"a076ec9dfbe47d52afc357336f20743b":3:"6bc1bee22e409f96e93d7e117393172a"
|
||||
|
||||
PSA symmetric decryption multipart: AES-CBC-nopad, 11+5 bytes
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_decrypt_multipart:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"a076ec9dfbe47d52afc357336f20743b":11:"6bc1bee22e409f96e93d7e117393172a"
|
||||
cipher_decrypt_multipart:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"a076ec9dfbe47d52afc357336f20743b":11:"6bc1bee22e409f96e93d7e117393172a"
|
||||
|
||||
PSA symmetric encrypt/decrypt multipart: AES-CBC-nopad, 11+5 bytes
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
cipher_verify_output_multipart:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"a076ec9dfbe47d52afc357336f20743b":11
|
||||
cipher_verify_output_multipart:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"a076ec9dfbe47d52afc357336f20743b":11
|
||||
|
||||
PSA symmetric encrypt/decrypt multipart: AES-CBC-PKCS#7 padding, 4+12 bytes
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7
|
||||
cipher_verify_output_multipart:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"a076ec9dfbe47d52afc357336f20743b":4
|
||||
cipher_verify_output_multipart:PSA_ALG_CBC_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"a076ec9dfbe47d52afc357336f20743b":4
|
||||
|
||||
PSA AEAD encrypt/decrypt: AES-CCM, 19 bytes #1
|
||||
depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C
|
||||
|
@ -1068,15 +1068,15 @@ derive_key_exercise:PSA_ALG_HKDF(PSA_ALG_SHA_256):"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0
|
|||
|
||||
PSA key derivation: HKDF SHA-256, exercise DES-CBC
|
||||
depends_on:MBEDTLS_MD_C:MBEDTLS_SHA256_C:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
derive_key_exercise:PSA_ALG_HKDF(PSA_ALG_SHA_256):"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b":"000102030405060708090a0b0c":"f0f1f2f3f4f5f6f7f8f9":PSA_KEY_TYPE_DES:64:PSA_KEY_USAGE_ENCRYPT:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_PKCS7
|
||||
derive_key_exercise:PSA_ALG_HKDF(PSA_ALG_SHA_256):"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b":"000102030405060708090a0b0c":"f0f1f2f3f4f5f6f7f8f9":PSA_KEY_TYPE_DES:64:PSA_KEY_USAGE_ENCRYPT:PSA_ALG_CBC_PKCS7
|
||||
|
||||
PSA key derivation: HKDF SHA-256, exercise 2-key 3DES-CBC
|
||||
depends_on:MBEDTLS_MD_C:MBEDTLS_SHA256_C:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
derive_key_exercise:PSA_ALG_HKDF(PSA_ALG_SHA_256):"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b":"000102030405060708090a0b0c":"f0f1f2f3f4f5f6f7f8f9":PSA_KEY_TYPE_DES:128:PSA_KEY_USAGE_ENCRYPT:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_PKCS7
|
||||
derive_key_exercise:PSA_ALG_HKDF(PSA_ALG_SHA_256):"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b":"000102030405060708090a0b0c":"f0f1f2f3f4f5f6f7f8f9":PSA_KEY_TYPE_DES:128:PSA_KEY_USAGE_ENCRYPT:PSA_ALG_CBC_PKCS7
|
||||
|
||||
PSA key derivation: HKDF SHA-256, exercise 3-key 3DES-CBC
|
||||
depends_on:MBEDTLS_MD_C:MBEDTLS_SHA256_C:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC
|
||||
derive_key_exercise:PSA_ALG_HKDF(PSA_ALG_SHA_256):"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b":"000102030405060708090a0b0c":"f0f1f2f3f4f5f6f7f8f9":PSA_KEY_TYPE_DES:192:PSA_KEY_USAGE_ENCRYPT:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_PKCS7
|
||||
derive_key_exercise:PSA_ALG_HKDF(PSA_ALG_SHA_256):"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b":"000102030405060708090a0b0c":"f0f1f2f3f4f5f6f7f8f9":PSA_KEY_TYPE_DES:192:PSA_KEY_USAGE_ENCRYPT:PSA_ALG_CBC_PKCS7
|
||||
|
||||
PSA key derivation: HKDF SHA-256, exercise HMAC-SHA-256
|
||||
depends_on:MBEDTLS_MD_C:MBEDTLS_SHA256_C
|
||||
|
@ -1137,15 +1137,15 @@ generate_key:PSA_KEY_TYPE_AES:128:PSA_KEY_USAGE_EXPORT | PSA_KEY_USAGE_ENCRYPT |
|
|||
|
||||
PSA generate key: DES, 64 bits, CBC-nopad
|
||||
depends_on:MBEDTLS_DES_C
|
||||
generate_key:PSA_KEY_TYPE_DES:64:PSA_KEY_USAGE_EXPORT | PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_SUCCESS
|
||||
generate_key:PSA_KEY_TYPE_DES:64:PSA_KEY_USAGE_EXPORT | PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT:PSA_ALG_CBC_NO_PADDING:PSA_SUCCESS
|
||||
|
||||
PSA generate key: DES, 128 bits, CBC-nopad
|
||||
depends_on:MBEDTLS_DES_C
|
||||
generate_key:PSA_KEY_TYPE_DES:128:PSA_KEY_USAGE_EXPORT | PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_SUCCESS
|
||||
generate_key:PSA_KEY_TYPE_DES:128:PSA_KEY_USAGE_EXPORT | PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT:PSA_ALG_CBC_NO_PADDING:PSA_SUCCESS
|
||||
|
||||
PSA generate key: DES, 192 bits, CBC-nopad
|
||||
depends_on:MBEDTLS_DES_C
|
||||
generate_key:PSA_KEY_TYPE_DES:192:PSA_KEY_USAGE_EXPORT | PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT:PSA_ALG_CBC_BASE | PSA_ALG_BLOCK_CIPHER_PAD_NONE:PSA_SUCCESS
|
||||
generate_key:PSA_KEY_TYPE_DES:192:PSA_KEY_USAGE_EXPORT | PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT:PSA_ALG_CBC_NO_PADDING:PSA_SUCCESS
|
||||
|
||||
PSA generate key: invalid key size: AES, 64 bits
|
||||
depends_on:MBEDTLS_AES_C
|
||||
|
|
Loading…
Reference in a new issue