Home
last modified time | relevance | path

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

/openssh-portable/
H A Dxmss_hash.c41 …ar *out, const unsigned int type, const unsigned char *key, unsigned int keylen, const unsigned ch… in core_hash_SHA2() argument
43 unsigned char buf[inlen + n + keylen]; in core_hash_SHA2()
50 for (i=0; i < keylen; i++) { in core_hash_SHA2()
55 buf[keylen + n + i] = in[i]; in core_hash_SHA2()
59 SHA256(buf, inlen + keylen + n, out); in core_hash_SHA2()
64 SHA512(buf, inlen + keylen + n, out); in core_hash_SHA2()
74 int prf(unsigned char *out, const unsigned char *in, const unsigned char *key, unsigned int keylen) in prf() argument
76 return core_hash_SHA2(out, 3, key, keylen, in, 32, keylen); in prf()
82 …, unsigned long long inlen, const unsigned char *key, const unsigned int keylen, const unsigned in… in h_msg() argument
84 if (keylen != 3*n){ in h_msg()
[all …]
H A Dxmss_hash.h16 int prf(unsigned char *out, const unsigned char *in, const unsigned char *key, unsigned int keylen)…
17 …n,unsigned long long inlen, const unsigned char *key, const unsigned int keylen, const unsigned in…
H A Dcipher.c251 const u_char *key, u_int keylen, const u_char *iv, u_int ivlen, in cipher_init() argument
268 if (keylen < cipher->key_len || in cipher_init()
276 cc->cp_ctx = chachapoly_new(key, keylen); in cipher_init()
286 aesctr_keysetup(&cc->ac_ctx, key, 8 * keylen, 8 * ivlen); in cipher_init()
311 if (klen > 0 && keylen != (u_int)klen) { in cipher_init()
312 if (EVP_CIPHER_CTX_set_key_length(cc->evp, keylen) == 0) { in cipher_init()
H A Dcipher-chachapoly.c41 chachapoly_new(const u_char *key, u_int keylen) in chachapoly_new() argument
45 if (keylen != (32 + 32)) /* 2 x 256 bit keys */ in chachapoly_new()
H A Dsshkey-xmss.c272 size_t keylen = 0, ivlen = 0; in sshkey_xmss_init_enc_key() local
280 keylen = cipher_keylen(cipher); in sshkey_xmss_init_enc_key()
282 state->enc_keyiv_len = keylen + ivlen; in sshkey_xmss_init_enc_key()
912 keylen = cipher_keylen(cipher); in sshkey_xmss_encrypt_state()
915 if (state->enc_keyiv_len != keylen + ivlen) { in sshkey_xmss_encrypt_state()
929 memcpy(iv, key + keylen, ivlen); in sshkey_xmss_encrypt_state()
959 (r = cipher_init(&ciphercontext, cipher, key, keylen, in sshkey_xmss_encrypt_state()
989 size_t keylen, ivlen, authlen, aadlen; in sshkey_xmss_decrypt_state() local
1004 keylen = cipher_keylen(cipher); in sshkey_xmss_decrypt_state()
1007 if (state->enc_keyiv_len != keylen + ivlen) { in sshkey_xmss_decrypt_state()
[all …]
H A Dcipher-chachapoly-libcrypto.c43 chachapoly_new(const u_char *key, u_int keylen) in chachapoly_new() argument
47 if (keylen != (32 + 32)) /* 2 x 256 bit keys */ in chachapoly_new()
H A Dcipher-chachapoly.h29 struct chachapoly_ctx *chachapoly_new(const u_char *key, u_int keylen)
H A Dsshkey.c3840 size_t i, pubkeylen, keylen, ivlen, blocksize, authlen; in sshkey_private_to_blob2() local
3867 keylen = cipher_keylen(cipher); in sshkey_private_to_blob2()
3870 if ((key = calloc(1, keylen + ivlen)) == NULL) { in sshkey_private_to_blob2()
3890 key + keylen, ivlen, 1)) != 0) in sshkey_private_to_blob2()
3953 freezero(key, keylen + ivlen); in sshkey_private_to_blob2()
4043 size_t keylen = 0, ivlen = 0, authlen = 0, slen = 0; in private2_decrypt() local
4106 keylen = cipher_keylen(cipher); in private2_decrypt()
4109 if ((key = calloc(1, keylen + ivlen)) == NULL) { in private2_decrypt()
4118 key, keylen + ivlen, rounds) < 0) { in private2_decrypt()
4134 key + keylen, ivlen, 0)) != 0) in private2_decrypt()
[all …]
H A Dsshconnect2.c2079 size_t siglen = 0, keylen = 0; in userauth_hostbased() local
2151 if ((r = sshkey_to_blob(private, &keyblob, &keylen)) != 0) { in userauth_hostbased()
2161 (r = sshbuf_put_string(b, keyblob, keylen)) != 0 || in userauth_hostbased()
2182 (r = sshpkt_put_string(ssh, keyblob, keylen)) != 0 || in userauth_hostbased()
H A Dpacket.c2295 size_t keylen, ivlen, maclen; in newkeys_from_blob() local
2314 (r = sshbuf_get_string(b, &enc->key, &keylen)) != 0 || in newkeys_from_blob()
2342 enc->key_len = keylen; in newkeys_from_blob()
/openssh-portable/openbsd-compat/
H A Dbcrypt_pbkdf.c114 u_int8_t *key, size_t keylen, unsigned int rounds) in bcrypt_pbkdf() argument
123 size_t origkeylen = keylen; in bcrypt_pbkdf()
128 if (passlen == 0 || saltlen == 0 || keylen == 0 || in bcrypt_pbkdf()
129 keylen > sizeof(out) * sizeof(out) || saltlen > 1<<20) in bcrypt_pbkdf()
133 stride = (keylen + sizeof(out) - 1) / sizeof(out); in bcrypt_pbkdf()
134 amt = (keylen + stride - 1) / stride; in bcrypt_pbkdf()
142 for (count = 1; keylen > 0; count++) { in bcrypt_pbkdf()
165 amt = MINIMUM(amt, keylen); in bcrypt_pbkdf()
172 keylen -= i; in bcrypt_pbkdf()

Completed in 68 milliseconds