Home
last modified time | relevance | path

Searched refs:hash (Results 1 – 25 of 139) sorted by relevance

123456

/lib/mbedtls/external/mbedtls/tests/suites/
A Dtest_suite_psa_crypto_hash.data285 PSA hash verify: SHA-1
289 PSA hash verify: SHA-224
293 PSA hash verify: SHA-256
297 PSA hash verify: SHA-384
301 PSA hash verify: SHA-512
305 PSA hash verify: MD5
309 PSA hash verify: RIPEMD160
313 PSA hash verify: SHA3-224
317 PSA hash verify: SHA3-256
321 PSA hash verify: SHA3-384
[all …]
A Dtest_suite_ecdsa.function125 TEST_EQUAL(mbedtls_ecdsa_verify(&grp, hash->x, hash->len,
129 TEST_EQUAL(mbedtls_ecdsa_verify(&grp, hash->x, hash->len,
136 TEST_EQUAL(mbedtls_ecdsa_verify(&grp, hash->x, hash->len, &Q,
138 TEST_EQUAL(mbedtls_ecdsa_verify(&grp, hash->x, hash->len, &Q,
140 TEST_EQUAL(mbedtls_ecdsa_verify(&grp, hash->x, hash->len, &Q,
146 TEST_EQUAL(mbedtls_ecdsa_verify(&grp, hash->x, hash->len, &Q,
213 hash->x, hash->len, md_alg,
242 memset(hash, 0, sizeof(hash));
252 hash, sizeof(hash),
307 memset(hash, 0, sizeof(hash));
[all …]
A Dtest_suite_shax.function18 TEST_ASSERT(mbedtls_test_hexcmp(output, hash->x, 20, hash->len) == 0);
52 TEST_EQUAL(mbedtls_test_hexcmp(output, hash->x, 28, hash->len), 0);
66 TEST_EQUAL(mbedtls_test_hexcmp(output, hash->x, 32, hash->len), 0);
100 TEST_EQUAL(mbedtls_test_hexcmp(output, hash->x, 48, hash->len), 0);
114 TEST_EQUAL(mbedtls_test_hexcmp(output, hash->x, 64, hash->len), 0);
158 TEST_CALLOC(output, hash->len);
162 TEST_MEMORY_COMPARE(output, hash->len, hash->x, hash->len);
199 TEST_CALLOC(output, hash->len);
210 TEST_MEMORY_COMPARE(output, hash->len, hash->x, hash->len);
222 unsigned char hash[64];
[all …]
A Dtest_suite_md.function209 TEST_MEMORY_COMPARE(output, mbedtls_md_get_size(md_info), hash->x, hash->len);
230 TEST_MEMORY_COMPARE(output, mbedtls_md_get_size(md_info), hash->x, hash->len);
239 data_t *hash)
272 TEST_MEMORY_COMPARE(output, mbedtls_md_get_size(md_info), hash->x, hash->len);
279 TEST_MEMORY_COMPARE(output, mbedtls_md_get_size(md_info), hash->x, hash->len);
319 TEST_MEMORY_COMPARE(output, mbedtls_md_get_size(md_info), hash->x, hash->len);
326 TEST_MEMORY_COMPARE(output, mbedtls_md_get_size(md_info), hash->x, hash->len);
352 TEST_MEMORY_COMPARE(output, trunc_size, hash->x, hash->len);
387 TEST_MEMORY_COMPARE(output, trunc_size, hash->x, hash->len);
397 TEST_MEMORY_COMPARE(output, trunc_size, hash->x, hash->len);
[all …]
A Dtest_suite_mdx.function7 void md5_text(char *text_src_string, data_t *hash)
21 TEST_ASSERT(mbedtls_test_hexcmp(output, hash->x,
22 sizeof(output), hash->len) == 0);
27 void ripemd160_text(char *text_src_string, data_t *hash)
41 TEST_ASSERT(mbedtls_test_hexcmp(output, hash->x,
42 sizeof(output), hash->len) == 0);
A Dtest_suite_oid.data61 OID hash id - id-md5
65 OID hash id - id-sha1
69 OID hash id - id-sha224
73 OID hash id - id-sha256
77 OID hash id - id-sha384
81 OID hash id - id-sha512
85 OID hash id - id-sha3-224
89 OID hash id - id-sha3-256
93 OID hash id - id-sha3-384
97 OID hash id - id-sha3-512
[all …]
A Dtest_suite_pkcs1_v21.function12 int hash, data_t *message_str, data_t *rnd_buf,
30 MBEDTLS_RSA_PKCS_V21, hash) == 0);
34 TEST_EQUAL(mbedtls_rsa_get_md_alg(&ctx), hash);
63 data_t *input_N, data_t *input_E, int hash,
81 MBEDTLS_RSA_PKCS_V21, hash) == 0);
84 TEST_EQUAL(mbedtls_rsa_get_md_alg(&ctx), hash);
128 int hash, data_t *hash_digest, data_t *rnd_buf,
148 MBEDTLS_RSA_PKCS_V21, hash) == 0);
151 TEST_EQUAL(mbedtls_rsa_get_md_alg(&ctx), hash);
195 int digest, int hash, data_t *hash_digest,
[all …]
/lib/mbedtls/external/mbedtls/tests/src/drivers/
A Dtest_driver_signature.c46 const uint8_t *hash, in sign_hash() argument
101 (void) hash; in sign_hash()
114 const uint8_t *hash, in verify_hash() argument
168 (void) hash; in verify_hash()
188 uint8_t hash[PSA_HASH_MAX_SIZE]; in mbedtls_test_transparent_signature_sign_message() local
212 hash, sizeof(hash), &hash_length); in mbedtls_test_transparent_signature_sign_message()
216 hash, sizeof(hash), &hash_length); in mbedtls_test_transparent_signature_sign_message()
279 hash, sizeof(hash), &hash_length); in mbedtls_test_transparent_signature_verify_message()
283 hash, sizeof(hash), &hash_length); in mbedtls_test_transparent_signature_verify_message()
359 (void) hash; in mbedtls_test_opaque_signature_sign_hash()
[all …]
A Dhash.c25 uint8_t *hash, size_t hash_size, size_t *hash_length) in mbedtls_test_transparent_hash_compute() argument
38 hash, hash_size, hash_length); in mbedtls_test_transparent_hash_compute()
43 hash, hash_size, hash_length); in mbedtls_test_transparent_hash_compute()
48 (void) hash; in mbedtls_test_transparent_hash_compute()
145 uint8_t *hash, in mbedtls_test_transparent_hash_finish() argument
159 operation, hash, hash_size, hash_length); in mbedtls_test_transparent_hash_finish()
162 mbedtls_psa_hash_finish(operation, hash, hash_size, hash_length); in mbedtls_test_transparent_hash_finish()
165 (void) hash; in mbedtls_test_transparent_hash_finish()
/lib/
A Doid_registry.c34 unsigned i, j, k, hash; in look_up_OID() local
38 hash = datasize - 1; in look_up_OID()
41 hash += octets[i] * 33; in look_up_OID()
42 hash = (hash >> 24) ^ (hash >> 16) ^ (hash >> 8) ^ hash; in look_up_OID()
43 hash &= 0xff; in look_up_OID()
54 xhash = oid_search_table[j].hash; in look_up_OID()
55 if (xhash > hash) { in look_up_OID()
59 if (xhash < hash) { in look_up_OID()
/lib/mbedtls/external/mbedtls/programs/psa/
A Dpsa_hash.c62 uint8_t hash[PSA_HASH_LENGTH(HASH_ALG)]; in main() local
97 status = psa_hash_finish(&hash_operation, hash, sizeof(hash), &hash_length); in main()
105 (memcmp(hash, expected_hash, expected_hash_len) != 0)) { in main()
121 memset(hash, 0, sizeof(hash)); in main()
127 hash, sizeof(hash), in main()
135 (memcmp(hash, expected_hash, expected_hash_len) != 0)) { in main()
146 mbedtls_printf("%02x", hash[j]); in main()
/lib/mbedtls/external/mbedtls/programs/ssl/
A Dssl_test_common_source.c273 #define MBEDTLS_SSL_SIG_ALG(hash) ((hash << 8) | MBEDTLS_SSL_SIG_ECDSA), \ argument
274 ((hash << 8) | MBEDTLS_SSL_SIG_RSA), \
275 (0x800 | hash),
277 #define MBEDTLS_SSL_SIG_ALG(hash) ((hash << 8) | MBEDTLS_SSL_SIG_ECDSA), \ argument
278 ((hash << 8) | MBEDTLS_SSL_SIG_RSA),
281 #define MBEDTLS_SSL_SIG_ALG(hash) ((hash << 8) | MBEDTLS_SSL_SIG_ECDSA), argument
285 #define MBEDTLS_SSL_SIG_ALG(hash) ((hash << 8) | MBEDTLS_SSL_SIG_RSA), \ argument
286 (0x800 | hash),
288 #define MBEDTLS_SSL_SIG_ALG(hash) ((hash << 8) | MBEDTLS_SSL_SIG_RSA), argument
291 #define MBEDTLS_SSL_SIG_ALG(hash) argument
/lib/rsa/
A Drsa-verify.c64 const uint8_t *hash, int hash_len) in padding_pkcs_15_verify() argument
167 const uint8_t *hash, int hash_len, in compute_hash_prime() argument
176 region[1].data = hash; in compute_hash_prime()
210 const uint8_t *hash, int hash_len) in padding_pss_verify() argument
287 hash, hash_len, in padding_pss_verify()
326 const uint32_t sig_len, const uint8_t *hash, in rsa_verify_key() argument
437 const void *hash, uint8_t *sig, in rsa_verify_with_keynode() argument
489 const void *hash, uint8_t *sig, in rsa_verify_with_keynode() argument
552 ret = rsa_verify_with_keynode(info, hash, in rsa_verify_hash()
570 uint8_t hash[info->crypto->key_len]; in rsa_verify() local
[all …]
/lib/efi_loader/
A Defi_signature.c140 if (!*hash) { in efi_hash_regions()
142 if (!*hash) { in efi_hash_regions()
206 void *hash = NULL; in efi_signature_lookup_digest() local
256 free(hash); in efi_signature_lookup_digest()
261 free(hash); in efi_signature_lookup_digest()
262 hash = NULL; in efi_signature_lookup_digest()
341 free(hash); in efi_lookup_certificate()
428 void *hash = NULL; in efi_signature_check_revocation() local
480 free(hash); in efi_signature_check_revocation()
483 free(hash); in efi_signature_check_revocation()
[all …]
/lib/mbedtls/external/mbedtls/library/
A Dpk_wrap.c150 hash, sig)) != 0) { in rsa_verify_wrap()
210 status = psa_sign_hash(key_id, alg, hash, hash_len, in mbedtls_pk_psa_rsa_sign_ext()
274 hash, sig); in rsa_sign_wrap()
629 hash, hash_len, sig, sig_len); in ecdsa_opaque_verify_wrap()
643 hash, hash_len, sig, sig_len); in ecdsa_verify_wrap()
1197 hash, hash_len, sig, sig_len, in ecdsa_verify_rs_wrap()
1340 unsigned char hash[32]; in rsa_alt_check_pair() local
1348 memset(hash, 0x2a, sizeof(hash)); in rsa_alt_check_pair()
1351 hash, sizeof(hash), in rsa_alt_check_pair()
1358 hash, sizeof(hash), sig, sig_len) != 0) { in rsa_alt_check_pair()
[all …]
A Dpsa_crypto_hash.c342 uint8_t *hash, in mbedtls_psa_hash_finish() argument
357 memset(hash, '!', hash_size); in mbedtls_psa_hash_finish()
368 ret = mbedtls_md5_finish(&operation->ctx.md5, hash); in mbedtls_psa_hash_finish()
378 ret = mbedtls_sha1_finish(&operation->ctx.sha1, hash); in mbedtls_psa_hash_finish()
383 ret = mbedtls_sha256_finish(&operation->ctx.sha256, hash); in mbedtls_psa_hash_finish()
388 ret = mbedtls_sha256_finish(&operation->ctx.sha256, hash); in mbedtls_psa_hash_finish()
393 ret = mbedtls_sha512_finish(&operation->ctx.sha512, hash); in mbedtls_psa_hash_finish()
398 ret = mbedtls_sha512_finish(&operation->ctx.sha512, hash); in mbedtls_psa_hash_finish()
417 ret = mbedtls_sha3_finish(&operation->ctx.sha3, hash, hash_size); in mbedtls_psa_hash_finish()
421 (void) hash; in mbedtls_psa_hash_finish()
[all …]
A Dpk_wrap.h37 const unsigned char *hash, size_t hash_len,
42 const unsigned char *hash, size_t hash_len,
50 const unsigned char *hash, size_t hash_len,
56 const unsigned char *hash, size_t hash_len,
131 const unsigned char *hash, size_t hash_len,
A Dsha3.c541 uint8_t hash[64]; in mbedtls_sha3_kat_test() local
546 hash, sizeof(hash)); in mbedtls_sha3_kat_test()
558 result = memcmp(hash, test_hash_sha3_224[test_num], 28); in mbedtls_sha3_kat_test()
561 result = memcmp(hash, test_hash_sha3_256[test_num], 32); in mbedtls_sha3_kat_test()
564 result = memcmp(hash, test_hash_sha3_384[test_num], 48); in mbedtls_sha3_kat_test()
594 unsigned char hash[64]; in mbedtls_sha3_long_kat_test() local
624 result = mbedtls_sha3_finish(&ctx, hash, sizeof(hash)); in mbedtls_sha3_long_kat_test()
635 result = memcmp(hash, long_kat_hash_sha3_224, 28); in mbedtls_sha3_long_kat_test()
638 result = memcmp(hash, long_kat_hash_sha3_256, 32); in mbedtls_sha3_long_kat_test()
641 result = memcmp(hash, long_kat_hash_sha3_384, 48); in mbedtls_sha3_long_kat_test()
[all …]
A Dpk.c1085 return ctx->pk_info->verify_func(ctx, md_alg, hash, hash_len, in mbedtls_pk_verify_restartable()
1093 const unsigned char *hash, size_t hash_len, in mbedtls_pk_verify() argument
1190 status = psa_verify_hash(key_id, psa_sig_alg, hash, in mbedtls_pk_verify_ext()
1260 hash, hash_len, in mbedtls_pk_sign_restartable()
1279 hash, hash_len, in mbedtls_pk_sign_restartable()
1288 const unsigned char *hash, size_t hash_len, in mbedtls_pk_sign() argument
1292 return mbedtls_pk_sign_restartable(ctx, md_alg, hash, hash_len, in mbedtls_pk_sign()
1303 const unsigned char *hash, size_t hash_len, in mbedtls_pk_sign_ext() argument
1317 return mbedtls_pk_sign(ctx, md_alg, hash, hash_len, in mbedtls_pk_sign_ext()
1365 hash, hash_len, in mbedtls_pk_sign_ext()
[all …]
/lib/mbedtls/external/mbedtls/programs/pkey/
A Decdsa.c87 unsigned char hash[32]; in main() local
146 if ((ret = mbedtls_sha256(message, sizeof(message), hash, 0)) != 0) { in main()
153 dump_buf(" + Hash: ", hash, sizeof(hash)); in main()
162 hash, sizeof(hash), in main()
199 hash, sizeof(hash), in main()
/lib/mbedtls/external/mbedtls/programs/
A D.gitignore10 hash/generic_sum
11 hash/hello
12 hash/md_hmac_demo
13 hash/md5sum
14 hash/sha1sum
15 hash/sha2sum
/lib/mbedtls/external/mbedtls/include/mbedtls/
A Drsa.h856 const unsigned char *hash,
888 const unsigned char *hash,
940 const unsigned char *hash,
990 const unsigned char *hash,
1023 const unsigned char *hash,
1048 const unsigned char *hash,
1083 const unsigned char *hash,
1123 const unsigned char *hash,
/lib/ecdsa/
A Decdsa-verify.c64 const void *hash, const void *sig, uint sig_len) in ecdsa_verify_hash() argument
79 return ops->verify(dev, &key, hash, algo->checksum_len, in ecdsa_verify_hash()
93 ret = ops->verify(dev, &key, hash, algo->checksum_len, in ecdsa_verify_hash()
109 uint8_t hash[algo->checksum_len]; in ecdsa_verify() local
119 ret = algo->calculate(algo->name, region, region_count, hash); in ecdsa_verify()
123 return ecdsa_verify_hash(dev, info, hash, sig, sig_len); in ecdsa_verify()
/lib/mbedtls/external/mbedtls/docs/architecture/psa-migration/
A Dpsa-limitations.md96 the hash algorithm potentially used to hash the message being signed:
97 - a hash algorithm used for the encoding function
114 - encoding hash = MGF1 hash (from context, or argument = message hash)
118 - encoding hash = MGF1 hash (from context, or argument = message hash)
122 - encoding hash = MGF1 hash (from context, or argument = message hash)
126 - encoding hash = MGF1 hash from dedicated argument
132 - encoding hash = MGF1 hash, specified explicitly
154 hash), the MGF (and its hash if MGF1 is used), and the salt length (plus an
165 - encoding hash = message hashing algorithm (may differ from MGF1 hash)
173 Note: since X.509 parsing ensures that message hash = encoding hash, and
[all …]
/lib/mbedtls/external/mbedtls/3rdparty/p256-m/
A Dp256-m_driver_entrypoints.c208 const uint8_t *hash, in p256_transparent_sign_hash() argument
228 int ret = p256_ecdsa_sign(signature, key_buffer, hash, hash_length); in p256_transparent_sign_hash()
241 const uint8_t *hash, in p256_verify_hash_with_public_key() argument
256 int ret = p256_ecdsa_verify(signature, public_key_p256m, hash, hash_length); in p256_verify_hash_with_public_key()
266 const uint8_t *hash, in p256_transparent_verify_hash() argument
303 hash, in p256_transparent_verify_hash()

Completed in 63 milliseconds

123456