Lines Matching refs:length
193 size_t length )
208 TEST_EQUAL( length, PSA_MAC_LENGTH( key_type, key_bits, alg ) );
233 /* Tag length */
250 size_t length = length_arg;
284 /* Hash length */
285 TEST_EQUAL( length, PSA_HASH_LENGTH( alg ) );
286 TEST_ASSERT( length <= PSA_HASH_MAX_SIZE );
296 size_t length = length_arg;
302 key_type, key_bits, length );
304 TEST_ASSERT( length <= PSA_MAC_MAX_SIZE );
307 for( n = 1; n <= length; n++ )
313 /* Check that calling PSA_ALG_TRUNCATED_MAC twice gives the length
314 * of the outer truncation (even if the outer length is smaller than
315 * the inner length). */
318 TEST_EQUAL( PSA_ALG_TRUNCATED_MAC( truncated_alg, length - 1 ),
319 PSA_ALG_TRUNCATED_MAC( alg, length - 1) );
320 TEST_EQUAL( PSA_ALG_TRUNCATED_MAC( truncated_alg, length ),
321 PSA_ALG_TRUNCATED_MAC( alg, length ) );
325 * length of the outer truncation (even if the outer length is smaller
326 * than the inner length). */
331 PSA_ALG_AT_LEAST_THIS_LENGTH_MAC( truncated_alg, n ), length - 1 ),
332 PSA_ALG_TRUNCATED_MAC( alg, length - 1) );
334 PSA_ALG_AT_LEAST_THIS_LENGTH_MAC( truncated_alg, n ), length ),
335 PSA_ALG_TRUNCATED_MAC( alg, length ) );
338 /* At-leat-this-length versions */
339 for( n = 1; n <= length; n++ )
346 * length of the outer truncation (even if the outer length is smaller
347 * than the inner length). */
350 TEST_EQUAL( PSA_ALG_AT_LEAST_THIS_LENGTH_MAC( policy_alg, length - 1 ),
351 PSA_ALG_AT_LEAST_THIS_LENGTH_MAC( alg, length - 1) );
352 TEST_EQUAL( PSA_ALG_AT_LEAST_THIS_LENGTH_MAC( policy_alg, length ),
353 PSA_ALG_AT_LEAST_THIS_LENGTH_MAC( alg, length ) );
356 * earlier constructed with PSA_ALG_TRUNCATED_MAC gives the length of
357 * the outer truncation (even if the outer length is smaller than the
358 * inner length). */
363 PSA_ALG_TRUNCATED_MAC( policy_alg, n ), length - 1 ),
364 PSA_ALG_AT_LEAST_THIS_LENGTH_MAC( alg, length - 1) );
366 PSA_ALG_TRUNCATED_MAC( policy_alg, n ), length ),
367 PSA_ALG_AT_LEAST_THIS_LENGTH_MAC( alg, length ) );
380 size_t length = length_arg;
389 test_mac_algorithm( alg_arg, ALG_IS_HMAC, length,
390 PSA_KEY_TYPE_HMAC, PSA_BYTES_TO_BITS( length ) );
392 for( n = 1; n <= length; n++ )
442 * the length of the outer truncation (even if the outer length is
443 * smaller than the inner length). */
453 * gives the length of the outer truncation (even if the outer length is
454 * smaller than the inner length). */
466 /* At-leat-this-length versions */
475 * gives the length of the outer truncation (even if the outer length is
476 * smaller than the inner length). */
486 * gives the length of the outer truncation (even if the outer length is
487 * smaller than the inner length). */
669 for PSA_ROUND_UP_TO_MULTIPLE(block_size, length) in crypto_sizes.h. */