Lines Matching refs:length
197 size_t length)
212 TEST_EQUAL(length, PSA_MAC_LENGTH(key_type, key_bits, alg));
237 /* Tag length */
254 size_t length = length_arg;
288 /* Hash length */
289 TEST_EQUAL(length, PSA_HASH_LENGTH(alg));
290 TEST_ASSERT(length <= PSA_HASH_MAX_SIZE);
300 size_t length = length_arg;
306 key_type, key_bits, length);
308 TEST_ASSERT(length <= PSA_MAC_MAX_SIZE);
311 for (n = 1; n <= length; n++) {
316 /* Check that calling PSA_ALG_TRUNCATED_MAC twice gives the length
317 * of the outer truncation (even if the outer length is smaller than
318 * the inner length). */
321 TEST_EQUAL(PSA_ALG_TRUNCATED_MAC(truncated_alg, length - 1),
322 PSA_ALG_TRUNCATED_MAC(alg, length - 1));
323 TEST_EQUAL(PSA_ALG_TRUNCATED_MAC(truncated_alg, length),
324 PSA_ALG_TRUNCATED_MAC(alg, length));
328 * length of the outer truncation (even if the outer length is smaller
329 * than the inner length). */
334 PSA_ALG_AT_LEAST_THIS_LENGTH_MAC(truncated_alg, n), length - 1),
335 PSA_ALG_TRUNCATED_MAC(alg, length - 1));
337 PSA_ALG_AT_LEAST_THIS_LENGTH_MAC(truncated_alg, n), length),
338 PSA_ALG_TRUNCATED_MAC(alg, length));
341 /* At-leat-this-length versions */
342 for (n = 1; n <= length; n++) {
348 * length of the outer truncation (even if the outer length is smaller
349 * than the inner length). */
352 TEST_EQUAL(PSA_ALG_AT_LEAST_THIS_LENGTH_MAC(policy_alg, length - 1),
353 PSA_ALG_AT_LEAST_THIS_LENGTH_MAC(alg, length - 1));
354 TEST_EQUAL(PSA_ALG_AT_LEAST_THIS_LENGTH_MAC(policy_alg, length),
355 PSA_ALG_AT_LEAST_THIS_LENGTH_MAC(alg, length));
358 * earlier constructed with PSA_ALG_TRUNCATED_MAC gives the length of
359 * the outer truncation (even if the outer length is smaller than the
360 * inner length). */
365 PSA_ALG_TRUNCATED_MAC(policy_alg, n), length - 1),
366 PSA_ALG_AT_LEAST_THIS_LENGTH_MAC(alg, length - 1));
368 PSA_ALG_TRUNCATED_MAC(policy_alg, n), length),
369 PSA_ALG_AT_LEAST_THIS_LENGTH_MAC(alg, length));
382 size_t length = length_arg;
391 test_mac_algorithm(alg_arg, ALG_IS_HMAC, length,
392 PSA_KEY_TYPE_HMAC, PSA_BYTES_TO_BITS(length));
394 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). */
467 /* 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). */
667 for PSA_ROUND_UP_TO_MULTIPLE(block_size, length) in crypto_sizes.h. */