Home
last modified time | relevance | path

Searched refs:key_len (Results 1 – 25 of 36) sorted by relevance

12

/openssl/providers/implementations/kdfs/
H A Dkrb5kdf.c47 const unsigned char *key, size_t key_len,
55 size_t key_len; member
89 OPENSSL_clear_free(ctx->key, ctx->key_len); in krb5kdf_reset()
111 if (!ossl_prov_memdup(src->key, src->key_len, in krb5kdf_dup()
112 &dest->key, &dest->key_len) in krb5kdf_dup()
149 return KRB5KDF(cipher, engine, ctx->key, ctx->key_len, in krb5kdf_derive()
358 if (key_len != (size_t)klen) { in cipher_init()
359 ret = EVP_CIPHER_CTX_set_key_length(ctx, key_len); in cipher_init()
392 if (key_len != okey_len) { in KRB5KDF()
397 key_len == 24 && okey_len == 21) { in KRB5KDF()
[all …]
H A Dsshkdf.c38 const unsigned char *key, size_t key_len,
47 size_t key_len; member
86 OPENSSL_clear_free(ctx->key, ctx->key_len); in kdf_sshkdf_reset()
100 if (!ossl_prov_memdup(src->key, src->key_len, in kdf_sshkdf_dup()
101 &dest->key, &dest->key_len) in kdf_sshkdf_dup()
158 int key_approved = ossl_kdf_check_key_size(ctx->key_len); in fips_key_check_passed()
203 return SSHKDF(md, ctx->key, ctx->key_len, in kdf_sshkdf_derive()
244 if (!sshkdf_set_membuf(&ctx->key, &ctx->key_len, p)) in kdf_sshkdf_set_ctx_params()
338 const unsigned char *key, size_t key_len, in SSHKDF() argument
356 if (!EVP_DigestUpdate(md, key, key_len)) in SSHKDF()
[all …]
H A Dhkdf.c56 const unsigned char *key, size_t key_len,
89 size_t key_len; member
139 OPENSSL_clear_free(ctx->key, ctx->key_len); in kdf_hkdf_reset()
154 || !ossl_prov_memdup(src->key, src->key_len, in kdf_hkdf_dup()
155 &dest->key , &dest->key_len) in kdf_hkdf_dup()
199 int key_approved = ossl_kdf_check_key_size(ctx->key_len); in fips_hkdf_key_check_passed()
245 ctx->key, ctx->key_len, key, keylen); in kdf_hkdf_derive()
248 return HKDF_Expand(md, ctx->key, ctx->key_len, ctx->info, in kdf_hkdf_derive()
302 OPENSSL_clear_free(ctx->key, ctx->key_len); in hkdf_common_set_ctx_params()
305 &ctx->key_len)) in hkdf_common_set_ctx_params()
[all …]
/openssl/test/
H A Dcmactest.c36 int key_len; member
154 || !TEST_true(CMAC_Init(ctx, test[0].key, test[0].key_len, NULL, NULL)) in test_cmac_bad()
197 if (!TEST_true(CMAC_Init(ctx, test[0].key, test[0].key_len, in test_cmac_run()
207 if (!TEST_true(CMAC_Init(ctx, test[1].key, test[1].key_len, in test_cmac_run()
217 if (!TEST_true(CMAC_Init(ctx, test[2].key, test[2].key_len, NULL, NULL)) in test_cmac_run()
244 if (!TEST_true(CMAC_Init(ctx, test[3].key, test[3].key_len, in test_cmac_run()
253 if (!TEST_true(CMAC_Init(ctx, test[4].key, test[4].key_len, in test_cmac_run()
262 if (!TEST_true(CMAC_Init(ctx, test[5].key, test[5].key_len, in test_cmac_run()
272 if (!TEST_true(CMAC_Init(ctx, test[6].key, test[6].key_len, in test_cmac_run()
283 if (!TEST_true(CMAC_Init(ctx, test[7].key, test[7].key_len, in test_cmac_run()
[all …]
H A Dhmactest.c37 int key_len; member
94 ebcdic2ascii(test[2].key, test[2].key, test[2].key_len); in test_hmac_md5()
99 test[idx].key, test[idx].key_len, in test_hmac_md5()
146 if (!TEST_true(HMAC_Init_ex(ctx, test[4].key, test[4].key_len, EVP_sha1(), NULL)) in test_hmac_run()
158 if (!TEST_true(HMAC_Init_ex(ctx, test[5].key, test[5].key_len, EVP_sha256(), NULL)) in test_hmac_run()
168 if (!TEST_true(HMAC_Init_ex(ctx, test[6].key, test[6].key_len, NULL, NULL)) in test_hmac_run()
231 if (!TEST_true(HMAC_Init_ex(ctx, test[7].key, test[7].key_len, EVP_sha1(), NULL)) in test_hmac_copy()
297 int key_len; member
403 test_chunks[idx].key_len); in test_hmac_chunks()
407 test_chunks[idx].key_len, md, NULL))) in test_hmac_chunks()
H A Dquic_srt_gen_test.c21 size_t key_len; member
58 t->key, t->key_len))) in test_srt_gen()
H A Dacvp_test.c871 const unsigned char *key, size_t key_len, in cipher_enc() argument
905 tst->key, tst->key_len, in cipher_enc_dec_test()
909 tst->key, tst->key_len, in cipher_enc_dec_test()
986 tst->key, tst->key_len, in aes_ccm_enc_dec_test()
990 tst->key, tst->key_len, in aes_ccm_enc_dec_test()
995 tst->key, tst->key_len, in aes_ccm_enc_dec_test()
1099 tst->key, tst->key_len, in aes_gcm_enc_dec_test()
1104 tst->key, tst->key_len, in aes_gcm_enc_dec_test()
1110 tst->key, tst->key_len, in aes_gcm_enc_dec_test()
1126 tst->key, tst->key_len, in aes_gcm_gen_iv_internal_test()
[all …]
/openssl/crypto/evp/
H A De_rc5.c75 const int key_len = EVP_CIPHER_CTX_get_key_length(ctx); in r_32_12_16_init_key() local
77 if (key_len > 255 || key_len < 0) { in r_32_12_16_init_key()
81 return RC5_32_set_key(&data(ctx)->ks, key_len, key, data(ctx)->rounds); in r_32_12_16_init_key()
H A Dcmeth_lib.c23 EVP_CIPHER *EVP_CIPHER_meth_new(int cipher_type, int block_size, int key_len) in EVP_CIPHER_meth_new() argument
30 cipher->key_len = key_len; in EVP_CIPHER_meth_new()
48 cipher->key_len)) != NULL) { in EVP_CIPHER_meth_dup()
H A Dp_enc.c22 int key_len, EVP_PKEY *pubk) in EVP_PKEY_encrypt_old() argument
37 RSA_public_encrypt(key_len, key, ek, rsa, RSA_PKCS1_PADDING); in EVP_PKEY_encrypt_old()
H A Devp_enc.c362 ctx->key_len = cipher->key_len; in evp_cipher_init_internal()
1064 c->key_len = keylen; in EVP_CIPHER_CTX_set_key_length()
1079 c->key_len = keylen; in EVP_CIPHER_CTX_set_key_length()
1127 if (ctx->key_len == arg) in EVP_CIPHER_CTX_ctrl()
1131 ctx->key_len = -1; in EVP_CIPHER_CTX_ctrl()
1337 if (p != NULL && !OSSL_PARAM_get_int(p, &ctx->key_len)) { in EVP_CIPHER_CTX_set_params()
1339 ctx->key_len = -1; in EVP_CIPHER_CTX_set_params()
/openssl/include/crypto/
H A Devp.h304 int key_len; member
441 key_len, iv_len, flags, init_key, cleanup, \ argument
444 nid##_##nmode, block_size, key_len, iv_len, \
457 #define BLOCK_CIPHER_def_cbc(cname, kstruct, nid, block_size, key_len, \ argument
463 #define BLOCK_CIPHER_def_cfb(cname, kstruct, nid, key_len, \ argument
467 key_len, iv_len, flags, init_key, cleanup, set_asn1, \
470 #define BLOCK_CIPHER_def_ofb(cname, kstruct, nid, key_len, \ argument
488 BLOCK_CIPHER_def_cfb(cname, kstruct, nid, key_len, iv_len, cbits, \
490 BLOCK_CIPHER_def_ofb(cname, kstruct, nid, key_len, iv_len, cbits, \
492 BLOCK_CIPHER_def_ecb(cname, kstruct, nid, block_size, key_len, flags, \
[all …]
/openssl/providers/implementations/ciphers/
H A Dcipher_aes_gcm_siv.c36 ctx->key_len = keybits / 8; in ossl_aes_gcm_siv_newctx()
103 if (keylen != ctx->key_len) { in ossl_aes_gcm_siv_init()
107 memcpy(ctx->key_gen_key, key, ctx->key_len); in ossl_aes_gcm_siv_init()
202 if (p != NULL && !OSSL_PARAM_set_size_t(p, ctx->key_len)) { in ossl_aes_gcm_siv_get_ctx_params()
253 size_t key_len; in ossl_aes_gcm_siv_set_ctx_params() local
255 if (!OSSL_PARAM_get_size_t(p, &key_len)) { in ossl_aes_gcm_siv_set_ctx_params()
260 if (key_len != ctx->key_len) { in ossl_aes_gcm_siv_set_ctx_params()
H A Dcipher_aes_gcm_siv.h40 size_t key_len; member
/openssl/providers/implementations/macs/
H A Dkmac_prov.c123 size_t key_len; member
161 OPENSSL_cleanse(kctx->key, kctx->key_len); in kmac_free()
252 dst->key_len = src->key_len; in kmac_dup()
255 memcpy(dst->key, src->key, src->key_len); in kmac_dup()
295 if (!kmac_bytepad_encode_key(kctx->key, sizeof(kctx->key), &kctx->key_len, in kmac_setkey()
321 } else if (kctx->key_len == 0) { in kmac_init()
357 && EVP_DigestUpdate(ctx, kctx->key, kctx->key_len); in kmac_init()
/openssl/crypto/hmac/
H A Dhmac_s390x.c97 int s390x_HMAC_init(HMAC_CTX *ctx, const void *key, int key_len, ENGINE *impl) in s390x_HMAC_init() argument
171 if (key_len > ctx->plat.s390x.blk_size) { in s390x_HMAC_init()
173 || !EVP_DigestUpdate(ctx->md_ctx, key, key_len) in s390x_HMAC_init()
178 if (key_len < 0 || key_len > (int)key_param_len) in s390x_HMAC_init()
180 memcpy(key_param, key, key_len); in s390x_HMAC_init()
H A Dhmac_local.h59 int s390x_HMAC_init(HMAC_CTX *ctx, const void *key, int key_len, ENGINE *impl);
H A Dhmac.c248 unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, in HMAC() argument
259 key, key_len, data, data_len, in HMAC()
/openssl/ssl/
H A Ds3_enc.c99 size_t n, iv_len, key_len; in ssl3_change_cipher_state() local
121 key_len = EVP_CIPHER_get_key_length(ciph); in ssl3_change_cipher_state()
129 n += key_len + key_len; in ssl3_change_cipher_state()
135 n += md_len + key_len; in ssl3_change_cipher_state()
137 n += key_len + iv_len; in ssl3_change_cipher_state()
150 NULL, 0, key, key_len, iv, iv_len, mac_secret, in ssl3_change_cipher_state()
/openssl/ssl/quic/
H A Dquic_srt_gen.c23 const unsigned char *key, size_t key_len) in ossl_quic_srt_gen_new() argument
43 if (!EVP_MAC_init(srt_gen->mac_ctx, key, key_len, params)) in ossl_quic_srt_gen_new()
H A Dquic_record_shared.c110 size_t key_len = 0, iv_len = 0; in el_setup_keyslot() local
124 key_len = ossl_qrl_get_suite_cipher_key_len(el->suite_id); in el_setup_keyslot()
155 key, key_len, 1)) in el_setup_keyslot()
170 || !ossl_assert(key_len == (size_t)EVP_CIPHER_get_key_length(cipher))) { in el_setup_keyslot()
/openssl/doc/man3/
H A DHMAC.pod23 unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
34 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int key_len,
51 int HMAC_Init(HMAC_CTX *ctx, const void *key, int key_len,
62 I<key_len> bytes long. The I<key> may also be NULL with I<key_len> being 0.
107 function I<evp_md> and the key I<key> which is I<key_len> bytes
/openssl/engines/
H A De_padlock.c621 int key_len = EVP_CIPHER_CTX_get_key_length(ctx) * 8; in padlock_aes_init_key() local
635 cdata->cword.b.rounds = 10 + (key_len - 128) / 32; in padlock_aes_init_key()
636 cdata->cword.b.ksize = (key_len - 128) / 64; in padlock_aes_init_key()
638 switch (key_len) { in padlock_aes_init_key()
659 AES_set_decrypt_key(key, key_len, &cdata->ks); in padlock_aes_init_key()
661 AES_set_encrypt_key(key, key_len, &cdata->ks); in padlock_aes_init_key()
/openssl/include/internal/
H A Dquic_srt_gen.h43 const unsigned char *key, size_t key_len);
/openssl/include/openssl/
H A Dhmac.h54 unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,

Completed in 44 milliseconds

12