Home
last modified time | relevance | path

Searched refs:subkey (Results 1 – 25 of 84) sorted by relevance

1234

/freebsd/sys/crypto/camellia/
H A Dcamellia.h36 uint32_t subkey[CAMELLIA_SUBKEYWORD]; /* encrypt/decrypt key schedule */ member
46 uint32_t *subkey);
50 const uint32_t *subkey,
55 const uint32_t *subkey,
58 void camellia_setup128(const unsigned char *key, uint32_t *subkey);
59 void camellia_setup192(const unsigned char *key, uint32_t *subkey);
60 void camellia_setup256(const unsigned char *key, uint32_t *subkey);
61 void camellia_encrypt128(const uint32_t *subkey, uint32_t *io);
62 void camellia_encrypt256(const uint32_t *subkey, uint32_t *io);
63 void camellia_decrypt128(const uint32_t *subkey, uint32_t *io);
[all …]
H A Dcamellia-api.c40 Camellia_Ekeygen(bits, key, ctx->subkey); in camellia_set_key()
48 Camellia_DecryptBlock(ctx->bits, src, ctx->subkey, dst); in camellia_decrypt()
55 Camellia_EncryptBlock(ctx->bits, src, ctx->subkey, dst); in camellia_encrypt()
H A Dcamellia.c74 #define SUBL(INDEX) (subkey[(INDEX)*2+1])
75 #define SUBR(INDEX) (subkey[(INDEX)*2])
437 camellia_setup128(const unsigned char *key, uint32_t *subkey) in camellia_setup128() argument
643 camellia_setup256(const unsigned char *key, uint32_t *subkey) in camellia_setup256() argument
923 camellia_setup192(const unsigned char *key, uint32_t *subkey) in camellia_setup192() argument
935 camellia_setup256(kk, subkey); in camellia_setup192()
943 camellia_encrypt128(const uint32_t *subkey, uint32_t *io) in camellia_encrypt128() argument
1010 camellia_decrypt128(const uint32_t *subkey, uint32_t *io) in camellia_decrypt128() argument
1080 camellia_encrypt256(const uint32_t *subkey, uint32_t *io) in camellia_encrypt256() argument
1163 camellia_decrypt256(const uint32_t *subkey, uint32_t *io) in camellia_decrypt256() argument
[all …]
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_stream/xsalsa20/
H A Dstream_xsalsa20.c11 unsigned char subkey[32]; in crypto_stream_xsalsa20() local
14 crypto_core_hsalsa20(subkey, n, k, NULL); in crypto_stream_xsalsa20()
15 ret = crypto_stream_salsa20(c, clen, n + 16, subkey); in crypto_stream_xsalsa20()
16 sodium_memzero(subkey, sizeof subkey); in crypto_stream_xsalsa20()
26 unsigned char subkey[32]; in crypto_stream_xsalsa20_xor_ic() local
29 crypto_core_hsalsa20(subkey, n, k, NULL); in crypto_stream_xsalsa20_xor_ic()
30 ret = crypto_stream_salsa20_xor_ic(c, m, mlen, n + 16, ic, subkey); in crypto_stream_xsalsa20_xor_ic()
31 sodium_memzero(subkey, sizeof subkey); in crypto_stream_xsalsa20_xor_ic()
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_secretbox/
H A Dcrypto_secretbox_easy.c24 unsigned char subkey[crypto_stream_salsa20_KEYBYTES]; in crypto_secretbox_detached() local
28 crypto_core_hsalsa20(subkey, n, k, NULL); in crypto_secretbox_detached()
48 n + 16, subkey); in crypto_secretbox_detached()
59 n + 16, 1U, subkey); in crypto_secretbox_detached()
61 sodium_memzero(subkey, sizeof subkey); in crypto_secretbox_detached()
90 unsigned char subkey[crypto_stream_salsa20_KEYBYTES]; in crypto_secretbox_open_detached() local
94 crypto_core_hsalsa20(subkey, n, k, NULL); in crypto_secretbox_open_detached()
96 n + 16, subkey); in crypto_secretbox_open_detached()
98 sodium_memzero(subkey, sizeof subkey); in crypto_secretbox_open_detached()
120 n + 16, subkey); in crypto_secretbox_open_detached()
[all …]
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_secretbox/xchacha20poly1305/
H A Dsecretbox_xchacha20poly1305.c28 unsigned char subkey[crypto_stream_chacha20_KEYBYTES]; in crypto_secretbox_xchacha20poly1305_detached() local
32 crypto_core_hchacha20(subkey, n, k, NULL); in crypto_secretbox_xchacha20poly1305_detached()
52 n + 16, subkey); in crypto_secretbox_xchacha20poly1305_detached()
63 n + 16, 1U, subkey); in crypto_secretbox_xchacha20poly1305_detached()
65 sodium_memzero(subkey, sizeof subkey); in crypto_secretbox_xchacha20poly1305_detached()
97 unsigned char subkey[crypto_stream_chacha20_KEYBYTES]; in crypto_secretbox_xchacha20poly1305_open_detached() local
101 crypto_core_hchacha20(subkey, n, k, NULL); in crypto_secretbox_xchacha20poly1305_open_detached()
103 n + 16, subkey); in crypto_secretbox_xchacha20poly1305_open_detached()
105 sodium_memzero(subkey, sizeof subkey); in crypto_secretbox_xchacha20poly1305_open_detached()
127 n + 16, subkey); in crypto_secretbox_xchacha20poly1305_open_detached()
[all …]
/freebsd/sys/contrib/libsodium/test/default/
H A Dkdf.c9 unsigned char *subkey; in tv_kdf() local
22 subkey = (unsigned char *) sodium_malloc(crypto_kdf_BYTES_MAX); in tv_kdf()
24 ret = crypto_kdf_derive_from_key(subkey, crypto_kdf_BYTES_MAX, in tv_kdf()
27 sodium_bin2hex(hex, sizeof hex, subkey, crypto_kdf_BYTES_MAX); in tv_kdf()
30 sodium_free(subkey); in tv_kdf()
33 subkey = (unsigned char *) sodium_malloc(crypto_kdf_BYTES_MAX); in tv_kdf()
34 if (crypto_kdf_derive_from_key(subkey, (size_t) i, in tv_kdf()
36 sodium_bin2hex(hex, sizeof hex, subkey, (size_t) i); in tv_kdf()
42 sodium_free(subkey); in tv_kdf()
/freebsd/crypto/heimdal/lib/krb5/
H A Dgenerate_subkey.c53 krb5_keyblock **subkey) in krb5_generate_subkey_extended() argument
57 ALLOC(*subkey, 1); in krb5_generate_subkey_extended()
58 if (*subkey == NULL) { in krb5_generate_subkey_extended()
67 ret = krb5_generate_random_keyblock(context, etype, *subkey); in krb5_generate_subkey_extended()
69 free(*subkey); in krb5_generate_subkey_extended()
70 *subkey = NULL; in krb5_generate_subkey_extended()
H A Dget_cred.c90 krb5_keyblock *subkey) in set_auth_data() argument
112 ret = krb5_crypto_init(context, subkey, 0, &crypto); in set_auth_data()
150 krb5_keyblock **subkey, in init_tgs_req() argument
271 ret = krb5_auth_con_getlocalsubkey(context, ac, subkey); in init_tgs_req()
330 const krb5_keyblock *subkey = skey; in decrypt_tkt_with_subkey() local
343 if (subkey) { in decrypt_tkt_with_subkey()
344 ret = krb5_crypto_init(context, subkey, 0, &crypto); in decrypt_tkt_with_subkey()
356 if (ret && subkey->keytype == ETYPE_ARCFOUR_HMAC_MD5) { in decrypt_tkt_with_subkey()
365 if (subkey == NULL || ret) { in decrypt_tkt_with_subkey()
413 krb5_keyblock *subkey = NULL; in get_cred_kdc() local
[all …]
/freebsd/crypto/krb5/src/lib/krb5/krb/
H A Dgen_subkey.c33 krb5_keyblock **subkey) in krb5_generate_subkey_extended() argument
38 *subkey = NULL; in krb5_generate_subkey_extended()
46 free(*subkey); in krb5_generate_subkey_extended()
50 *subkey = keyblock; in krb5_generate_subkey_extended()
55 krb5_generate_subkey(krb5_context context, const krb5_keyblock *key, krb5_keyblock **subkey) in krb5_generate_subkey() argument
57 return krb5_generate_subkey_extended(context, key, key->enctype, subkey); in krb5_generate_subkey()
H A Dsend_tgs.c53 krb5_creds *tgt, krb5_keyblock *subkey, in tgs_construct_ap_req() argument
77 authent.subkey = subkey; in tgs_construct_ap_req()
135 krb5_keyblock *subkey = NULL; in k5_make_tgs_req() local
173 ret = krb5_generate_subkey(context, &tgt->keyblock, &subkey); in k5_make_tgs_req()
176 TRACE_SEND_TGS_SUBKEY(context, subkey); in k5_make_tgs_req()
178 ret = krb5int_fast_tgs_armor(context, fast_state, subkey, &tgt->keyblock, in k5_make_tgs_req()
187 ret = krb5_encrypt_helper(context, subkey, in k5_make_tgs_req()
234 ret = tgs_construct_ap_req(context, req_body_asn1, tgt, subkey, in k5_make_tgs_req()
273 ret = (*pacb_fn)(context, subkey, &req, pacb_data); in k5_make_tgs_req()
287 *subkey_out = subkey; in k5_make_tgs_req()
[all …]
H A Drd_rep.c114 if (enc->subkey) { in krb5_rd_rep()
116 enc->subkey); in krb5_rd_rep()
120 enc->subkey); in krb5_rd_rep()
126 auth_context->negotiated_etype = enc->subkey->enctype; in krb5_rd_rep()
132 TRACE_RD_REP(context, enc->ctime, enc->cusec, enc->subkey, in krb5_rd_rep()
189 if (repl->subkey != NULL) { in krb5_rd_rep_dce()
H A Dmk_rep.c95 repl.subkey = NULL; in k5_mk_rep()
104 repl.subkey = &auth_context->send_subkey->keyblock; in k5_mk_rep()
106 repl.subkey = auth_context->authentp->subkey; in k5_mk_rep()
113 TRACE_MK_REP(context, repl.ctime, repl.cusec, repl.subkey, in k5_mk_rep()
H A Dcopy_athctr.c55 if (authfrom->subkey) { in krb5_copy_authenticator()
56 retval = krb5_copy_keyblock(context, authfrom->subkey, &tempto->subkey); in krb5_copy_authenticator()
69 krb5_free_keyblock(context, tempto->subkey); in krb5_copy_authenticator()
H A Dser_auth.c62 if (!kret && authenticator->subkey) in k5_size_authenticator()
63 kret = k5_size_keyblock(authenticator->subkey, &required); in k5_size_authenticator()
126 if (!kret && authenticator->subkey) in k5_externalize_authenticator()
127 kret = k5_externalize_keyblock(authenticator->subkey, in k5_externalize_authenticator()
220 kret = k5_internalize_keyblock(&authenticator->subkey, in k5_internalize_authenticator()
H A Dgc_via_tkt.c171 krb5_keyblock *subkey, in krb5int_process_tgs_reply() argument
228 retval = krb5int_decode_tgs_rep(context, fast_state, response_data, subkey, in krb5int_process_tgs_reply()
348 krb5_keyblock *subkey = NULL; in krb5_get_cred_via_tkt_ext() local
366 &request_data, &timestamp, &nonce, &subkey); in krb5_get_cred_via_tkt_ext()
399 timestamp, nonce, subkey, in krb5_get_cred_via_tkt_ext()
412 if (subkey != NULL) { in krb5_get_cred_via_tkt_ext()
414 *out_subkey = subkey; in krb5_get_cred_via_tkt_ext()
416 krb5_free_keyblock(context, subkey); in krb5_get_cred_via_tkt_ext()
H A Ds4u_creds.c200 krb5_keyblock *subkey, in build_pa_s4u_x509_user() argument
219 if (subkey->enctype == ENCTYPE_ARCFOUR_HMAC || in build_pa_s4u_x509_user()
220 subkey->enctype == ENCTYPE_ARCFOUR_HMAC_EXP) { in build_pa_s4u_x509_user()
223 code = krb5int_c_mandatory_cksumtype(context, subkey->enctype, in build_pa_s4u_x509_user()
229 code = krb5_c_make_checksum(context, cksumtype, subkey, in build_pa_s4u_x509_user()
274 krb5_keyblock *subkey, in verify_s4u2self_reply() argument
290 switch (subkey->enctype) { in verify_s4u2self_reply()
333 code = krb5_c_verify_checksum(context, subkey, usage, datap, in verify_s4u2self_reply()
515 krb5_keyblock *subkey = NULL; in krb5_get_self_cred_from_kdc() local
567 out_creds, &subkey); in krb5_get_self_cred_from_kdc()
[all …]
/freebsd/crypto/krb5/src/lib/crypto/builtin/camellia/
H A Dcamellia.h63 void camellia_setup128(const unsigned char *key, u32 *subkey);
64 void camellia_setup192(const unsigned char *key, u32 *subkey);
65 void camellia_setup256(const unsigned char *key, u32 *subkey);
66 void camellia_encrypt128(const u32 *subkey, u32 *io);
67 void camellia_decrypt128(const u32 *subkey, u32 *io);
68 void camellia_encrypt256(const u32 *subkey, u32 *io);
69 void camellia_decrypt256(const u32 *subkey, u32 *io);
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/
H A Dsecretbox_xsalsa20poly1305.c31 unsigned char subkey[32]; in crypto_secretbox_xsalsa20poly1305_open() local
37 crypto_stream_xsalsa20(subkey, 32, n, k); in crypto_secretbox_xsalsa20poly1305_open()
39 clen - 32, subkey) != 0) { in crypto_secretbox_xsalsa20poly1305_open()
/freebsd/contrib/jemalloc/src/
H A Drtree.c190 uintptr_t subkey = rtree_subkey(key, level); \ in rtree_child_node_read()
194 &node[subkey], level, dependent) : \ in rtree_child_leaf_tryread()
195 rtree_child_node_tryread(&node[subkey], \ in rtree_child_leaf_tryread()
200 &node[subkey], level, dependent) : \ in rtree_child_leaf_tryread()
201 rtree_child_leaf_tryread(&node[subkey], \ in rtree_child_leaf_tryread()
229 uintptr_t subkey = rtree_subkey(key, level); \ in rtree_leaf_elm_lookup_hard()
230 return &leaf[subkey]; \ in rtree_leaf_elm_lookup_hard()
/freebsd/lib/libnv/tests/
H A Dcnv_tests.cc148 const char *key, *subkey; in ATF_TEST_CASE_BODY() local
163 subkey = "subname"; in ATF_TEST_CASE_BODY()
167 nvlist_add_null(value, subkey); in ATF_TEST_CASE_BODY()
168 ATF_REQUIRE_EQ(strcmp(subkey, nvlist_next(value, &type, &cookie)), 0); in ATF_TEST_CASE_BODY()
172 ATF_REQUIRE(nvlist_exists(value, subkey)); in ATF_TEST_CASE_BODY()
173 ATF_REQUIRE(nvlist_exists_null(value, subkey)); in ATF_TEST_CASE_BODY()
199 ATF_REQUIRE_EQ(strcmp(subkey, nvlist_next(result, &type, &cookie)), 0); in ATF_TEST_CASE_BODY()
203 ATF_REQUIRE(nvlist_exists(result, subkey)); in ATF_TEST_CASE_BODY()
204 ATF_REQUIRE(nvlist_exists_null(result, subkey)); in ATF_TEST_CASE_BODY()
681 const char *key, *subkey; in ATF_TEST_CASE_BODY() local
[all …]
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_kdf/
H A Dcrypto_kdf.c36 crypto_kdf_derive_from_key(unsigned char *subkey, size_t subkey_len, in crypto_kdf_derive_from_key() argument
41 return crypto_kdf_blake2b_derive_from_key(subkey, subkey_len, in crypto_kdf_derive_from_key()
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_kdf/blake2b/
H A Dkdf_blake2b.c31 int crypto_kdf_blake2b_derive_from_key(unsigned char *subkey, size_t subkey_len, in crypto_kdf_blake2b_derive_from_key() argument
48 return crypto_generichash_blake2b_salt_personal(subkey, subkey_len, in crypto_kdf_blake2b_derive_from_key()
/freebsd/crypto/krb5/src/lib/gssapi/krb5/
H A Dutil_crypt.c58 kg_copy_keys(krb5_context context, krb5_gss_ctx_id_rec *ctx, krb5_key subkey) in kg_copy_keys() argument
64 code = krb5_k_create_key(context, &subkey->keyblock, &ctx->enc); in kg_copy_keys()
70 code = krb5_k_create_key(context, &subkey->keyblock, &ctx->seq); in kg_copy_keys()
78 kg_setup_keys(krb5_context context, krb5_gss_ctx_id_rec *ctx, krb5_key subkey, in kg_setup_keys() argument
84 assert(subkey != NULL); in kg_setup_keys()
94 code = krb5int_c_mandatory_cksumtype(context, subkey->keyblock.enctype, in kg_setup_keys()
99 switch (subkey->keyblock.enctype) { in kg_setup_keys()
101 code = kg_copy_keys(context, ctx, subkey); in kg_setup_keys()
115 code = kg_copy_keys(context, ctx, subkey); in kg_setup_keys()
H A Ddelete_sec_context.c67 if (ctx->subkey) in krb5_gss_delete_sec_context()
68 krb5_k_free_key(context, ctx->subkey); in krb5_gss_delete_sec_context()

1234