Home
last modified time | relevance | path

Searched refs:skey (Results 1 – 25 of 90) sorted by relevance

1234

/freebsd/contrib/bearssl/src/symcipher/
H A Ddes_tab.c222 process_block_unit(uint32_t *pl, uint32_t *pr, const uint32_t *skey) in process_block_unit() argument
232 t = l ^ Fconf(r, skey[(i << 1) + 0], skey[(i << 1) + 1]); in process_block_unit()
242 br_des_tab_process_block(unsigned num_rounds, const uint32_t *skey, void *block) in br_des_tab_process_block() argument
252 process_block_unit(&l, &r, skey); in br_des_tab_process_block()
253 skey += 32; in br_des_tab_process_block()
261 keysched_unit(uint32_t *skey, const void *key) in keysched_unit() argument
265 br_des_keysched_unit(skey, key); in keysched_unit()
274 xl = skey[(i << 1) + 0]; in keysched_unit()
275 xr = skey[(i << 1) + 1]; in keysched_unit()
284 skey[(i << 1) + 0] = ul; in keysched_unit()
[all …]
H A Ddes_tab_cbcdec.c33 ctx->num_rounds = br_des_tab_keysched(ctx->skey, key, len); in br_des_tab_cbcdec_init()
35 br_des_rev_skey(ctx->skey); in br_des_tab_cbcdec_init()
42 t = ctx->skey[i]; in br_des_tab_cbcdec_init()
43 ctx->skey[i] = ctx->skey[94 - i]; in br_des_tab_cbcdec_init()
44 ctx->skey[94 - i] = t; in br_des_tab_cbcdec_init()
45 t = ctx->skey[i + 1]; in br_des_tab_cbcdec_init()
46 ctx->skey[i + 1] = ctx->skey[95 - i]; in br_des_tab_cbcdec_init()
47 ctx->skey[95 - i] = t; in br_des_tab_cbcdec_init()
66 br_des_tab_process_block(ctx->num_rounds, ctx->skey, buf); in br_des_tab_cbcdec_run()
H A Ddes_ct_cbcdec.c33 ctx->num_rounds = br_des_ct_keysched(ctx->skey, key, len); in br_des_ct_cbcdec_init()
35 br_des_rev_skey(ctx->skey); in br_des_ct_cbcdec_init()
42 t = ctx->skey[i]; in br_des_ct_cbcdec_init()
43 ctx->skey[i] = ctx->skey[94 - i]; in br_des_ct_cbcdec_init()
44 ctx->skey[94 - i] = t; in br_des_ct_cbcdec_init()
45 t = ctx->skey[i + 1]; in br_des_ct_cbcdec_init()
46 ctx->skey[i + 1] = ctx->skey[95 - i]; in br_des_ct_cbcdec_init()
47 ctx->skey[95 - i] = t; in br_des_ct_cbcdec_init()
60 br_des_ct_skey_expand(sk_exp, ctx->num_rounds, ctx->skey); in br_des_ct_cbcdec_run()
H A Daes_big_dec.c144 br_aes_big_keysched_inv(uint32_t *skey, const void *key, size_t key_len) in br_aes_big_keysched_inv() argument
154 num_rounds = br_aes_keysched(skey, key, key_len); in br_aes_big_keysched_inv()
161 p = skey[i]; in br_aes_big_keysched_inv()
170 skey[i] = (q0 << 24) | (q1 << 16) | (q2 << 8) | q3; in br_aes_big_keysched_inv()
188 br_aes_big_decrypt(unsigned num_rounds, const uint32_t *skey, void *data) in br_aes_big_decrypt() argument
200 s0 ^= skey[(num_rounds << 2) + 0]; in br_aes_big_decrypt()
201 s1 ^= skey[(num_rounds << 2) + 1]; in br_aes_big_decrypt()
202 s2 ^= skey[(num_rounds << 2) + 2]; in br_aes_big_decrypt()
203 s3 ^= skey[(num_rounds << 2) + 3]; in br_aes_big_decrypt()
225 s0 ^= skey[u << 2]; in br_aes_big_decrypt()
[all …]
H A Daes_big_enc.c89 br_aes_big_encrypt(unsigned num_rounds, const uint32_t *skey, void *data) in br_aes_big_encrypt() argument
101 s0 ^= skey[0]; in br_aes_big_encrypt()
102 s1 ^= skey[1]; in br_aes_big_encrypt()
103 s2 ^= skey[2]; in br_aes_big_encrypt()
104 s3 ^= skey[3]; in br_aes_big_encrypt()
128 s0 ^= skey[u << 2]; in br_aes_big_encrypt()
129 s1 ^= skey[(u << 2) + 1]; in br_aes_big_encrypt()
130 s2 ^= skey[(u << 2) + 2]; in br_aes_big_encrypt()
131 s3 ^= skey[(u << 2) + 3]; in br_aes_big_encrypt()
149 s0 = t0 ^ skey[num_rounds << 2]; in br_aes_big_encrypt()
[all …]
H A Ddes_support.c91 br_des_keysched_unit(uint32_t *skey, const void *key) in br_des_keysched_unit() argument
145 skey[(i << 1) + 0] = kl; in br_des_keysched_unit()
146 skey[(i << 1) + 1] = kr; in br_des_keysched_unit()
152 br_des_rev_skey(uint32_t *skey) in br_des_rev_skey() argument
159 t = skey[i + 0]; in br_des_rev_skey()
160 skey[i + 0] = skey[30 - i]; in br_des_rev_skey()
161 skey[30 - i] = t; in br_des_rev_skey()
162 t = skey[i + 1]; in br_des_rev_skey()
163 skey[i + 1] = skey[31 - i]; in br_des_rev_skey()
164 skey[31 - i] = t; in br_des_rev_skey()
H A Ddes_ct.c73 keysched_unit(uint32_t *skey, const void *key) in keysched_unit() argument
77 br_des_keysched_unit(skey, key); in keysched_unit()
86 kl = skey[(i << 1) + 0]; in keysched_unit()
87 kr = skey[(i << 1) + 1]; in keysched_unit()
99 skey[(i << 1) + 0] = sk0; in keysched_unit()
100 skey[(i << 1) + 1] = sk1; in keysched_unit()
158 br_des_ct_keysched(uint32_t *skey, const void *key, size_t key_len) in br_des_ct_keysched() argument
162 keysched_unit(skey, key); in br_des_ct_keysched()
165 keysched_unit(skey, key); in br_des_ct_keysched()
166 keysched_unit(skey + 32, (const unsigned char *)key + 8); in br_des_ct_keysched()
[all …]
H A Daes_common.c71 br_aes_keysched(uint32_t *skey, const void *key, size_t key_len) in br_aes_keysched() argument
93 skey[i] = br_dec32be((const unsigned char *)key + (i << 2)); in br_aes_keysched()
98 tmp = skey[i - 1]; in br_aes_keysched()
105 skey[i] = skey[i - nk] ^ tmp; in br_aes_keysched()
H A Daes_ct.c262 uint32_t skey[120]; in br_aes_ct_keysched() local
283 skey[(i << 1) + 0] = tmp; in br_aes_ct_keysched()
284 skey[(i << 1) + 1] = tmp; in br_aes_ct_keysched()
293 tmp ^= skey[(i - nk) << 1]; in br_aes_ct_keysched()
294 skey[(i << 1) + 0] = tmp; in br_aes_ct_keysched()
295 skey[(i << 1) + 1] = tmp; in br_aes_ct_keysched()
302 br_aes_ct_ortho(skey + (i << 1)); in br_aes_ct_keysched()
305 comp_skey[i] = (skey[j + 0] & 0x55555555) in br_aes_ct_keysched()
306 | (skey[j + 1] & 0xAAAAAAAA); in br_aes_ct_keysched()
313 br_aes_ct_skey_expand(uint32_t *skey, in br_aes_ct_skey_expand() argument
[all …]
H A Daes_ct64.c314 uint32_t skey[60]; in br_aes_ct64_keysched() local
332 br_range_dec32le(skey, (key_len >> 2), key); in br_aes_ct64_keysched()
333 tmp = skey[(key_len >> 2) - 1]; in br_aes_ct64_keysched()
341 tmp ^= skey[i - nk]; in br_aes_ct64_keysched()
342 skey[i] = tmp; in br_aes_ct64_keysched()
352 br_aes_ct64_interleave_in(&q[0], &q[4], skey + i); in br_aes_ct64_keysched()
376 br_aes_ct64_skey_expand(uint64_t *skey, in br_aes_ct64_skey_expand() argument
393 skey[v + 0] = (x0 << 4) - x0; in br_aes_ct64_skey_expand()
394 skey[v + 1] = (x1 << 4) - x1; in br_aes_ct64_skey_expand()
395 skey[v + 2] = (x2 << 4) - x2; in br_aes_ct64_skey_expand()
[all …]
H A Daes_small_enc.c106 br_aes_small_encrypt(unsigned num_rounds, const uint32_t *skey, void *data) in br_aes_small_encrypt() argument
116 add_round_key(state, skey); in br_aes_small_encrypt()
121 add_round_key(state, skey + (u << 2)); in br_aes_small_encrypt()
125 add_round_key(state, skey + (num_rounds << 2)); in br_aes_small_encrypt()
H A Daes_ct64_enc.c101 const uint64_t *skey, uint64_t *q) in br_aes_ct64_bitslice_encrypt() argument
105 add_round_key(q, skey); in br_aes_ct64_bitslice_encrypt()
110 add_round_key(q, skey + (u << 3)); in br_aes_ct64_bitslice_encrypt()
114 add_round_key(q, skey + (num_rounds << 3)); in br_aes_ct64_bitslice_encrypt()
H A Daes_ct_enc.c98 const uint32_t *skey, uint32_t *q) in br_aes_ct_bitslice_encrypt() argument
102 add_round_key(q, skey); in br_aes_ct_bitslice_encrypt()
107 add_round_key(q, skey + (u << 3)); in br_aes_ct_bitslice_encrypt()
111 add_round_key(q, skey + (num_rounds << 3)); in br_aes_ct_bitslice_encrypt()
H A Daes_pwr8_ctrcbc.c43 ctx->num_rounds = br_aes_pwr8_keysched(ctx->skey.skni, key, len); in br_aes_pwr8_ctrcbc_init()
792 ctrcbc_128_encrypt(ctx->skey.skni, ctr, cbcmac, data, len >> 4); in br_aes_pwr8_ctrcbc_encrypt()
795 ctrcbc_192_encrypt(ctx->skey.skni, ctr, cbcmac, data, len >> 4); in br_aes_pwr8_ctrcbc_encrypt()
798 ctrcbc_256_encrypt(ctx->skey.skni, ctr, cbcmac, data, len >> 4); in br_aes_pwr8_ctrcbc_encrypt()
813 ctrcbc_128_decrypt(ctx->skey.skni, ctr, cbcmac, data, len >> 4); in br_aes_pwr8_ctrcbc_decrypt()
816 ctrcbc_192_decrypt(ctx->skey.skni, ctr, cbcmac, data, len >> 4); in br_aes_pwr8_ctrcbc_decrypt()
819 ctrcbc_256_decrypt(ctx->skey.skni, ctr, cbcmac, data, len >> 4); in br_aes_pwr8_ctrcbc_decrypt()
851 ctr_128(ctx->skey.skni, ctrbuf, data, len >> 6); in br_aes_pwr8_ctrcbc_ctr()
854 ctr_192(ctx->skey.skni, ctrbuf, data, len >> 6); in br_aes_pwr8_ctrcbc_ctr()
857 ctr_256(ctx->skey.skni, ctrbuf, data, len >> 6); in br_aes_pwr8_ctrcbc_ctr()
[all …]
H A Daes_small_dec.c153 br_aes_small_decrypt(unsigned num_rounds, const uint32_t *skey, void *data) in br_aes_small_decrypt() argument
163 add_round_key(state, skey + (num_rounds << 2)); in br_aes_small_decrypt()
167 add_round_key(state, skey + (u << 2)); in br_aes_small_decrypt()
172 add_round_key(state, skey); in br_aes_small_decrypt()
/freebsd/sys/netinet/
H A Dsctp_auth.c472 sctp_free_sharedkey(sctp_sharedkey_t *skey) in sctp_free_sharedkey() argument
474 if (skey == NULL) in sctp_free_sharedkey()
477 if (SCTP_DECREMENT_AND_CHECK_REFCOUNT(&skey->refcount)) { in sctp_free_sharedkey()
478 if (skey->key != NULL) in sctp_free_sharedkey()
479 sctp_free_key(skey->key); in sctp_free_sharedkey()
480 SCTP_FREE(skey, SCTP_M_AUTH_KY); in sctp_free_sharedkey()
487 sctp_sharedkey_t *skey; in sctp_find_sharedkey() local
489 LIST_FOREACH(skey, shared_keys, next) { in sctp_find_sharedkey()
490 if (skey->keyid == key_id) in sctp_find_sharedkey()
491 return (skey); in sctp_find_sharedkey()
[all …]
/freebsd/sys/geom/bde/
H A Dg_bde_crypt.c
/freebsd/contrib/bearssl/inc/
H A Dbearssl_block.h713 uint32_t skey[60]; member
728 uint32_t skey[60]; member
744 uint32_t skey[60]; member
760 uint32_t skey[60]; member
933 uint32_t skey[60]; member
948 uint32_t skey[60]; member
964 uint32_t skey[60]; member
980 uint32_t skey[60]; member
1152 uint32_t skey[60]; member
1167 uint32_t skey[60]; member
[all …]
/freebsd/contrib/wpa/src/crypto/
H A Dcrypto_libtomcrypt.c42 symmetric_key skey; in des_encrypt() local
53 des_setup(pkey, 8, 0, &skey); in des_encrypt()
54 des_ecb_encrypt(clear, cypher, &skey); in des_encrypt()
55 des_done(&skey); in des_encrypt()
88 symmetric_key *skey; in aes_encrypt_init() local
89 skey = os_malloc(sizeof(*skey)); in aes_encrypt_init()
90 if (skey == NULL) in aes_encrypt_init()
92 if (aes_setup(key, len, 0, skey) != CRYPT_OK) { in aes_encrypt_init()
93 os_free(skey); in aes_encrypt_init()
96 return skey; in aes_encrypt_init()
[all …]
/freebsd/crypto/openssl/demos/cms/
H A Dcms_sign.c19 EVP_PKEY *skey = NULL; in main() local
43 skey = PEM_read_bio_PrivateKey(tbio, NULL, 0, NULL); in main()
45 if (!scert || !skey) in main()
56 cms = CMS_sign(scert, skey, NULL, in, flags); in main()
83 EVP_PKEY_free(skey); in main()
H A Dcms_sign2.c19 EVP_PKEY *skey = NULL, *skey2 = NULL; in main() local
35 skey = PEM_read_bio_PrivateKey(tbio, NULL, 0, NULL); in main()
65 if (!CMS_add1_signer(cms, scert, skey, NULL, 0)) in main()
91 EVP_PKEY_free(skey); in main()
/freebsd/crypto/openssl/demos/smime/
H A Dsmsign.c19 EVP_PKEY *skey = NULL; in main() local
43 skey = PEM_read_bio_PrivateKey(tbio, NULL, 0, NULL); in main()
45 if (!scert || !skey) in main()
56 p7 = PKCS7_sign(scert, skey, NULL, in, flags); in main()
81 EVP_PKEY_free(skey); in main()
H A Dsmsign2.c19 EVP_PKEY *skey = NULL, *skey2 = NULL; in main() local
35 skey = PEM_read_bio_PrivateKey(tbio, NULL, 0, NULL); in main()
65 if (!PKCS7_sign_add_signer(p7, scert, skey, NULL, 0)) in main()
89 EVP_PKEY_free(skey); in main()
/freebsd/contrib/telnet/libtelnet/
H A Dkerberos.c233 Session_Key skey; in kerberos4_is() local
301 skey.type = SK_DES; in kerberos4_is()
302 skey.length = 8; in kerberos4_is()
303 skey.data = session_key; in kerberos4_is()
304 encrypt_session_key(&skey, 1); in kerberos4_is()
334 Session_Key skey; in kerberos4_reply() local
360 skey.type = SK_DES; in kerberos4_reply()
361 skey.length = 8; in kerberos4_reply()
362 skey.data = session_key; in kerberos4_reply()
363 encrypt_session_key(&skey, 0); in kerberos4_reply()
H A Dsra.c154 Session_Key skey; in sra_is() local
206 skey.data = ck; in sra_is()
207 skey.type = SK_DES; in sra_is()
208 skey.length = 8; in sra_is()
209 encrypt_session_key(&skey, 1); in sra_is()
245 Session_Key skey; in sra_reply() local
324 skey.data = ck; in sra_reply()
325 skey.type = SK_DES; in sra_reply()
326 skey.length = 8; in sra_reply()
327 encrypt_session_key(&skey, 0); in sra_reply()

1234