Home
last modified time | relevance | path

Searched refs:key_bits (Results 1 – 25 of 59) sorted by relevance

123

/third_party/mbedtls/include/psa/
Dcrypto_sizes.h167 #define PSA_AEAD_TAG_LENGTH(key_type, key_bits, alg) \ argument
170 ((void) (key_bits), 0))
275 #define PSA_MAC_LENGTH(key_type, key_bits, alg) \ argument
279 ((void) (key_type), (void) (key_bits), 0))
593 #define PSA_SIGN_OUTPUT_SIZE(key_type, key_bits, alg) \ argument
594 (PSA_KEY_TYPE_IS_RSA(key_type) ? ((void) alg, PSA_BITS_TO_BYTES(key_bits)) : \
595 PSA_KEY_TYPE_IS_ECC(key_type) ? PSA_ECDSA_SIGNATURE_SIZE(key_bits) : \
638 #define PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE(key_type, key_bits, alg) \ argument
640 ((void) alg, PSA_BITS_TO_BYTES(key_bits)) : \
677 #define PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE(key_type, key_bits, alg) \ argument
[all …]
Dcrypto_extra.h562 #define PSA_KEY_DOMAIN_PARAMETERS_SIZE(key_type, key_bits) \ argument
564 PSA_KEY_TYPE_IS_DH(key_type) ? PSA_DH_KEY_DOMAIN_PARAMETERS_SIZE(key_bits) : \
565 PSA_KEY_TYPE_IS_DSA(key_type) ? PSA_DSA_KEY_DOMAIN_PARAMETERS_SIZE(key_bits) : \
567 #define PSA_DH_KEY_DOMAIN_PARAMETERS_SIZE(key_bits) \ argument
568 (4 + (PSA_BITS_TO_BYTES(key_bits) + 5) * 3 /*without optional parts*/)
569 #define PSA_DSA_KEY_DOMAIN_PARAMETERS_SIZE(key_bits) \ argument
570 (4 + (PSA_BITS_TO_BYTES(key_bits) + 5) * 2 /*p, g*/ + 34 /*q*/)
/third_party/node/deps/openssl/openssl/crypto/evp/
De_rc2.c36 int key_bits; /* effective key bits */ member
96 key, data(ctx)->key_bits); in rc2_init_key()
134 int key_bits; in rc2_get_asn1_type_and_iv() local
144 key_bits = rc2_magic_to_meth((int)num); in rc2_get_asn1_type_and_iv()
145 if (!key_bits) in rc2_get_asn1_type_and_iv()
149 if (EVP_CIPHER_CTX_ctrl(c, EVP_CTRL_SET_RC2_KEY_BITS, key_bits, in rc2_get_asn1_type_and_iv()
151 || EVP_CIPHER_CTX_set_key_length(c, key_bits / 8) <= 0) in rc2_get_asn1_type_and_iv()
174 data(c)->key_bits = EVP_CIPHER_CTX_get_key_length(c) * 8; in rc2_ctrl()
178 *(int *)ptr = data(c)->key_bits; in rc2_ctrl()
183 data(c)->key_bits = arg; in rc2_ctrl()
/third_party/openssl/crypto/evp/
De_rc2.c36 int key_bits; /* effective key bits */ member
96 key, data(ctx)->key_bits); in rc2_init_key()
134 int key_bits; in rc2_get_asn1_type_and_iv() local
144 key_bits = rc2_magic_to_meth((int)num); in rc2_get_asn1_type_and_iv()
145 if (!key_bits) in rc2_get_asn1_type_and_iv()
149 if (EVP_CIPHER_CTX_ctrl(c, EVP_CTRL_SET_RC2_KEY_BITS, key_bits, in rc2_get_asn1_type_and_iv()
151 || EVP_CIPHER_CTX_set_key_length(c, key_bits / 8) <= 0) in rc2_get_asn1_type_and_iv()
174 data(c)->key_bits = EVP_CIPHER_CTX_get_key_length(c) * 8; in rc2_ctrl()
178 *(int *)ptr = data(c)->key_bits; in rc2_ctrl()
183 data(c)->key_bits = arg; in rc2_ctrl()
/third_party/mbedtls/programs/psa/
Daead_demo.c137 size_t key_bits; in aead_prepare() local
141 key_bits = 128; in aead_prepare()
145 key_bits = 256; in aead_prepare()
149 key_bits = 128; in aead_prepare()
153 key_bits = 256; in aead_prepare()
165 psa_set_key_bits(&attributes, key_bits); // optional in aead_prepare()
168 PSA_CHECK(psa_import_key(&attributes, key_bytes, key_bits / 8, key)); in aead_prepare()
185 size_t key_bits = psa_get_key_bits(&attr); in aead_info() local
187 size_t tag_len = PSA_AEAD_TAG_LENGTH(key_type, key_bits, alg); in aead_info()
197 type_str, (unsigned) key_bits, base_str, (unsigned) tag_len); in aead_info()
Dcrypto_examples.c162 key_bits = 256, in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block() enumerator
183 psa_set_key_bits(&attributes, key_bits); in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
210 key_bits = 256, in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi() enumerator
231 psa_set_key_bits(&attributes, key_bits); in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi()
258 key_bits = 256, in cipher_example_encrypt_decrypt_aes_ctr_multi() enumerator
278 psa_set_key_bits(&attributes, key_bits); in cipher_example_encrypt_decrypt_aes_ctr_multi()
/third_party/skia/third_party/externals/harfbuzz/src/
Dhb-cache.hh35 template <unsigned int key_bits, unsigned int value_bits, unsigned int cache_bits>
38 static_assert ((key_bits >= cache_bits), "");
39 static_assert ((key_bits + value_bits - cache_bits <= 8 * sizeof (hb_atomic_int_t)), "");
55 …if ((key_bits + value_bits - cache_bits == 8 * sizeof (hb_atomic_int_t) && v == (unsigned int) -1)… in get()
64 if (unlikely ((key >> key_bits) || (value >> value_bits))) in set()
/third_party/mbedtls/library/
Dssl_ticket.c98 psa_set_key_bits(&attributes, key->key_bits); in ssl_ticket_gen_key()
102 PSA_BITS_TO_BYTES(key->key_bits), in ssl_ticket_gen_key()
167 const size_t bitlen = key->key_bits; in mbedtls_ssl_ticket_rotate()
186 psa_set_key_bits(&attributes, key->key_bits); in mbedtls_ssl_ticket_rotate()
189 PSA_BITS_TO_BYTES(key->key_bits), in mbedtls_ssl_ticket_rotate()
219 size_t key_bits; in mbedtls_ssl_ticket_setup() local
230 &alg, &key_type, &key_bits) != PSA_SUCCESS) { in mbedtls_ssl_ticket_setup()
246 key_bits = mbedtls_cipher_info_get_key_bitlen(cipher_info); in mbedtls_ssl_ticket_setup()
249 if (key_bits > 8 * MAX_KEY_BYTES) { in mbedtls_ssl_ticket_setup()
261 ctx->keys[0].key_bits = key_bits; in mbedtls_ssl_ticket_setup()
[all …]
Dpsa_crypto_cipher.c37 size_t key_bits, in mbedtls_cipher_info_from_psa() argument
128 if (key_bits == 64) { in mbedtls_cipher_info_from_psa()
136 if (key_bits == 128) { in mbedtls_cipher_info_from_psa()
137 key_bits = 192; in mbedtls_cipher_info_from_psa()
159 (int) key_bits, mode); in mbedtls_cipher_info_from_psa()
172 size_t key_bits; in psa_cipher_setup() local
181 key_bits = attributes->core.bits; in psa_cipher_setup()
183 key_bits, NULL); in psa_cipher_setup()
194 if (key_type == PSA_KEY_TYPE_DES && key_bits == 128) { in psa_cipher_setup()
206 (int) key_bits, cipher_operation); in psa_cipher_setup()
Dpsa_crypto_aead.c46 size_t key_bits; in psa_aead_setup() local
52 key_bits = attributes->core.bits; in psa_aead_setup()
55 attributes->core.type, key_bits, in psa_aead_setup()
75 key_buffer, (unsigned int) key_bits)); in psa_aead_setup()
95 key_buffer, (unsigned int) key_bits)); in psa_aead_setup()
/third_party/ffmpeg/libavutil/
Dcamellia.c46 int key_bits; member
194 if (cs->key_bits == 128) { in generate_round_keys()
261 if (cs->key_bits != 128) { in camellia_encrypt()
284 if (cs->key_bits != 128) { in camellia_decrypt()
352 av_cold int av_camellia_init(AVCAMELLIA *cs, const uint8_t *key, int key_bits) in av_camellia_init() argument
356 if (key_bits != 128 && key_bits != 192 && key_bits != 256) in av_camellia_init()
360 cs->key_bits = key_bits; in av_camellia_init()
363 if (key_bits == 192) { in av_camellia_init()
366 } else if (key_bits == 256) { in av_camellia_init()
381 if (key_bits != 128) { in av_camellia_init()
Drc4.c33 int av_rc4_init(AVRC4 *r, const uint8_t *key, int key_bits, int decrypt) { in av_rc4_init() argument
37 int keylen = key_bits >> 3; in av_rc4_init()
38 if (key_bits & 7) in av_rc4_init()
Dtwofish.c269 av_cold int av_twofish_init(AVTWOFISH *cs, const uint8_t *key, int key_bits) in av_twofish_init() argument
275 if (key_bits < 0) in av_twofish_init()
277 if (key_bits <= 128) { in av_twofish_init()
279 } else if (key_bits <= 192) { in av_twofish_init()
285 if (key_bits <= 256) { in av_twofish_init()
286 memcpy(keypad, key, key_bits >> 3); in av_twofish_init()
305 if (cs->ksize << 6 != key_bits) { in av_twofish_init()
Ddes.c278 int av_des_init(AVDES *d, const uint8_t *key, int key_bits, av_unused int decrypt) { in av_des_init() argument
279 if (key_bits != 64 && key_bits != 192) in av_des_init()
281 d->triple_des = key_bits > 64; in av_des_init()
Daes.c195 int av_aes_init(AVAES *a, const uint8_t *key, int key_bits, int decrypt) in av_aes_init() argument
199 int KC = key_bits >> 5; in av_aes_init()
228 if (key_bits != 128 && key_bits != 192 && key_bits != 256) in av_aes_init()
Dcast5.c456 av_cold int av_cast5_init(AVCAST5* cs, const uint8_t *key, int key_bits) in av_cast5_init() argument
461 if (key_bits % 8 || key_bits < 40 || key_bits > 128) in av_cast5_init()
464 memcpy(newKey, key, key_bits >> 3); in av_cast5_init()
466 cs->rounds = key_bits <= 80 ? 12 : 16; in av_cast5_init()
/third_party/node/deps/openssl/openssl/providers/implementations/ciphers/
Dcipher_rc2.c116 if (p != NULL && !OSSL_PARAM_set_size_t(p, ctx->key_bits)) { in rc2_get_ctx_params()
138 num = rc2_keybits_to_magic(ctx->key_bits); in rc2_get_ctx_params()
174 if (!OSSL_PARAM_get_size_t(p, &ctx->key_bits)) { in rc2_set_ctx_params()
194 || (ctx->key_bits = rc2_magic_to_keybits(num)) == 0) { in rc2_set_ctx_params()
206 ctx->base.keylen = ctx->key_bits / 8; in rc2_set_ctx_params()
242 ctx->key_bits = kbits; \
/third_party/openssl/providers/implementations/ciphers/
Dcipher_rc2.c116 if (p != NULL && !OSSL_PARAM_set_size_t(p, ctx->key_bits)) { in rc2_get_ctx_params()
138 num = rc2_keybits_to_magic(ctx->key_bits); in rc2_get_ctx_params()
174 if (!OSSL_PARAM_get_size_t(p, &ctx->key_bits)) { in rc2_set_ctx_params()
194 || (ctx->key_bits = rc2_magic_to_keybits(num)) == 0) { in rc2_set_ctx_params()
206 ctx->base.keylen = ctx->key_bits / 8; in rc2_set_ctx_params()
242 ctx->key_bits = kbits; \
/third_party/ffmpeg/libavutil/tests/
Dcast5.c46 static const int key_bits[3] = {128, 80, 40}; in main() local
54 av_cast5_init(cs, Key[j], key_bits[j]); in main()
89 av_cast5_init(cs, Key[j], key_bits[j]); in main()
/third_party/mesa3d/src/amd/vulkan/radix_sort/
Dradix_sort_vk.c507 if ((info->count <= 1) || (info->key_bits == 0)) in radix_sort_vk_sort_devaddr()
577 uint32_t const key_bits = MIN_MACRO(uint32_t, info->key_bits, keyval_bits); in radix_sort_vk_sort_devaddr() local
578 uint32_t const passes = (key_bits + RS_RADIX_LOG2 - 1) / RS_RADIX_LOG2; in radix_sort_vk_sort_devaddr()
835 if (info->key_bits == 0) in radix_sort_vk_sort_indirect_devaddr()
906 uint32_t const key_bits = MIN_MACRO(uint32_t, info->key_bits, keyval_bits); in radix_sort_vk_sort_indirect_devaddr() local
907 uint32_t const passes = (key_bits + RS_RADIX_LOG2 - 1) / RS_RADIX_LOG2; in radix_sort_vk_sort_indirect_devaddr()
1195 .key_bits = info->key_bits, in radix_sort_vk_sort()
1239 .key_bits = info->key_bits, in radix_sort_vk_sort_indirect()
Dradix_sort_vk_devaddr.h52 uint32_t key_bits; member
76 uint32_t key_bits; member
Dradix_sort_vk.h297 uint32_t key_bits; member
357 uint32_t key_bits; member
/third_party/mbedtls/tests/src/
Dpsa_exercise_key.c494 size_t key_bits; in mbedtls_test_psa_key_agreement_with_self() local
505 key_bits = psa_get_key_bits(&attributes); in mbedtls_test_psa_key_agreement_with_self()
507 public_key_length = PSA_EXPORT_PUBLIC_KEY_OUTPUT_SIZE(public_key_type, key_bits); in mbedtls_test_psa_key_agreement_with_self()
534 size_t key_bits; in mbedtls_test_psa_raw_key_agreement_with_self() local
547 key_bits = psa_get_key_bits(&attributes); in mbedtls_test_psa_raw_key_agreement_with_self()
549 public_key_length = PSA_EXPORT_PUBLIC_KEY_OUTPUT_SIZE(public_key_type, key_bits); in mbedtls_test_psa_raw_key_agreement_with_self()
561 key_bits)); in mbedtls_test_psa_raw_key_agreement_with_self()
628 size_t key_bits = psa_get_key_bits(&attributes); in exercise_key_agreement_key() local
631 if (PSA_BITS_TO_BYTES(key_bits) != PSA_HASH_LENGTH(hash_alg)) { in exercise_key_agreement_key()
/third_party/mbedtls/tests/include/test/
Dpsa_crypto_helpers.h238 #define MBEDTLS_TEST_PSA_SKIP_IF_ALT_AES_192(key_type, key_bits) \ argument
243 (key_bits == 192)) \
/third_party/mbedtls/tests/suites/
Dtest_suite_psa_crypto_metadata.function196 psa_key_type_t key_type, size_t key_bits,
212 TEST_EQUAL(length, PSA_MAC_LENGTH(key_type, key_bits, alg));
222 psa_key_type_t key_type, size_t key_bits,
238 TEST_EQUAL(tag_length, PSA_AEAD_TAG_LENGTH(key_type, key_bits, alg));
303 size_t key_bits = key_bits_arg;
306 key_type, key_bits, length);
314 key_type, key_bits, n);
345 key_type, key_bits, n);
429 size_t key_bits = key_bits_arg;
432 key_type, key_bits, tag_length);
[all …]

123