/openssl/providers/implementations/kdfs/ |
H A D | krb5kdf.c | 47 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 D | sshkdf.c | 38 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 D | hkdf.c | 56 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 D | cmactest.c | 36 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 D | hmactest.c | 37 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 D | quic_srt_gen_test.c | 21 size_t key_len; member 58 t->key, t->key_len))) in test_srt_gen()
|
H A D | acvp_test.c | 871 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 D | e_rc5.c | 75 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 D | cmeth_lib.c | 23 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 D | p_enc.c | 22 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 D | evp_enc.c | 362 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 D | evp.h | 304 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 D | cipher_aes_gcm_siv.c | 36 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 D | cipher_aes_gcm_siv.h | 40 size_t key_len; member
|
/openssl/providers/implementations/macs/ |
H A D | kmac_prov.c | 123 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 D | hmac_s390x.c | 97 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 D | hmac_local.h | 59 int s390x_HMAC_init(HMAC_CTX *ctx, const void *key, int key_len, ENGINE *impl);
|
H A D | hmac.c | 248 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 D | s3_enc.c | 99 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 D | quic_srt_gen.c | 23 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 D | quic_record_shared.c | 110 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 D | HMAC.pod | 23 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 D | e_padlock.c | 621 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 D | quic_srt_gen.h | 43 const unsigned char *key, size_t key_len);
|
/openssl/include/openssl/ |
H A D | hmac.h | 54 unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
|