Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 115) sorted by relevance

12345

/mbedtls-latest/tests/suites/
Dtest_suite_asn1parse.data1 Empty length
4 Incomplete length
7 Prefixes of OCTET STRING, length=0
10 Prefixes of OCTET STRING, length=0 (0 length bytes)
13 Prefixes of OCTET STRING, length=1
16 Prefixes of OCTET STRING, length=2
19 Prefixes of BOOLEAN, length=0
22 Prefixes of BOOLEAN, length=1
25 Prefixes of BOOLEAN, length=2
28 Prefixes of INTEGER, length=1
[all …]
Dtest_suite_pkcs7.data169 PKCS7 Parse Failure Invalid ASN1: Change length from 1280 to 1281 #23.0
181 PKCS7 Parse Failure Invalid ASN1: Change length from 9 to 10 #26.0
185 PKCS7 Parse Failure Invalid ASN1: Change length from 9 to 8 #27.0
193 PKCS7 Parse Failure Invalid ASN1: Change length from 1265 to 1266 #29.0
201 PKCS7 Parse Failure Invalid ASN1: Change length from 1265 to 1264 #31.0
209 PKCS7 Parse Failure Invalid ASN1: Change length from 1261 to 1262 #33.0
217 PKCS7 Parse Failure Invalid ASN1: Change length from 1261 to 1260 #35.0
225 PKCS7 Parse Failure Invalid ASN1: Change length from 1 to 2 #37.0
229 PKCS7 Parse Failure Invalid ASN1: Change length from 1 to 0 #38.0
237 PKCS7 Parse Failure Invalid ASN1: Change length from 15 to 16 #40.0
[all …]
Dtest_suite_common.data1 Block xor, length 0
4 Block xor, length 1
7 Block xor, length 3
10 Block xor, length 4
13 Block xor, length 7
16 Block xor, length 8
19 Block xor, length 16
22 Block xor, length 64
25 Block xor, length 256
28 Block xor, length 257
[all …]
Dtest_suite_psa_crypto_metadata.function197 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);
[all …]
Dtest_suite_psa_crypto_low_hash.function32 size_t length = SIZE_MAX;
37 output, output_size, &length),
39 ASSERT_COMPARE(expected->x, expected->len, output, length);
47 output, output_size, &length),
49 ASSERT_COMPARE(expected->x, expected->len, output, length);
70 size_t length = SIZE_MAX;
97 output, output_size, &length),
99 ASSERT_COMPARE(expected2->x, expected2->len, output, length);
106 output, output_size, &length),
108 ASSERT_COMPARE(expected1->x, expected1->len, output, length);
[all …]
Dtest_suite_asn1write.data139 ASN.1 Write OCTET STRING: length=0
142 ASN.1 Write OCTET STRING: length=1
145 ASN.1 Write OCTET STRING: length=2
148 ASN.1 Write OCTET STRING: length=127
151 ASN.1 Write OCTET STRING: length=128
154 ASN.1 Write OCTET STRING: length=255
157 ASN.1 Write OCTET STRING: length=256
160 ASN.1 Write UTF8 STRING: length=0
163 ASN.1 Write UTF8 STRING: length=1
166 ASN.1 Write UTF8 STRING: length=128
[all …]
Dtest_suite_psa_crypto_memory.function105 local_input.buffer, local_input.length);
120 local_input.length = input_len;
121 TEST_CALLOC(local_input.buffer, local_input.length);
126 TEST_EQUAL(local_input.length, 0);
131 local_input.length = 0;
148 TEST_MEMORY_COMPARE(local_input.buffer, local_input.length,
154 TEST_EQUAL(local_input.length, 0);
174 TEST_EQUAL(local_output.length, output_len);
181 local_output.length = 0;
201 local_output.length = output_len;
[all …]
Dtest_suite_ecjpake.data25 ECJPAKE round one: KKP1: length of first point too small
28 ECJPAKE round one: KKP1: length of first point too big
43 ECJPAKE round one: KKP1: length of second point too small
46 ECJPAKE round one: KKP1: length of second point too big
58 ECJPAKE round one: KKP1: zero-length r
73 ECJPAKE round one: KKP2: length of first point too small
76 ECJPAKE round one: KKP2: length of first point too big
91 ECJPAKE round one: KKP2: length of second point too small
94 ECJPAKE round one: KKP2: length of second point too big
106 ECJPAKE round one: KKP2: zero-length r
[all …]
Dtest_suite_psa_crypto_op_fail.function52 size_t length = SIZE_MAX;
60 output, sizeof(output), &length));
83 size_t length = SIZE_MAX;
103 output, sizeof(output), &length));
129 size_t length = SIZE_MAX;
149 output, sizeof(output), &length));
153 output, sizeof(output), &length));
175 size_t length = SIZE_MAX;
196 output, sizeof(output), &length));
201 output, sizeof(output), &length));
[all …]
Dtest_suite_cipher.function368 size_t length = length_val, outlen, total_len, i, block_size, iv_len;
425 iv_len = 13; /* For CCM, IV length is expected to be between 7 and 13 bytes.
426 * For CCM*-NO-TAG, IV length must be exactly 13 bytes long. */
452 /* encode length number of bytes from inbuf */
453 TEST_ASSERT(0 == mbedtls_cipher_update(&ctx_enc, inbuf, length, encbuf, &outlen));
456 TEST_ASSERT(total_len == length ||
458 total_len < length &&
459 total_len + block_size > length));
468 TEST_ASSERT(total_len == length ||
470 total_len > length &&
[all …]
Dtest_suite_psa_crypto_util.data85 ECDSA DER -> Raw, 256bit, Invalid sequence length
93 ECDSA DER -> Raw, 256bit, Wrong r integer length (1 byte smaller than the actual size)
97 ECDSA DER -> Raw, 256bit, Wrong r integer length (1 byte larger than the actual size)
101 ECDSA DER -> Raw, 256bit, Wrong s integer length (1 byte smaller than the actual size)
105 ECDSA DER -> Raw, 256bit, Wrong s integer length (1 byte larger than the actual size)
133 ECDSA DER -> Raw, 256bit, Invalid 0-length r
137 ECDSA DER -> Raw, 256bit, Invalid 0-length s
153 # 512/521 bit sizes are useful to test sequence's length encoded with 2 bytes.
158 # 512/521 bit sizes are useful to test sequence's length encoded with 2 bytes.
163 # 512/521 bit sizes are useful to test sequence's length encoded with 2 bytes.
[all …]
Dtest_suite_entropy.data25 Entropy output length: 0
28 Entropy output length: 1
31 Entropy output length: 2
34 Entropy output length: 31
37 Entropy output length: 65 > BLOCK_SIZE
Dtest_suite_ccm.function353 /* Calculate tag length */
436 /* Calculate tag length */
585 // use hardcoded values for msg length and tag length. They are not a part of this test
586 // subtract 1 from configured auth data length to provoke an overflow
608 // use hardcoded values for msg length and tag length. They are not a part of this test
632 // use hardcoded value for tag length. It is not a part of this test
660 // use hardcoded values for msg length and tag length. They are not a part of this test
688 // use hardcoded values for msg length and tag length. They are not a part of this test
718 // use hardcoded values for msg length and tag length. They are not a part of this test
745 // use hardcoded value for tag length. It is a not a part of this test
[all …]
Dtest_suite_x509parse.data1275 X509 CRT ASN1 (inv Certificate, no length)
1278 X509 CRT ASN1 (inv Certificate, bad length encoding)
1281 X509 CRT ASN1 (inv Certificate, length data incomplete)
1284 X509 CRT ASN1 (inv Certificate, length out of bounds)
1290 X509 CRT ASN1 (inv TBS, length missing)
1293 X509 CRT ASN1 (inv TBS, invalid length encoding)
1296 X509 CRT ASN1 (inv TBS, length data incomplete)
1299 X509 CRT ASN1 (inv TBS, length out of bounds)
1310 X509 CRT ASN1 (TBS, valid outer version tag, no outer length)
1318 X509 CRT ASN1 (TBS, valid inner version tag, no inner length)
[all …]
/mbedtls-latest/programs/psa/
Dpsa_constant_names.c45 const char *string, size_t length) in append() argument
47 *required_size += length; in append()
49 memcpy(*buffer, string, length); in append()
50 *buffer += length; in append()
73 const char *string, size_t length, in append_with_curve() argument
77 append(buffer, buffer_size, required_size, string, length); in append_with_curve()
91 const char *string, size_t length, in append_with_group() argument
95 append(buffer, buffer_size, required_size, string, length); in append_with_group()
133 size_t length = strlen(name); in psa_snprint_status() local
134 if (length < buffer_size) { in psa_snprint_status()
[all …]
/mbedtls-latest/library/
Dcipher_wrap.c170 static int aes_crypt_cbc_wrap(void *ctx, mbedtls_operation_t operation, size_t length, in aes_crypt_cbc_wrap() argument
173 return mbedtls_aes_crypt_cbc((mbedtls_aes_context *) ctx, operation, length, iv, input, in aes_crypt_cbc_wrap()
180 size_t length, size_t *iv_off, unsigned char *iv, in aes_crypt_cfb128_wrap() argument
183 return mbedtls_aes_crypt_cfb128((mbedtls_aes_context *) ctx, operation, length, iv_off, iv, in aes_crypt_cfb128_wrap()
189 static int aes_crypt_ofb_wrap(void *ctx, size_t length, size_t *iv_off, in aes_crypt_ofb_wrap() argument
192 return mbedtls_aes_crypt_ofb((mbedtls_aes_context *) ctx, length, iv_off, in aes_crypt_ofb_wrap()
198 static int aes_crypt_ctr_wrap(void *ctx, size_t length, size_t *nc_off, in aes_crypt_ctr_wrap() argument
202 return mbedtls_aes_crypt_ctr((mbedtls_aes_context *) ctx, length, nc_off, nonce_counter, in aes_crypt_ctr_wrap()
209 size_t length, in aes_crypt_xts_wrap() argument
228 return mbedtls_aes_crypt_xts(xts_ctx, mode, length, in aes_crypt_xts_wrap()
[all …]
Dccm.c512 static int ccm_auth_crypt(mbedtls_ccm_context *ctx, int mode, size_t length, in ccm_auth_crypt() argument
525 if ((ret = mbedtls_ccm_set_lengths(ctx, add_len, length, tag_len)) != 0) { in ccm_auth_crypt()
533 if ((ret = mbedtls_ccm_update(ctx, input, length, in ccm_auth_crypt()
534 output, length, &olen)) != 0) { in ccm_auth_crypt()
548 int mbedtls_ccm_star_encrypt_and_tag(mbedtls_ccm_context *ctx, size_t length, in mbedtls_ccm_star_encrypt_and_tag() argument
554 return ccm_auth_crypt(ctx, MBEDTLS_CCM_STAR_ENCRYPT, length, iv, iv_len, in mbedtls_ccm_star_encrypt_and_tag()
558 int mbedtls_ccm_encrypt_and_tag(mbedtls_ccm_context *ctx, size_t length, in mbedtls_ccm_encrypt_and_tag() argument
564 return ccm_auth_crypt(ctx, MBEDTLS_CCM_ENCRYPT, length, iv, iv_len, in mbedtls_ccm_encrypt_and_tag()
585 static int ccm_auth_decrypt(mbedtls_ccm_context *ctx, int mode, size_t length, in ccm_auth_decrypt() argument
594 if ((ret = ccm_auth_crypt(ctx, mode, length, in ccm_auth_decrypt()
[all …]
Dcipher_wrap.h84 int (*cbc_func)(void *ctx, mbedtls_operation_t mode, size_t length,
91 int (*cfb_func)(void *ctx, mbedtls_operation_t mode, size_t length, size_t *iv_off,
98 int (*ofb_func)(void *ctx, size_t length, size_t *iv_off,
106 int (*ctr_func)(void *ctx, size_t length, size_t *nc_off,
113 int (*xts_func)(void *ctx, mbedtls_operation_t mode, size_t length,
120 int (*stream_func)(void *ctx, size_t length,
Ddes.c628 size_t length, in mbedtls_des_crypt_cbc() argument
636 if (length % 8) { in mbedtls_des_crypt_cbc()
641 while (length > 0) { in mbedtls_des_crypt_cbc()
652 length -= 8; in mbedtls_des_crypt_cbc()
655 while (length > 0) { in mbedtls_des_crypt_cbc()
668 length -= 8; in mbedtls_des_crypt_cbc()
726 size_t length, in mbedtls_des3_crypt_cbc() argument
734 if (length % 8) { in mbedtls_des3_crypt_cbc()
739 while (length > 0) { in mbedtls_des3_crypt_cbc()
750 length -= 8; in mbedtls_des3_crypt_cbc()
[all …]
Dcamellia.c521 size_t length, in mbedtls_camellia_crypt_cbc() argument
531 if (length % 16) { in mbedtls_camellia_crypt_cbc()
536 while (length > 0) { in mbedtls_camellia_crypt_cbc()
546 length -= 16; in mbedtls_camellia_crypt_cbc()
549 while (length > 0) { in mbedtls_camellia_crypt_cbc()
557 length -= 16; in mbedtls_camellia_crypt_cbc()
571 size_t length, in mbedtls_camellia_crypt_cfb128() argument
589 while (length--) { in mbedtls_camellia_crypt_cfb128()
601 while (length--) { in mbedtls_camellia_crypt_cfb128()
623 size_t length, in mbedtls_camellia_crypt_ctr() argument
[all …]
Dchachapoly.c246 size_t length, in chachapoly_crypt_and_tag() argument
266 ret = mbedtls_chachapoly_update(ctx, length, input, output); in chachapoly_crypt_and_tag()
278 size_t length, in mbedtls_chachapoly_encrypt_and_tag() argument
287 length, nonce, aad, aad_len, in mbedtls_chachapoly_encrypt_and_tag()
292 size_t length, in mbedtls_chachapoly_auth_decrypt() argument
305 MBEDTLS_CHACHAPOLY_DECRYPT, length, nonce, in mbedtls_chachapoly_auth_decrypt()
314 mbedtls_platform_zeroize(output, length); in mbedtls_chachapoly_auth_decrypt()
Daria.c514 size_t length, in mbedtls_aria_crypt_cbc() argument
525 if (length % MBEDTLS_ARIA_BLOCKSIZE) { in mbedtls_aria_crypt_cbc()
530 while (length > 0) { in mbedtls_aria_crypt_cbc()
540 length -= MBEDTLS_ARIA_BLOCKSIZE; in mbedtls_aria_crypt_cbc()
543 while (length > 0) { in mbedtls_aria_crypt_cbc()
551 length -= MBEDTLS_ARIA_BLOCKSIZE; in mbedtls_aria_crypt_cbc()
565 size_t length, in mbedtls_aria_crypt_cfb128() argument
587 while (length--) { in mbedtls_aria_crypt_cfb128()
599 while (length--) { in mbedtls_aria_crypt_cfb128()
621 size_t length, in mbedtls_aria_crypt_ctr() argument
[all …]
Dpsa_crypto_pake.c290 size_t length; in mbedtls_psa_pake_output_internal() local
354 length = operation->buffer[operation->buffer_offset]; in mbedtls_psa_pake_output_internal()
357 if (operation->buffer_offset + length > operation->buffer_length) { in mbedtls_psa_pake_output_internal()
361 if (output_size < length) { in mbedtls_psa_pake_output_internal()
367 length); in mbedtls_psa_pake_output_internal()
368 *output_length = length; in mbedtls_psa_pake_output_internal()
370 operation->buffer_offset += length; in mbedtls_psa_pake_output_internal()
/mbedtls-latest/include/mbedtls/
Daes.h297 size_t length,
342 size_t length,
391 size_t length,
436 size_t length,
490 size_t length,
573 size_t length,
/mbedtls-latest/docs/architecture/psa-migration/
Dpsa-limitations.md100 - a salt length
106 discrepancies in handling the salt length and which of the various hash
115 - salt length: always using the maximum legal value
119 - salt length: specified explicitly
123 - salt length: any valid length accepted
127 - expected salt length: specified explicitly, can specify "ANY"
133 - expected salt length: specified explicitly, can specify "ANY"
137 - salt length can be either "standard" (<= hashlen, see note) or "any"
139 - salt length: always <= hashlen (see note) and random salt
141 - salt length: either <= hashlen (see note), or any depending on algorithm
[all …]

12345