Home
last modified time | relevance | path

Searched refs:keylen (Results 1 – 25 of 413) sorted by relevance

12345678910>>...17

/freebsd/sys/contrib/libsodium/src/libsodium/crypto_generichash/blake2b/ref/
H A Dgenerichash_blake2b.c16 keylen > BLAKE2B_KEYBYTES || inlen > UINT64_MAX) { in crypto_generichash_blake2b()
20 assert(keylen <= UINT8_MAX); in crypto_generichash_blake2b()
23 (uint8_t) keylen); in crypto_generichash_blake2b()
33 keylen > BLAKE2B_KEYBYTES || inlen > UINT64_MAX) { in crypto_generichash_blake2b_salt_personal()
37 assert(keylen <= UINT8_MAX); in crypto_generichash_blake2b_salt_personal()
50 keylen > BLAKE2B_KEYBYTES) { in crypto_generichash_blake2b_init()
54 assert(keylen <= UINT8_MAX); in crypto_generichash_blake2b_init()
55 if (key == NULL || keylen <= 0U) { in crypto_generichash_blake2b_init()
73 keylen > BLAKE2B_KEYBYTES) { in crypto_generichash_blake2b_init_salt_personal()
77 assert(keylen <= UINT8_MAX); in crypto_generichash_blake2b_init_salt_personal()
[all …]
H A Dblake2b-ref.c178 const uint8_t keylen) in blake2b_init_key() argument
185 if (!key || !keylen || keylen > BLAKE2B_KEYBYTES) { in blake2b_init_key()
189 P->key_length = keylen; in blake2b_init_key()
223 if (!key || !keylen || keylen > BLAKE2B_KEYBYTES) { in blake2b_init_key_salt_personal()
227 P->key_length = keylen; in blake2b_init_key_salt_personal()
348 if (NULL == key && keylen > 0) { in blake2b()
351 if (keylen > BLAKE2B_KEYBYTES) { in blake2b()
354 if (keylen > 0) { in blake2b()
386 if (NULL == key && keylen > 0) { in blake2b_salt_personal()
389 if (keylen > BLAKE2B_KEYBYTES) { in blake2b_salt_personal()
[all …]
/freebsd/sys/contrib/libb2/
H A Dblake2-dispatch.c159 int blake2b_init_key_ref( blake2b_state *S, size_t outlen, const void *key, size_t keylen );
168 int blake2b_init_key_sse2( blake2b_state *S, size_t outlen, const void *key, size_t keylen );
189 int blake2b_init_key_avx( blake2b_state *S, size_t outlen, const void *key, size_t keylen );
455 return blake2b_init_key_ptr( S, outlen, key, keylen ); in blake2b_init_key_dispatch()
479 return blake2b_ptr( out, in, key, outlen, inlen, keylen ); in blake2b_dispatch()
489 return blake2b_init_key_ptr( S, outlen, key, keylen ); in blake2b_init_key()
509 return blake2b_ptr( out, in, key, outlen, inlen, keylen ); in blake2b()
521 return blake2s_init_key_ptr( S, outlen, key, keylen ); in blake2s_init_key_dispatch()
545 return blake2s_ptr( out, in, key, outlen, inlen, keylen ); in blake2s_dispatch()
555 return blake2s_init_key_ptr( S, outlen, key, keylen ); in blake2s_init_key()
[all …]
H A Dblake2bp.c32 P->key_length = keylen; in blake2bp_init_leaf()
47 static int blake2bp_init_root( blake2b_state *S, uint8_t outlen, uint8_t keylen ) in blake2bp_init_root() argument
51 P->key_length = keylen; in blake2bp_init_root()
90 if( !key || !keylen || keylen > BLAKE2B_KEYBYTES ) return -1; in blake2bp_init_key()
95 if( blake2bp_init_root( S->R, ( uint8_t ) outlen, ( uint8_t ) keylen ) < 0 ) in blake2bp_init_key()
108 memcpy( block, key, keylen ); in blake2bp_init_key()
207 if ( NULL == key && keylen > 0) return -1; in blake2bp()
211 if( keylen > BLAKE2B_KEYBYTES ) return -1; in blake2bp()
219 if( keylen > 0 ) in blake2bp()
223 memcpy( block, key, keylen ); in blake2bp()
[all …]
H A Dblake2sp.c31 P->key_length = keylen; in blake2sp_init_leaf()
45 static int blake2sp_init_root( blake2s_state *S, uint8_t outlen, uint8_t keylen ) in blake2sp_init_root() argument
49 P->key_length = keylen; in blake2sp_init_root()
87 if( !key || !keylen || keylen > BLAKE2S_KEYBYTES ) return -1; in blake2sp_init_key()
92 if( blake2sp_init_root( S->R, ( uint8_t ) outlen, ( uint8_t ) keylen ) < 0 ) in blake2sp_init_key()
105 memcpy( block, key, keylen ); in blake2sp_init_key()
205 if ( NULL == key && keylen > 0 ) return -1; in blake2sp()
209 if( keylen > BLAKE2S_KEYBYTES ) return -1; in blake2sp()
217 if( keylen > 0 ) in blake2sp()
221 memcpy( block, key, keylen ); in blake2sp()
[all …]
/freebsd/tools/tools/net80211/wesside/wesside/
H A Daircrack-ptw-lib.c142 j = (j + state->s[i] + key[i % keylen]) % n; in rc4init()
224 memcpy(&keybuf[IVBYTES], key, keylen); in correct()
252 for (i = 0; i < keylen; i++) { in getdrv()
286 if (keybyte == keylen) { in doRound()
287 return correct(state, key, keylen); in doRound()
324 for (i = 0; i < keylen; i++) { in doComputation()
346 for (j = 0; j < keylen; j++) { in doComputation()
381 for (i = 0; i < keylen; i++) { in PTW_computeKey()
393 for (i = 0; i < keylen; i++) { in PTW_computeKey()
408 getdrv(state->table, keylen, normal, ausreisser); in PTW_computeKey()
[all …]
/freebsd/crypto/openssh/
H A Dxmss_hash.c38 …ar *out, const unsigned int type, const unsigned char *key, unsigned int keylen, const unsigned ch… in core_hash_SHA2() argument
40 unsigned char buf[inlen + n + keylen]; in core_hash_SHA2()
47 for (i=0; i < keylen; i++) { in core_hash_SHA2()
52 buf[keylen + n + i] = in[i]; in core_hash_SHA2()
56 SHA256(buf, inlen + keylen + n, out); in core_hash_SHA2()
61 SHA512(buf, inlen + keylen + n, out); in core_hash_SHA2()
71 int prf(unsigned char *out, const unsigned char *in, const unsigned char *key, unsigned int keylen) in prf() argument
73 return core_hash_SHA2(out, 3, key, keylen, in, 32, keylen); in prf()
79 …, unsigned long long inlen, const unsigned char *key, const unsigned int keylen, const unsigned in… in h_msg() argument
81 if (keylen != 3*n){ in h_msg()
[all …]
/freebsd/contrib/bsnmp/lib/
H A Dsnmpcrypto.c70 *keylen = SNMP_AUTH_HMACMD5_KEY_SIZ; in snmp_digest_init()
73 *keylen = SNMP_AUTH_HMACSHA_KEY_SIZ; in snmp_digest_init()
93 uint32_t i, keylen, olen; in snmp_pdu_calc_digest() local
111 memset(extkey + keylen, 0, sizeof(extkey) - keylen); in snmp_pdu_calc_digest()
249 uint32_t keylen, olen; in snmp_passwd_to_keys() local
295 uint32_t keylen, olen; in snmp_get_local_keys() local
319 memcpy(authbuf + keylen, eid, elen); in snmp_get_local_keys()
320 memcpy(authbuf + keylen + elen, user->auth_key, keylen); in snmp_get_local_keys()
339 uint32_t i, keylen, olen; in snmp_calc_keychange() local
355 for (i = 0; i < keylen / 4; i++) in snmp_calc_keychange()
[all …]
/freebsd/sys/netinet/
H A Dsctp_auth.c251 new_key->keylen = keylen; in sctp_alloc_key()
272 if (key->keylen) { in sctp_print_key()
291 if (key->keylen) { in sctp_show_key()
323 new_key->keylen = keylen; in sctp_generate_random_key()
401 uint32_t keylen; in sctp_compute_hashkey() local
408 if (keylen > 0) { in sctp_compute_hashkey()
415 new_key->keylen = keylen; in sctp_compute_hashkey()
1374 uint32_t keylen; in sctp_auth_get_cookie_params() local
1462 keylen = 0; in sctp_auth_get_cookie_params()
1914 uint16_t keylen; in sctp_initialize_auth_params() local
[all …]
/freebsd/crypto/openssl/providers/implementations/exchange/
H A Decx_exch.c39 size_t keylen; member
44 static void *ecx_newctx(void *provctx, size_t keylen) in ecx_newctx() argument
57 ctx->keylen = keylen; in ecx_newctx()
83 || key->keylen != ecxctx->keylen in ecx_init()
105 || key->keylen != ecxctx->keylen in ecx_set_peer()
131 if (!ossl_assert(ecxctx->keylen == X25519_KEYLEN in ecx_derive()
132 || ecxctx->keylen == X448_KEYLEN)) { in ecx_derive()
138 *secretlen = ecxctx->keylen; in ecx_derive()
141 if (outlen < ecxctx->keylen) { in ecx_derive()
146 if (ecxctx->keylen == X25519_KEYLEN) { in ecx_derive()
[all …]
/freebsd/crypto/openssl/crypto/evp/
H A De_camellia.c143 static const EVP_CIPHER cmll_t4_##keylen##_##mode = { \
144 nid##_##keylen##_##nmode,blocksize,keylen/8,ivlen, \
152 static const EVP_CIPHER camellia_##keylen##_##mode = { \
153 nid##_##keylen##_##nmode,blocksize, \
154 keylen/8,ivlen, \
162 const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
163 { return SPARC_CMLL_CAPABLE?&cmll_t4_##keylen##_##mode:&camellia_##keylen##_##mode; }
168 static const EVP_CIPHER camellia_##keylen##_##mode = { \
169 nid##_##keylen##_##nmode,blocksize,keylen/8,ivlen, \
177 const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
[all …]
H A Dp5_crpt2.c60 if (EVP_KDF_derive(kctx, out, keylen, params) != 1) in ossl_pkcs5_pbkdf2_hmac_ex()
77 0, keylen, out, keylen); in ossl_pkcs5_pbkdf2_hmac_ex()
88 keylen, out, NULL, NULL); in PKCS5_PBKDF2_HMAC()
94 int keylen, unsigned char *out) in PKCS5_PBKDF2_HMAC_SHA1() argument
101 digest, keylen, out, NULL, NULL); in PKCS5_PBKDF2_HMAC_SHA1()
188 unsigned int keylen = 0; in PKCS5_v2_PBKDF2_keyivgen_ex() local
198 keylen = EVP_CIPHER_CTX_get_key_length(ctx); in PKCS5_v2_PBKDF2_keyivgen_ex()
199 OPENSSL_assert(keylen <= sizeof(key)); in PKCS5_v2_PBKDF2_keyivgen_ex()
215 keylen = t; in PKCS5_v2_PBKDF2_keyivgen_ex()
255 keylen, key, libctx, propq)) in PKCS5_v2_PBKDF2_keyivgen_ex()
[all …]
/freebsd/crypto/openssl/crypto/cms/
H A Dcms_enc.c134 ec->keylen = tkeylen; in ossl_cms_EncryptedContent_init_bio()
143 if (ec->keylen != tkeylen) { in ossl_cms_EncryptedContent_init_bio()
145 if (EVP_CIPHER_CTX_set_key_length(ctx, ec->keylen) <= 0) { in ossl_cms_EncryptedContent_init_bio()
155 OPENSSL_clear_free(ec->key, ec->keylen); in ossl_cms_EncryptedContent_init_bio()
157 ec->keylen = tkeylen; in ossl_cms_EncryptedContent_init_bio()
197 OPENSSL_clear_free(ec->key, ec->keylen); in ossl_cms_EncryptedContent_init_bio()
214 if ((ec->key = OPENSSL_malloc(keylen)) == NULL) { in ossl_cms_EncryptedContent_init()
218 memcpy(ec->key, key, keylen); in ossl_cms_EncryptedContent_init()
220 ec->keylen = keylen; in ossl_cms_EncryptedContent_init()
231 if (!key || !keylen) { in CMS_EncryptedData_set1_key()
[all …]
/freebsd/crypto/openssl/providers/implementations/macs/
H A Dhmac_prov.c53 size_t keylen; member
97 OPENSSL_secure_clear_free(macctx->key, macctx->keylen); in hmac_free()
127 dst->key = OPENSSL_secure_malloc(src->keylen > 0 ? src->keylen : 1); in hmac_dup()
132 memcpy(dst->key, src->key, src->keylen); in hmac_dup()
159 macctx->key = OPENSSL_secure_malloc(keylen > 0 ? keylen : 1); in hmac_setkey()
162 memcpy(macctx->key, key, keylen); in hmac_setkey()
163 macctx->keylen = keylen; in hmac_setkey()
168 return HMAC_Init_ex(macctx->ctx, key, keylen, digest, in hmac_setkey()
174 size_t keylen, const OSSL_PARAM params[]) in hmac_init() argument
182 return hmac_setkey(macctx, key, keylen); in hmac_init()
[all …]
/freebsd/contrib/libarchive/libarchive/
H A Darchive_blake2.h148 int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen );
154 int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen );
160 int blake2sp_init_key( blake2sp_state *S, size_t outlen, const void *key, size_t keylen );
165 int blake2bp_init_key( blake2bp_state *S, size_t outlen, const void *key, size_t keylen );
171 int blake2xs_init_key( blake2xs_state *S, const size_t outlen, const void *key, size_t keylen );
176 int blake2xb_init_key( blake2xb_state *S, const size_t outlen, const void *key, size_t keylen );
181 … blake2s( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen );
182 … blake2b( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen );
184 …blake2sp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen );
185 …blake2bp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen );
[all …]
H A Darchive_blake2sp_ref.c49 P->key_length = (uint8_t)keylen; in blake2sp_init_leaf()
62 static int blake2sp_init_root( blake2s_state *S, size_t outlen, size_t keylen ) in blake2sp_init_root() argument
66 P->key_length = (uint8_t)keylen; in blake2sp_init_root()
107 if( !key || !keylen || keylen > BLAKE2S_KEYBYTES ) return -1; in blake2sp_init_key()
113 if( blake2sp_init_root( S->R, outlen, keylen ) < 0 ) in blake2sp_init_key()
124 memcpy( block, key, keylen ); in blake2sp_init_key()
228 if ( NULL == key && keylen > 0) return -1; in blake2sp()
232 if( keylen > BLAKE2S_KEYBYTES ) return -1; in blake2sp()
239 if( keylen > 0 ) in blake2sp()
243 memcpy( block, key, keylen ); in blake2sp()
[all …]
/freebsd/crypto/openssl/test/recipes/30-test_evp_data/
H A Devpmac_common.txt48 Input = "Sample message for keylen=blocklen"
56 Input = "Sample message for keylen<blocklen"
63 Input = "Sample message for keylen=blocklen"
72 Input = "Sample message for keylen=blocklen"
80 Input = "Sample message for keylen<blocklen"
86 Input = "Sample message for keylen=blocklen"
92 Input = "Sample message for keylen=blocklen"
100 Input = "Sample message for keylen<blocklen"
106 Input = "Sample message for keylen=blocklen"
112 Input = "Sample message for keylen=blocklen"
[all …]
/freebsd/crypto/openssh/openbsd-compat/
H A Dbcrypt_pbkdf.c115 uint8_t *key, size_t keylen, unsigned int rounds) in bcrypt_pbkdf() argument
124 size_t origkeylen = keylen; in bcrypt_pbkdf()
129 if (passlen == 0 || saltlen == 0 || keylen == 0 || in bcrypt_pbkdf()
130 keylen > sizeof(out) * sizeof(out) || saltlen > 1<<20) in bcrypt_pbkdf()
134 stride = (keylen + sizeof(out) - 1) / sizeof(out); in bcrypt_pbkdf()
135 amt = (keylen + stride - 1) / stride; in bcrypt_pbkdf()
143 for (count = 1; keylen > 0; count++) { in bcrypt_pbkdf()
166 amt = MINIMUM(amt, keylen); in bcrypt_pbkdf()
173 keylen -= i; in bcrypt_pbkdf()
185 arc4random_buf(key, keylen); in bcrypt_pbkdf()
/freebsd/crypto/openssl/providers/implementations/ciphers/
H A Dcipher_tdes_common.c64 static int tdes_init(void *vctx, const unsigned char *key, size_t keylen, in tdes_init() argument
89 if (keylen != ctx->keylen) { in tdes_init()
93 if (!ctx->hw->init(ctx, key, ctx->keylen)) in tdes_init()
100 int ossl_tdes_einit(void *vctx, const unsigned char *key, size_t keylen, in ossl_tdes_einit() argument
104 return tdes_init(vctx, key, keylen, iv, ivlen, params, 1); in ossl_tdes_einit()
107 int ossl_tdes_dinit(void *vctx, const unsigned char *key, size_t keylen, in ossl_tdes_dinit() argument
111 return tdes_init(vctx, key, keylen, iv, ivlen, params, 0); in ossl_tdes_dinit()
122 size_t kl = ctx->keylen;
H A Dcipher_aes_xts.c68 static int aes_xts_init(void *vctx, const unsigned char *key, size_t keylen, in aes_xts_init() argument
85 if (keylen != ctx->keylen) { in aes_xts_init()
89 if (!aes_xts_check_keys_differ(key, keylen / 2, enc)) in aes_xts_init()
91 if (!ctx->hw->init(ctx, key, keylen)) in aes_xts_init()
97 static int aes_xts_einit(void *vctx, const unsigned char *key, size_t keylen, in aes_xts_einit() argument
101 return aes_xts_init(vctx, key, keylen, iv, ivlen, params, 1); in aes_xts_einit()
104 static int aes_xts_dinit(void *vctx, const unsigned char *key, size_t keylen, in aes_xts_dinit() argument
108 return aes_xts_init(vctx, key, keylen, iv, ivlen, params, 0); in aes_xts_dinit()
241 size_t keylen; in aes_xts_set_ctx_params() local
243 if (!OSSL_PARAM_get_size_t(p, &keylen)) { in aes_xts_set_ctx_params()
[all …]
/freebsd/contrib/unbound/sldns/
H A Dkeyraw.c544 if(keylen != 64) { in sldns_gost2pkey_raw()
572 if(keylen != 2*256/8) return NULL; in sldns_ecdsa2pkey_raw()
575 if(keylen != 2*384/8) return NULL; in sldns_ecdsa2pkey_raw()
585 memmove(buf+1, key, keylen); in sldns_ecdsa2pkey_raw()
624 if(keylen != 2*256/8) return NULL; in sldns_ecdsa2pkey_raw()
627 if(keylen != 2*384/8) return NULL; in sldns_ecdsa2pkey_raw()
638 memmove(buf+1, key, keylen); in sldns_ecdsa2pkey_raw()
670 if(keylen != 32 || keylen + pre_len > sizeof(buf)) in sldns_ed255192pkey_raw()
673 memmove(buf+pre_len, key, keylen); in sldns_ed255192pkey_raw()
691 if(keylen != 57 || keylen + pre_len > sizeof(buf)) in sldns_ed4482pkey_raw()
[all …]
/freebsd/crypto/heimdal/lib/krb5/
H A Dcrypto-pk.c49 size_t keylen, offset; in _krb5_pk_octetstring2key() local
61 keylen = (et->keytype->bits + 7) / 8; in _krb5_pk_octetstring2key()
63 keydata = malloc(keylen); in _krb5_pk_octetstring2key()
93 min(keylen - offset, sizeof(shaoutput))); in _krb5_pk_octetstring2key()
97 } while(offset < keylen); in _krb5_pk_octetstring2key()
103 memset(keydata, 0, sizeof(keylen)); in _krb5_pk_octetstring2key()
213 size_t keylen, offset; in _krb5_pk_kdf() local
248 keylen = (et->keytype->bits + 7) / 8; in _krb5_pk_kdf()
250 keydata = malloc(keylen); in _krb5_pk_kdf()
290 } while(offset < keylen); in _krb5_pk_kdf()
[all …]
/freebsd/usr.sbin/ppp/
H A Dmppe.c101 unsigned keylen; /* 8 or 16 bytes */ member
151 RC4_set_key(&RC4Key, mp->keylen, InterimKey); in MPPEKeyChange()
152 RC4(&RC4Key, mp->keylen, InterimKey, mp->sesskey); in MPPEKeyChange()
655 mp->keylen = 16; in MPPE_InitState()
659 mp->keylen = 8; in MPPE_InitState()
663 mp->keylen = 8; in MPPE_InitState()
698 mip->keylen = bundle->radius.mppe.recvkeylen; in MPPEInitInput()
699 if (mip->keylen > sizeof mip->mastkey) in MPPEInitInput()
700 mip->keylen = sizeof mip->mastkey; in MPPEInitInput()
755 if (mop->keylen > sizeof mop->mastkey) in MPPEInitOutput()
[all …]
/freebsd/crypto/openssl/crypto/asn1/
H A Dp5_scrypt.c48 size_t keylen = 0; in PKCS5_pbe2_set_scrypt() local
106 keylen = EVP_CIPHER_get_key_length(cipher); in PKCS5_pbe2_set_scrypt()
112 pbe2->keyfunc = pkcs5_scrypt_set(salt, saltlen, keylen, N, r, p); in PKCS5_pbe2_set_scrypt()
178 if (keylen > 0) { in pkcs5_scrypt_set()
182 if (ASN1_INTEGER_set_int64(sparam->keyLength, keylen) == 0) in pkcs5_scrypt_set()
219 size_t keylen = 0; in PKCS5_v2_scrypt_keyivgen_ex() local
242 keylen = t; in PKCS5_v2_scrypt_keyivgen_ex()
249 || (spkeylen != keylen)) { in PKCS5_v2_scrypt_keyivgen_ex()
269 keylen, libctx, propq) == 0) in PKCS5_v2_scrypt_keyivgen_ex()
273 if (keylen) in PKCS5_v2_scrypt_keyivgen_ex()
[all …]
/freebsd/contrib/libucl/src/
H A Ducl_hash.c111 if (k1->keylen == k2->keylen) { in ucl_hash_equal()
124 unsigned len = o->keylen; in ucl_hash_caseless_func()
125 unsigned leftover = o->keylen % 8; in ucl_hash_caseless_func()
185 if (k1->keylen == k2->keylen) { in ucl_hash_caseless_equal()
193 size_t leftover = k1->keylen % 4; in ucl_hash_caseless_equal()
195 fp = k1->keylen - leftover; in ucl_hash_caseless_equal()
445 search.keylen = keylen; in ucl_hash_search()
597 if (oa->keylen == ob->keylen) { in ucl_hash_cmp_icase()
601 return ((int)(oa->keylen)) - ob->keylen; in ucl_hash_cmp_icase()
610 if (oa->keylen == ob->keylen) { in ucl_hash_cmp_case_sens()
[all …]

12345678910>>...17