Home
last modified time | relevance | path

Searched refs:alg (Results 1 - 25 of 519) sorted by relevance

12345678910>>...21

/third_party/libwebsockets/lib/cose/
H A Dcose_sign_alg.c32 lws_cose_sig_alg_t *alg = lws_zalloc(sizeof(*alg), __func__); in lws_cose_sign_alg_create() local
38 if (!alg) in lws_cose_sign_alg_create()
41 alg->cose_alg = cose_alg; in lws_cose_sign_alg_create()
42 alg->cose_key = ck; in lws_cose_sign_alg_create()
51 alg->keybits = 256; in lws_cose_sign_alg_create()
56 alg->keybits = 384; in lws_cose_sign_alg_create()
61 alg->keybits = 521; in lws_cose_sign_alg_create()
70 if (lws_genhash_init(&alg->hash_ctx, gh)) in lws_cose_sign_alg_create()
73 if (lws_genecdsa_create(&alg in lws_cose_sign_alg_create()
169 lws_cose_sign_alg_hash(lws_cose_sig_alg_t *alg, const uint8_t *in, size_t in_len) lws_cose_sign_alg_hash() argument
196 lws_cose_sign_alg_complete(lws_cose_sig_alg_t *alg) lws_cose_sign_alg_complete() argument
[all...]
H A Dcose_validate_alg.c32 lws_cose_sig_alg_t *alg = lws_zalloc(sizeof(*alg), __func__); in lws_cose_val_alg_create() local
38 if (!alg) in lws_cose_val_alg_create()
41 alg->cose_alg = cose_alg; in lws_cose_val_alg_create()
42 alg->cose_key = ck; in lws_cose_val_alg_create()
51 alg->keybits = 256; in lws_cose_val_alg_create()
56 alg->keybits = 384; in lws_cose_val_alg_create()
61 alg->keybits = 521; in lws_cose_val_alg_create()
70 if (lws_genhash_init(&alg->hash_ctx, gh)) in lws_cose_val_alg_create()
73 if (lws_genecdsa_create(&alg in lws_cose_val_alg_create()
170 lws_cose_val_alg_hash(lws_cose_sig_alg_t *alg, const uint8_t *in, size_t in_len) lws_cose_val_alg_hash() argument
193 lws_cose_sig_alg_t *alg = *_alg; lws_cose_val_alg_destroy() local
[all...]
H A Dcose_sign.c55 lws_cose_sign_add(struct lws_cose_sign_context *csc, cose_param_t alg, in lws_cose_sign_add() argument
58 lws_cose_sig_alg_t *si = lws_cose_sign_alg_create(csc->info.cx, ck, alg, in lws_cose_sign_add()
88 lws_cose_sig_alg_t *alg = lws_container_of(p, in lws_cose_sign_hashing() local
91 if (lws_cose_sign_alg_hash(alg, in, in_len)) in lws_cose_sign_hashing()
92 alg->failed = 1; in lws_cose_sign_hashing()
111 lws_cose_sig_alg_t *alg; in lws_cose_sign_payload_chunk() local
129 alg = lws_container_of(csc->algs.head, lws_cose_sig_alg_t, list); in lws_cose_sign_payload_chunk()
131 switch (alg->cose_alg) { in lws_cose_sign_payload_chunk()
207 alg = lws_container_of(csc->algs.head, in lws_cose_sign_payload_chunk()
214 (long long)alg in lws_cose_sign_payload_chunk()
535 lws_cose_sig_alg_t *alg = lws_container_of(p, lws_cose_sign_destroy() local
[all...]
/third_party/mbedtls/include/psa/
H A Dcrypto_sizes.h52 * \param alg A hash algorithm (\c PSA_ALG_XXX value such that
53 * #PSA_ALG_IS_HASH(\p alg) is true), or an HMAC algorithm
60 #define PSA_HASH_LENGTH(alg) \
62 PSA_ALG_HMAC_GET_HASH(alg) == PSA_ALG_MD5 ? 16u : \
63 PSA_ALG_HMAC_GET_HASH(alg) == PSA_ALG_RIPEMD160 ? 20u : \
64 PSA_ALG_HMAC_GET_HASH(alg) == PSA_ALG_SHA_1 ? 20u : \
65 PSA_ALG_HMAC_GET_HASH(alg) == PSA_ALG_SHA_224 ? 28u : \
66 PSA_ALG_HMAC_GET_HASH(alg) == PSA_ALG_SHA_256 ? 32u : \
67 PSA_ALG_HMAC_GET_HASH(alg) == PSA_ALG_SHA_384 ? 48u : \
68 PSA_ALG_HMAC_GET_HASH(alg)
[all...]
H A Dcrypto_values.h439 * This size can be calculated with #PSA_HASH_LENGTH(\c alg) where
440 * \c alg is the HMAC algorithm or the underlying hash algorithm. */
797 #define PSA_ALG_IS_VENDOR_DEFINED(alg) \
798 (((alg) & PSA_ALG_VENDOR_FLAG) != 0)
802 * \param alg An algorithm identifier (value of type #psa_algorithm_t).
804 * \return 1 if \p alg is a hash algorithm, 0 otherwise.
805 * This macro may return either 0 or 1 if \p alg is not a supported
808 #define PSA_ALG_IS_HASH(alg) \
809 (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_HASH)
813 * \param alg A
[all...]
/third_party/mbedtls/library/
H A Dpsa_crypto_cipher.c30 psa_algorithm_t alg, in mbedtls_cipher_validate_values()
51 MBEDTLS_ASSUME(alg != PSA_ALG_AEAD_WITH_SHORTENED_TAG(PSA_ALG_CCM, 0)); in mbedtls_cipher_validate_values()
54 MBEDTLS_ASSUME(alg != PSA_ALG_AEAD_WITH_SHORTENED_TAG(PSA_ALG_GCM, 0)); in mbedtls_cipher_validate_values()
57 MBEDTLS_ASSUME(alg != PSA_ALG_STREAM_CIPHER); in mbedtls_cipher_validate_values()
60 MBEDTLS_ASSUME(alg != PSA_ALG_AEAD_WITH_SHORTENED_TAG(PSA_ALG_CHACHA20_POLY1305, 0)); in mbedtls_cipher_validate_values()
63 MBEDTLS_ASSUME(alg != PSA_ALG_CCM_STAR_NO_TAG); in mbedtls_cipher_validate_values()
66 MBEDTLS_ASSUME(alg != PSA_ALG_CTR); in mbedtls_cipher_validate_values()
69 MBEDTLS_ASSUME(alg != PSA_ALG_CFB); in mbedtls_cipher_validate_values()
72 MBEDTLS_ASSUME(alg != PSA_ALG_OFB); in mbedtls_cipher_validate_values()
75 MBEDTLS_ASSUME(alg ! in mbedtls_cipher_validate_values()
29 mbedtls_cipher_validate_values( psa_algorithm_t alg, psa_key_type_t key_type) mbedtls_cipher_validate_values() argument
126 mbedtls_cipher_values_from_psa( psa_algorithm_t alg, psa_key_type_t key_type, size_t *key_bits, mbedtls_cipher_mode_t *mode, mbedtls_cipher_id_t *cipher_id) mbedtls_cipher_values_from_psa() argument
258 mbedtls_cipher_info_from_psa( psa_algorithm_t alg, psa_key_type_t key_type, size_t key_bits, mbedtls_cipher_id_t *cipher_id) mbedtls_cipher_info_from_psa() argument
282 psa_cipher_setup( mbedtls_psa_cipher_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, mbedtls_operation_t cipher_operation) psa_cipher_setup() argument
360 mbedtls_psa_cipher_encrypt_setup( mbedtls_psa_cipher_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) mbedtls_psa_cipher_encrypt_setup() argument
371 mbedtls_psa_cipher_decrypt_setup( mbedtls_psa_cipher_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) mbedtls_psa_cipher_decrypt_setup() argument
604 mbedtls_psa_cipher_encrypt( const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *iv, size_t iv_length, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length) mbedtls_psa_cipher_encrypt() argument
662 mbedtls_psa_cipher_decrypt( const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length) mbedtls_psa_cipher_decrypt() argument
[all...]
H A Dpsa_crypto_mac.c43 hmac->alg = hash_alg; in psa_hmac_setup_internal()
117 psa_algorithm_t hash_alg = hmac->alg; in psa_hmac_finish_internal()
204 psa_algorithm_t alg) in mac_init()
208 operation->alg = alg; in mac_init()
211 if (PSA_ALG_FULL_LENGTH_MAC(operation->alg) == PSA_ALG_CMAC) { in mac_init()
217 if (PSA_ALG_IS_HMAC(operation->alg)) { in mac_init()
219 operation->ctx.hmac.alg = 0; in mac_init()
236 if (operation->alg == 0) { in mbedtls_psa_mac_abort()
243 if (PSA_ALG_FULL_LENGTH_MAC(operation->alg) in mbedtls_psa_mac_abort()
202 mac_init( mbedtls_psa_mac_operation_t *operation, psa_algorithm_t alg) mac_init() argument
271 psa_mac_setup(mbedtls_psa_mac_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) psa_mac_setup() argument
319 mbedtls_psa_mac_sign_setup( mbedtls_psa_mac_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) mbedtls_psa_mac_sign_setup() argument
330 mbedtls_psa_mac_verify_setup( mbedtls_psa_mac_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) mbedtls_psa_mac_verify_setup() argument
455 mbedtls_psa_mac_compute( const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *mac, size_t mac_size, size_t *mac_length) mbedtls_psa_mac_compute() argument
[all...]
H A Dpsa_crypto_aead.c31 psa_algorithm_t alg) in psa_aead_setup()
39 status = mbedtls_cipher_values_from_psa(alg, attributes->type, in psa_aead_setup()
45 switch (PSA_ALG_AEAD_WITH_SHORTENED_TAG(alg, 0)) { in psa_aead_setup()
48 operation->alg = PSA_ALG_CCM; in psa_aead_setup()
68 operation->alg = PSA_ALG_GCM; in psa_aead_setup()
88 operation->alg = PSA_ALG_CHACHA20_POLY1305; in psa_aead_setup()
90 if (alg != PSA_ALG_CHACHA20_POLY1305) { in psa_aead_setup()
112 operation->tag_length = PSA_ALG_AEAD_GET_TAG_LENGTH(alg); in psa_aead_setup()
120 psa_algorithm_t alg, in mbedtls_psa_aead_encrypt()
131 key_buffer_size, alg); in mbedtls_psa_aead_encrypt()
26 psa_aead_setup( mbedtls_psa_aead_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) psa_aead_setup() argument
117 mbedtls_psa_aead_encrypt( const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *nonce, size_t nonce_length, const uint8_t *additional_data, size_t additional_data_length, const uint8_t *plaintext, size_t plaintext_length, uint8_t *ciphertext, size_t ciphertext_size, size_t *ciphertext_length) mbedtls_psa_aead_encrypt() argument
229 mbedtls_psa_aead_decrypt( const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *nonce, size_t nonce_length, const uint8_t *additional_data, size_t additional_data_length, const uint8_t *ciphertext, size_t ciphertext_length, uint8_t *plaintext, size_t plaintext_size, size_t *plaintext_length) mbedtls_psa_aead_decrypt() argument
321 mbedtls_psa_aead_encrypt_setup( mbedtls_psa_aead_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) mbedtls_psa_aead_encrypt_setup() argument
342 mbedtls_psa_aead_decrypt_setup( mbedtls_psa_aead_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) mbedtls_psa_aead_decrypt_setup() argument
[all...]
H A Dpsa_crypto_driver_wrappers.c123 size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, in psa_driver_wrapper_sign_message()
136 status = mbedtls_test_transparent_signature_sign_message(attributes, key_buffer, key_buffer_size, alg, in psa_driver_wrapper_sign_message()
151 mbedtls_test_opaque_signature_sign_message(attributes, key_buffer, key_buffer_size, alg, input, in psa_driver_wrapper_sign_message()
164 return (psa_sign_message_builtin(attributes, key_buffer, key_buffer_size, alg, input, input_length, signature, in psa_driver_wrapper_sign_message()
169 size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, in psa_driver_wrapper_verify_message()
182 attributes, key_buffer, key_buffer_size, alg, input, input_length, signature, signature_length); in psa_driver_wrapper_verify_message()
194 return (mbedtls_test_opaque_signature_verify_message(attributes, key_buffer, key_buffer_size, alg, input, in psa_driver_wrapper_verify_message()
207 return (psa_verify_message_builtin(attributes, key_buffer, key_buffer_size, alg, input, input_length, signature, in psa_driver_wrapper_verify_message()
212 size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *hash, in psa_driver_wrapper_sign_hash()
226 return (drv->asymmetric->p_sign(drv_context, *((psa_key_slot_number_t *)key_buffer), alg, has in psa_driver_wrapper_sign_hash()
122 psa_driver_wrapper_sign_message(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *signature, size_t signature_size, size_t *signature_length) psa_driver_wrapper_sign_message() argument
168 psa_driver_wrapper_verify_message(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, const uint8_t *signature, size_t signature_length) psa_driver_wrapper_verify_message() argument
211 psa_driver_wrapper_sign_hash(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *hash, size_t hash_length, uint8_t *signature, size_t signature_size, size_t *signature_length) psa_driver_wrapper_sign_hash() argument
278 psa_driver_wrapper_verify_hash(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *hash, size_t hash_length, const uint8_t *signature, size_t signature_length) psa_driver_wrapper_verify_hash() argument
387 psa_driver_wrapper_sign_hash_start(psa_sign_hash_interruptible_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *hash, size_t hash_length) psa_driver_wrapper_sign_hash_start() argument
467 psa_driver_wrapper_verify_hash_start(psa_verify_hash_interruptible_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *hash, size_t hash_length, const uint8_t *signature, size_t signature_length) psa_driver_wrapper_verify_hash_start() argument
948 psa_driver_wrapper_cipher_encrypt(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *iv, size_t iv_length, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length) psa_driver_wrapper_cipher_encrypt() argument
1004 psa_driver_wrapper_cipher_decrypt(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length) psa_driver_wrapper_cipher_decrypt() argument
1057 psa_driver_wrapper_cipher_encrypt_setup(psa_cipher_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) psa_driver_wrapper_cipher_encrypt_setup() argument
1116 psa_driver_wrapper_cipher_decrypt_setup(psa_cipher_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) psa_driver_wrapper_cipher_decrypt_setup() argument
1296 psa_driver_wrapper_hash_compute(psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *hash, size_t hash_size, size_t *hash_length) psa_driver_wrapper_hash_compute() argument
1325 psa_driver_wrapper_hash_setup(psa_hash_operation_t *operation, psa_algorithm_t alg) psa_driver_wrapper_hash_setup() argument
1431 psa_driver_wrapper_aead_encrypt(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *nonce, size_t nonce_length, const uint8_t *additional_data, size_t additional_data_length, const uint8_t *plaintext, size_t plaintext_length, uint8_t *ciphertext, size_t ciphertext_size, size_t *ciphertext_length) psa_driver_wrapper_aead_encrypt() argument
1471 psa_driver_wrapper_aead_decrypt(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *nonce, size_t nonce_length, const uint8_t *additional_data, size_t additional_data_length, const uint8_t *ciphertext, size_t ciphertext_length, uint8_t *plaintext, size_t plaintext_size, size_t *plaintext_length) psa_driver_wrapper_aead_decrypt() argument
1511 psa_driver_wrapper_aead_encrypt_setup(psa_aead_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) psa_driver_wrapper_aead_encrypt_setup() argument
1551 psa_driver_wrapper_aead_decrypt_setup(psa_aead_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) psa_driver_wrapper_aead_decrypt_setup() argument
1814 psa_driver_wrapper_mac_compute(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *mac, size_t mac_size, size_t *mac_length) psa_driver_wrapper_mac_compute() argument
1867 psa_driver_wrapper_mac_sign_setup(psa_mac_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) psa_driver_wrapper_mac_sign_setup() argument
1925 psa_driver_wrapper_mac_verify_setup(psa_mac_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) psa_driver_wrapper_mac_verify_setup() argument
2085 psa_driver_wrapper_asymmetric_encrypt(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, const uint8_t *salt, size_t salt_length, uint8_t *output, size_t output_size, size_t *output_length) psa_driver_wrapper_asymmetric_encrypt() argument
2136 psa_driver_wrapper_asymmetric_decrypt(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, const uint8_t *salt, size_t salt_length, uint8_t *output, size_t output_size, size_t *output_length) psa_driver_wrapper_asymmetric_decrypt() argument
2187 psa_driver_wrapper_key_agreement(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *peer_key, size_t peer_key_length, uint8_t *shared_secret, size_t shared_secret_size, size_t *shared_secret_length) psa_driver_wrapper_key_agreement() argument
[all...]
/third_party/openssl/crypto/property/
H A Dproperty.c108 ALGORITHM *alg);
226 static void impl_cache_flush_alg(ossl_uintmax_t idx, ALGORITHM *alg) in impl_cache_flush_alg() argument
228 lh_QUERY_doall(alg->cache, &impl_cache_free); in impl_cache_flush_alg()
229 lh_QUERY_flush(alg->cache); in impl_cache_flush_alg()
294 static int ossl_method_store_insert(OSSL_METHOD_STORE *store, ALGORITHM *alg) in ossl_method_store_insert() argument
296 return ossl_sa_ALGORITHM_set(store->algs, alg->nid, alg); in ossl_method_store_insert()
304 ALGORITHM *alg = NULL; in ossl_method_store_add() local
347 alg = ossl_method_store_retrieve(store, nid); in ossl_method_store_add()
348 if (alg in ossl_method_store_add()
384 ALGORITHM *alg = NULL; ossl_method_store_remove() local
424 alg_cleanup_by_provider(ossl_uintmax_t idx, ALGORITHM *alg, void *arg) alg_cleanup_by_provider() argument
467 alg_do_one(ALGORITHM *alg, IMPLEMENTATION *impl, void (*fn)(int id, void *method, void *fnarg), void *fnarg) alg_do_one() argument
474 alg_copy(ossl_uintmax_t idx, ALGORITHM *alg, void *arg) alg_copy() argument
488 ALGORITHM *alg; ossl_method_store_do_all() local
520 ALGORITHM *alg; ossl_method_store_fetch() local
598 ossl_method_cache_flush_alg(OSSL_METHOD_STORE *store, ALGORITHM *alg) ossl_method_cache_flush_alg() argument
607 ALGORITHM *alg = ossl_method_store_retrieve(store, nid); ossl_method_cache_flush() local
664 impl_cache_flush_one_alg(ossl_uintmax_t idx, ALGORITHM *alg, void *v) impl_cache_flush_one_alg() argument
697 ALGORITHM *alg; ossl_method_store_cache_get() local
730 ALGORITHM *alg; ossl_method_store_cache_set() local
[all...]
/third_party/mbedtls/tests/src/drivers/
H A Dtest_driver_signature.c45 psa_algorithm_t alg, in sign_hash()
53 if (PSA_ALG_IS_RSA_PKCS1V15_SIGN(alg) || in sign_hash()
54 PSA_ALG_IS_RSA_PSS(alg)) { in sign_hash()
61 alg, hash, hash_length, in sign_hash()
68 alg, hash, hash_length, in sign_hash()
75 if (PSA_ALG_IS_ECDSA(alg)) { in sign_hash()
82 alg, hash, hash_length, in sign_hash()
89 alg, hash, hash_length, in sign_hash()
100 (void) alg; in sign_hash()
113 psa_algorithm_t alg, in verify_hash()
41 sign_hash( const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *hash, size_t hash_length, uint8_t *signature, size_t signature_size, size_t *signature_length) sign_hash() argument
109 verify_hash( const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *hash, size_t hash_length, const uint8_t *signature, size_t signature_length) verify_hash() argument
175 mbedtls_test_transparent_signature_sign_message( const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *signature, size_t signature_size, size_t *signature_length) mbedtls_test_transparent_signature_sign_message() argument
231 mbedtls_test_opaque_signature_sign_message( const psa_key_attributes_t *attributes, const uint8_t *key, size_t key_length, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *signature, size_t signature_size, size_t *signature_length) mbedtls_test_opaque_signature_sign_message() argument
255 mbedtls_test_transparent_signature_verify_message( const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, const uint8_t *signature, size_t signature_length) mbedtls_test_transparent_signature_verify_message() argument
298 mbedtls_test_opaque_signature_verify_message( const psa_key_attributes_t *attributes, const uint8_t *key, size_t key_length, psa_algorithm_t alg, const uint8_t *input, size_t input_length, const uint8_t *signature, size_t signature_length) mbedtls_test_opaque_signature_verify_message() argument
320 mbedtls_test_transparent_signature_sign_hash( const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *hash, size_t hash_length, uint8_t *signature, size_t signature_size, size_t *signature_length) mbedtls_test_transparent_signature_sign_hash() argument
348 mbedtls_test_opaque_signature_sign_hash( const psa_key_attributes_t *attributes, const uint8_t *key, size_t key_length, psa_algorithm_t alg, const uint8_t *hash, size_t hash_length, uint8_t *signature, size_t signature_size, size_t *signature_length) mbedtls_test_opaque_signature_sign_hash() argument
368 mbedtls_test_transparent_signature_verify_hash( const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *hash, size_t hash_length, const uint8_t *signature, size_t signature_length) mbedtls_test_transparent_signature_verify_hash() argument
386 mbedtls_test_opaque_signature_verify_hash( const psa_key_attributes_t *attributes, const uint8_t *key, size_t key_length, psa_algorithm_t alg, const uint8_t *hash, size_t hash_length, const uint8_t *signature, size_t signature_length) mbedtls_test_opaque_signature_verify_hash() argument
[all...]
/third_party/node/deps/openssl/openssl/crypto/property/
H A Dproperty.c106 ALGORITHM *alg);
224 static void impl_cache_flush_alg(ossl_uintmax_t idx, ALGORITHM *alg) in impl_cache_flush_alg() argument
226 lh_QUERY_doall(alg->cache, &impl_cache_free); in impl_cache_flush_alg()
227 lh_QUERY_flush(alg->cache); in impl_cache_flush_alg()
292 static int ossl_method_store_insert(OSSL_METHOD_STORE *store, ALGORITHM *alg) in ossl_method_store_insert() argument
294 return ossl_sa_ALGORITHM_set(store->algs, alg->nid, alg); in ossl_method_store_insert()
302 ALGORITHM *alg = NULL; in ossl_method_store_add() local
345 alg = ossl_method_store_retrieve(store, nid); in ossl_method_store_add()
346 if (alg in ossl_method_store_add()
382 ALGORITHM *alg = NULL; ossl_method_store_remove() local
422 alg_cleanup_by_provider(ossl_uintmax_t idx, ALGORITHM *alg, void *arg) alg_cleanup_by_provider() argument
465 alg_do_one(ALGORITHM *alg, IMPLEMENTATION *impl, void (*fn)(int id, void *method, void *fnarg), void *fnarg) alg_do_one() argument
477 alg_do_each(ossl_uintmax_t idx, ALGORITHM *alg, void *arg) alg_do_each() argument
506 ALGORITHM *alg; ossl_method_store_fetch() local
584 ossl_method_cache_flush_alg(OSSL_METHOD_STORE *store, ALGORITHM *alg) ossl_method_cache_flush_alg() argument
593 ALGORITHM *alg = ossl_method_store_retrieve(store, nid); ossl_method_cache_flush() local
650 impl_cache_flush_one_alg(ossl_uintmax_t idx, ALGORITHM *alg, void *v) impl_cache_flush_one_alg() argument
683 ALGORITHM *alg; ossl_method_store_cache_get() local
716 ALGORITHM *alg; ossl_method_store_cache_set() local
[all...]
/third_party/node/deps/openssl/openssl/providers/implementations/ciphers/
H A Dcipher_cts.h13 #define IMPLEMENT_cts_cipher(alg, UCALG, lcmode, UCMODE, flags, kbits, \
15 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \
16 static int alg##_cts_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \
21 const OSSL_DISPATCH ossl_##alg##kbits##lcmode##_cts_functions[] = { \
23 (void (*)(void)) alg##_##kbits##_##lcmode##_newctx }, \
24 { OSSL_FUNC_CIPHER_FREECTX, (void (*)(void)) alg##_freectx }, \
25 { OSSL_FUNC_CIPHER_DUPCTX, (void (*)(void)) alg##_dupctx }, \
26 { OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void)) alg##_cbc_cts_einit }, \
27 { OSSL_FUNC_CIPHER_DECRYPT_INIT, (void (*)(void)) alg##_cbc_cts_dinit }, \
34 (void (*)(void)) alg##_cts
[all...]
/third_party/openssl/providers/implementations/ciphers/
H A Dcipher_cts.h13 #define IMPLEMENT_cts_cipher(alg, UCALG, lcmode, UCMODE, flags, kbits, \
15 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \
16 static int alg##_cts_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \
21 const OSSL_DISPATCH ossl_##alg##kbits##lcmode##_cts_functions[] = { \
23 (void (*)(void)) alg##_##kbits##_##lcmode##_newctx }, \
24 { OSSL_FUNC_CIPHER_FREECTX, (void (*)(void)) alg##_freectx }, \
25 { OSSL_FUNC_CIPHER_DUPCTX, (void (*)(void)) alg##_dupctx }, \
26 { OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void)) alg##_cbc_cts_einit }, \
27 { OSSL_FUNC_CIPHER_DECRYPT_INIT, (void (*)(void)) alg##_cbc_cts_dinit }, \
34 (void (*)(void)) alg##_cts
[all...]
/third_party/mbedtls/tests/src/
H A Dpsa_exercise_key.c122 psa_algorithm_t alg, in exercise_mac_key()
131 if (alg & PSA_ALG_MAC_AT_LEAST_THIS_LENGTH_FLAG) { in exercise_mac_key()
132 alg = PSA_ALG_TRUNCATED_MAC(alg, PSA_MAC_TRUNCATED_LENGTH(alg)); in exercise_mac_key()
136 status = psa_mac_sign_setup(&operation, key, alg); in exercise_mac_key()
155 status = psa_mac_verify_setup(&operation, key, alg); in exercise_mac_key()
177 psa_algorithm_t alg, in exercise_cipher_key()
194 iv_length = PSA_CIPHER_IV_LENGTH(key_type, alg); in exercise_cipher_key()
197 status = psa_cipher_encrypt_setup(&operation, key, alg); in exercise_cipher_key()
120 exercise_mac_key(mbedtls_svc_key_id_t key, psa_key_usage_t usage, psa_algorithm_t alg, int key_destroyable) exercise_mac_key() argument
175 exercise_cipher_key(mbedtls_svc_key_id_t key, psa_key_usage_t usage, psa_algorithm_t alg, int key_destroyable) exercise_cipher_key() argument
263 exercise_aead_key(mbedtls_svc_key_id_t key, psa_key_usage_t usage, psa_algorithm_t alg, int key_destroyable) exercise_aead_key() argument
326 can_sign_or_verify_message(psa_key_usage_t usage, psa_algorithm_t alg) can_sign_or_verify_message() argument
338 exercise_signature_key(mbedtls_svc_key_id_t key, psa_key_usage_t usage, psa_algorithm_t alg, int key_destroyable) exercise_signature_key() argument
439 exercise_asymmetric_encryption_key(mbedtls_svc_key_id_t key, psa_key_usage_t usage, psa_algorithm_t alg, int key_destroyable) exercise_asymmetric_encryption_key() argument
486 mbedtls_test_psa_setup_key_derivation_wrap( psa_key_derivation_operation_t *operation, mbedtls_svc_key_id_t key, psa_algorithm_t alg, const unsigned char *input1, size_t input1_length, const unsigned char *input2, size_t input2_length, size_t capacity, int key_destroyable) mbedtls_test_psa_setup_key_derivation_wrap() argument
588 exercise_key_derivation_key(mbedtls_svc_key_id_t key, psa_key_usage_t usage, psa_algorithm_t alg, int key_destroyable) exercise_key_derivation_key() argument
683 mbedtls_test_psa_raw_key_agreement_with_self( psa_algorithm_t alg, mbedtls_svc_key_id_t key, int key_destroyable) mbedtls_test_psa_raw_key_agreement_with_self() argument
747 exercise_raw_key_agreement_key(mbedtls_svc_key_id_t key, psa_key_usage_t usage, psa_algorithm_t alg, int key_destroyable) exercise_raw_key_agreement_key() argument
766 exercise_key_agreement_key(mbedtls_svc_key_id_t key, psa_key_usage_t usage, psa_algorithm_t alg, int key_destroyable) exercise_key_agreement_key() argument
1119 mbedtls_test_psa_exercise_key(mbedtls_svc_key_id_t key, psa_key_usage_t usage, psa_algorithm_t alg, int key_destroyable) mbedtls_test_psa_exercise_key() argument
1163 mbedtls_test_psa_usage_to_exercise(psa_key_type_t type, psa_algorithm_t alg) mbedtls_test_psa_usage_to_exercise() argument
1197 mbedtls_test_can_exercise_psa_algorithm(psa_algorithm_t alg) mbedtls_test_can_exercise_psa_algorithm() argument
[all...]
/third_party/mbedtls/tests/scripts/
H A Dgenerate_psa_tests.py248 alg: crypto_knowledge.Algorithm,
257 pretty_alg = alg.short_expression()
275 dependencies = psa_information.automatic_dependencies(alg.base_expression, key_type)
286 arguments.append(alg.expression)
297 alg: crypto_knowledge.Algorithm,
301 if alg.can_do(category):
303 for dep in psa_information.automatic_dependencies(alg.base_expression):
304 yield self.make_test_case(alg, category,
309 yield self.make_test_case(alg, category, self.Reason.INVALID)
313 alg
[all...]
/third_party/ltp/testcases/network/tcp_cc/
H A Dtcp_cc_lib.sh19 local alg=$1
20 tst_res TINFO "setting $alg"
22 tst_set_sysctl net.ipv4.tcp_congestion_control $alg safe
42 local alg="$1"
44 modprobe tcp_$alg > /dev/null 2>&1
45 grep -q $alg $proc_cc || tst_brk TCONF "Local host doesn't support $alg"
48 tst_rhost_run -c "modprobe tcp_$alg" > /dev/null 2>&1
49 tst_rhost_run -c "grep -q $alg $proc_cc" || \
50 tst_brk TCONF "Remote host doesn't support $alg"
[all...]
/third_party/node/deps/openssl/openssl/providers/implementations/include/prov/
H A Dciphercommon_aead.h14 #define IMPLEMENT_aead_cipher(alg, lc, UCMODE, flags, kbits, blkbits, ivbits) \
15 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \
16 static int alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[]) \
21 static OSSL_FUNC_cipher_newctx_fn alg##kbits##lc##_newctx; \
22 static void * alg##kbits##lc##_newctx(void *provctx) \
24 return alg##_##lc##_newctx(provctx, kbits); \
26 static void * alg##kbits##lc##_dupctx(void *src) \
28 return alg##_##lc##_dupctx(src); \
30 const OSSL_DISPATCH ossl_##alg##kbits##lc##_functions[] = { \
31 { OSSL_FUNC_CIPHER_NEWCTX, (void (*)(void))alg##kbit
[all...]
/third_party/mbedtls/scripts/mbedtls_dev/
H A Dcrypto_data_tests.py39 [alg
40 for alg in all_algorithms
41 if (not alg.is_wildcard and
42 alg.can_do(crypto_knowledge.AlgorithmCategory.HASH))]
44 # CALCULATE[alg] = function to return the hash of its argument in hex
68 def one_test_case(alg: crypto_knowledge.Algorithm,
76 alg.short_expression()))
77 tc.set_dependencies(psa_low_level_dependencies(alg.expression))
79 tc.set_arguments([alg.expression] +
84 alg
[all...]
/third_party/openssl/providers/implementations/include/prov/
H A Dciphercommon_aead.h14 #define IMPLEMENT_aead_cipher(alg, lc, UCMODE, flags, kbits, blkbits, ivbits) \
15 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \
16 static int alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[]) \
21 static OSSL_FUNC_cipher_newctx_fn alg##kbits##lc##_newctx; \
22 static void * alg##kbits##lc##_newctx(void *provctx) \
24 return alg##_##lc##_newctx(provctx, kbits); \
26 const OSSL_DISPATCH ossl_##alg##kbits##lc##_functions[] = { \
27 { OSSL_FUNC_CIPHER_NEWCTX, (void (*)(void))alg##kbits##lc##_newctx }, \
28 { OSSL_FUNC_CIPHER_FREECTX, (void (*)(void))alg##_##lc##_freectx }, \
35 (void (*)(void)) alg##
[all...]
/third_party/node/test/fixtures/wpt/WebCryptoAPI/digest/
H A Ddigest.https.any.js48 Object.keys(digestedData).forEach(function(alg) {
49 var upCase = alg.toUpperCase();
50 var downCase = alg.toLowerCase();
56 assert_true(equalBuffers(result, digestedData[alg][size]), "digest() yielded expected result for " + alg + ":" + size);
58 assert_unreached("digest() threw an error for " + alg + ":" + size + " - " + err.message);
67 assert_true(equalBuffers(result, digestedData[alg][size]), "digest() yielded expected result for " + alg + ":" + size);
69 assert_unreached("digest() threw an error for " + alg + ":" + size + " - " + err.message);
78 assert_true(equalBuffers(result, digestedData[alg][siz
[all...]
/third_party/node/deps/openssl/openssl/crypto/engine/
H A Deng_fat.c50 static int int_def_cb(const char *alg, int len, void *arg) in int_def_cb() argument
53 if (alg == NULL) in int_def_cb()
55 if (strncmp(alg, "ALL", len) == 0) in int_def_cb()
57 else if (strncmp(alg, "RSA", len) == 0) in int_def_cb()
59 else if (strncmp(alg, "DSA", len) == 0) in int_def_cb()
61 else if (strncmp(alg, "DH", len) == 0) in int_def_cb()
63 else if (strncmp(alg, "EC", len) == 0) in int_def_cb()
65 else if (strncmp(alg, "RAND", len) == 0) in int_def_cb()
67 else if (strncmp(alg, "CIPHERS", len) == 0) in int_def_cb()
69 else if (strncmp(alg, "DIGEST in int_def_cb()
[all...]
/third_party/openssl/crypto/engine/
H A Deng_fat.c50 static int int_def_cb(const char *alg, int len, void *arg) in int_def_cb() argument
53 if (alg == NULL) in int_def_cb()
55 if (strncmp(alg, "ALL", len) == 0) in int_def_cb()
57 else if (strncmp(alg, "RSA", len) == 0) in int_def_cb()
59 else if (strncmp(alg, "DSA", len) == 0) in int_def_cb()
61 else if (strncmp(alg, "DH", len) == 0) in int_def_cb()
63 else if (strncmp(alg, "EC", len) == 0) in int_def_cb()
65 else if (strncmp(alg, "RAND", len) == 0) in int_def_cb()
67 else if (strncmp(alg, "CIPHERS", len) == 0) in int_def_cb()
69 else if (strncmp(alg, "DIGEST in int_def_cb()
[all...]
/third_party/fsverity-utils/lib/
H A Dhash_algs.c68 openssl_digest_ctx_create(const struct fsverity_hash_alg *alg, const EVP_MD *md) in openssl_digest_ctx_create() argument
76 ctx->base.alg = alg; in openssl_digest_ctx_create()
93 if (WARN_ON(EVP_MD_size(md) != alg->digest_size)) in openssl_digest_ctx_create()
105 static struct hash_ctx *create_sha256_ctx(const struct fsverity_hash_alg *alg) in create_sha256_ctx() argument
107 return openssl_digest_ctx_create(alg, EVP_sha256()); in create_sha256_ctx()
110 static struct hash_ctx *create_sha512_ctx(const struct fsverity_hash_alg *alg) in create_sha512_ctx() argument
112 return openssl_digest_ctx_create(alg, EVP_sha512()); in create_sha512_ctx()
193 const struct fsverity_hash_alg *alg = in libfsverity_get_digest_size() local
196 return alg in libfsverity_get_digest_size()
202 const struct fsverity_hash_alg *alg = libfsverity_get_hash_name() local
[all...]
/third_party/ltp/testcases/kernel/crypto/
H A Dcrypto_user02.c62 struct crypto_user_alg alg; in setup() local
67 memset(&alg, 0, sizeof(alg)); in setup()
68 strcpy(alg.cru_driver_name, ALGORITHM_CANDIDATES[i]); in setup()
71 rc = tst_crypto_add_alg(&ses, &alg); in setup()
76 rc = tst_crypto_del_alg(&ses, &alg); in setup()
89 struct crypto_user_alg alg = {}; in run() local
93 strcpy(alg.cru_driver_name, algorithm); in run()
108 TEST(tst_crypto_add_alg(&ses, &alg)); in run()
126 TEST(tst_crypto_del_alg(&ses, &alg)); in run()
[all...]

Completed in 15 milliseconds

12345678910>>...21