Home
last modified time | relevance | path

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

/trusted-firmware-m-3.4.0/interface/include/psa/
Dcrypto_sizes.h153 #define PSA_AEAD_TAG_LENGTH(key_type, key_bits, alg) \ argument
156 ((void) (key_bits), 0))
270 #define PSA_MAC_LENGTH(key_type, key_bits, alg) \ argument
274 ((void)(key_type), (void)(key_bits), 0))
588 #define PSA_SIGN_OUTPUT_SIZE(key_type, key_bits, alg) \ argument
589 (PSA_KEY_TYPE_IS_RSA(key_type) ? ((void)alg, PSA_BITS_TO_BYTES(key_bits)) : \
590 PSA_KEY_TYPE_IS_ECC(key_type) ? PSA_ECDSA_SIGNATURE_SIZE(key_bits) : \
633 #define PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE(key_type, key_bits, alg) \ argument
635 ((void)alg, PSA_BITS_TO_BYTES(key_bits)) : \
672 #define PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE(key_type, key_bits, alg) \ argument
[all …]
/trusted-firmware-m-3.4.0/platform/ext/target/arm/rss/common/
Dcrypto_keys.c156 size_t *key_bits, in tfm_plat_get_huk() argument
167 *key_bits = 256; in tfm_plat_get_huk()
182 size_t *key_bits, in tfm_plat_get_iak() argument
230 *key_bits = ATTEST_KEY_BITS; in tfm_plat_get_iak()
236 psa_set_key_bits(&transient_attr, *key_bits); in tfm_plat_get_iak()
281 size_t *key_bits, in tfm_plat_get_dak_seed() argument
292 *key_bits = 256; in tfm_plat_get_dak_seed()
307 size_t *key_bits, in tfm_plat_get_host_s_rotpk() argument
317 *key_bits = 384; in tfm_plat_get_host_s_rotpk()
326 size_t *key_bits, in tfm_plat_get_host_ns_rotpk() argument
[all …]
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/codesafe/src/psa_driver_api/src/
Dcc3xx_psa_key_generation.c71 psa_key_type_t key_bits = psa_get_key_bits(attributes); in cc3xx_internal_gen_ecc_wstr_keypair() local
88 if (key_buffer_size < PSA_BITS_TO_BYTES(key_bits)) { in cc3xx_internal_gen_ecc_wstr_keypair()
92 err = cc3xx_ecc_psa_domain_to_cc_domain(curve, key_bits, &domainId); in cc3xx_internal_gen_ecc_wstr_keypair()
131 PSA_BITS_TO_BYTES(key_bits)); in cc3xx_internal_gen_ecc_wstr_keypair()
133 *key_buffer_length = PSA_BITS_TO_BYTES(key_bits); in cc3xx_internal_gen_ecc_wstr_keypair()
149 psa_key_type_t key_bits = psa_get_key_bits(attributes); in cc3xx_internal_gen_rsa_keypair() local
163 uint32_t keySizeBytes = CALC_FULL_BYTES(key_bits); in cc3xx_internal_gen_rsa_keypair()
166 if ((key_bits < CC3XX_RSA_MIN_VALID_KEYGEN_SIZE_VALUE_IN_BITS) || in cc3xx_internal_gen_rsa_keypair()
167 (key_bits > CC3XX_RSA_MAX_VALID_KEYGEN_SIZE_VALUE_IN_BITS) || in cc3xx_internal_gen_rsa_keypair()
168 (key_bits % CC_RSA_VALID_KEY_SIZE_MULTIPLE_VALUE_IN_BITS)) { in cc3xx_internal_gen_rsa_keypair()
[all …]
Dcc3xx_internal_aes.c53 size_t key_bits, in aes_setkey() argument
69 switch (key_bits) { in aes_setkey()
80 CC_PAL_LOG_ERR("key_bits (%d) not supported\n", key_bits); in aes_setkey()
84 CC_PalMemCopy(ctx->keyBuf, key, key_bits/8); in aes_setkey()
99 size_t key_bits) in cc3xx_aes_setkey_enc() argument
101 return aes_setkey(ctx, key, key_bits, CRYPTO_DIRECTION_ENCRYPT); in cc3xx_aes_setkey_enc()
107 size_t key_bits) in cc3xx_aes_setkey_dec() argument
109 return aes_setkey(ctx, key, key_bits, CRYPTO_DIRECTION_DECRYPT); in cc3xx_aes_setkey_dec()
Dcc3xx_psa_key_agreement.c36 psa_key_bits_t key_bits = psa_get_key_bits(attributes); in cc3xx_key_agreement() local
45 if (curve == PSA_ECC_FAMILY_MONTGOMERY && key_bits == 256) { in cc3xx_key_agreement()
60 key_bits, in cc3xx_key_agreement()
Dcc3xx_internal_gcm.c51 size_t key_bits, in gcm_setkey() argument
65 switch (key_bits) { in gcm_setkey()
79 CC_PalMemCopy(ctx->keyBuf, key, PSA_BITS_TO_BYTES(key_bits)); in gcm_setkey()
544 psa_key_bits_t key_bits = psa_get_key_bits(attributes); in cc3xx_gcm_encrypt() local
547 size_t tag_length = PSA_AEAD_TAG_LENGTH(key_type, key_bits, key_alg); in cc3xx_gcm_encrypt()
580 psa_key_bits_t key_bits = psa_get_key_bits(attributes); in cc3xx_gcm_decrypt() local
583 size_t tag_length = PSA_AEAD_TAG_LENGTH(key_type, key_bits, key_alg); in cc3xx_gcm_decrypt()
626 size_t key_bits) in cc3xx_gcm_setkey_enc() argument
628 return gcm_setkey(ctx, key, key_bits, CRYPTO_DIRECTION_ENCRYPT); in cc3xx_gcm_setkey_enc()
634 size_t key_bits) in cc3xx_gcm_setkey_dec() argument
[all …]
Dcc3xx_internal_ccm.c42 size_t key_bits, in ccm_setkey() argument
56 switch (key_bits) { in ccm_setkey()
72 CC_PalMemCopy(ctx->keyBuf, key, PSA_BITS_TO_BYTES(key_bits)); in ccm_setkey()
639 psa_key_bits_t key_bits = psa_get_key_bits(attributes); in cc3xx_encrypt_ccm() local
642 size_t tag_length = PSA_AEAD_TAG_LENGTH(key_type, key_bits, key_alg); in cc3xx_encrypt_ccm()
670 psa_key_bits_t key_bits = psa_get_key_bits(attributes); in cc3xx_decrypt_ccm() local
673 size_t tag_length = PSA_AEAD_TAG_LENGTH(key_type, key_bits, key_alg); in cc3xx_decrypt_ccm()
722 size_t key_bits) in cc3xx_ccm_setkey_enc() argument
724 return ccm_setkey(ctx, key, key_bits, CRYPTO_DIRECTION_ENCRYPT); in cc3xx_ccm_setkey_enc()
730 size_t key_bits) in cc3xx_ccm_setkey_dec() argument
[all …]
Dcc3xx_psa_asymmetric_signature.c73 psa_key_type_t key_bits = psa_get_key_bits(attributes); in cc3xx_internal_ecdsa_verify() local
86 err = cc3xx_ecc_psa_domain_to_cc_domain(curve, key_bits, &domainId); in cc3xx_internal_ecdsa_verify()
150 psa_key_type_t key_bits = psa_get_key_bits(attributes); in cc3xx_internal_ecdsa_sign() local
172 if (key_bits == 521) { in cc3xx_internal_ecdsa_sign()
182 err = cc3xx_ecc_psa_domain_to_cc_domain(curve, key_bits, &domainId); in cc3xx_internal_ecdsa_sign()
332 psa_key_type_t key_bits = psa_get_key_bits(attributes); in cc3xx_internal_rsa_sign() local
341 if (PSA_BITS_TO_BYTES(key_bits) < in cc3xx_internal_rsa_sign()
394 size_t output_len = PSA_BITS_TO_BYTES(key_bits); in cc3xx_internal_rsa_sign()
Dcc3xx_internal_ecc_util.c259 psa_key_bits_t key_bits, in cc3xx_ecc_psa_domain_to_cc_domain() argument
264 switch (key_bits) { in cc3xx_ecc_psa_domain_to_cc_domain()
279 switch (key_bits) { in cc3xx_ecc_psa_domain_to_cc_domain()
Dcc3xx_psa_aead.c103 size_t key_bits = psa_get_key_bits(attributes); in aead_setup() local
105 if (PSA_BYTES_TO_BITS(key_length) != key_bits) { in aead_setup()
140 key_bits) ) in aead_setup()
150 key_bits) ) in aead_setup()
170 key_bits) ) in aead_setup()
180 key_bits) ) in aead_setup()
Dcc3xx_psa_cipher.c82 size_t key_bits = psa_get_key_bits(attributes); in cipher_setup() local
84 if (PSA_BYTES_TO_BITS(key_length) != key_bits) { in cipher_setup()
115 key_bits) ) in cipher_setup()
125 key_bits) ) in cipher_setup()
Dcc3xx_psa_asymmetric_encryption.c240 size_t key_bits = psa_get_key_bits(attributes); in cc3xx_asymmetric_encrypt() local
249 PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE(type, key_bits, alg)) { in cc3xx_asymmetric_encrypt()
Dcc3xx_internal_chacha20_poly1305.c429 psa_key_bits_t key_bits = psa_get_key_bits(attributes); in cc3xx_decrypt_chacha20_poly1305() local
432 size_t tag_length = PSA_AEAD_TAG_LENGTH(key_type, key_bits, key_alg); in cc3xx_decrypt_chacha20_poly1305()
/trusted-firmware-m-3.4.0/platform/ext/common/template/
Dcrypto_keys.c109 size_t *key_bits, in tfm_plat_get_huk() argument
125 *key_bits = *key_len * 8; in tfm_plat_get_huk()
135 size_t *key_bits, in tfm_plat_get_iak() argument
149 *key_bits = *key_len * 8; in tfm_plat_get_iak()
186 size_t key_bits; in tfm_plat_load_builtin_keys() local
191 plat_err = tfm_plat_get_huk(buf, sizeof(buf), &key_len, &key_bits, in tfm_plat_load_builtin_keys()
198 psa_set_key_bits(&attr, key_bits); in tfm_plat_load_builtin_keys()
208 plat_err = tfm_plat_get_iak(buf, sizeof(buf), &key_len, &key_bits, in tfm_plat_load_builtin_keys()
215 psa_set_key_bits(&attr, key_bits); in tfm_plat_load_builtin_keys()
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/codesafe/src/psa_driver_api/include/
Dcc3xx_internal_aes.h41 size_t key_bits);
49 size_t key_bits);
Dcc3xx_internal_ccm.h67 size_t key_bits);
75 size_t key_bits);
Dcc3xx_internal_gcm.h61 size_t key_bits);
68 size_t key_bits);
Dcc3xx_internal_ecc_util.h76 psa_key_bits_t key_bits,
/trusted-firmware-m-3.4.0/lib/ext/mbedcrypto/
D0004-Add-TF-M-builtin-key-driver.patch126 (void)key_bits;