Home
last modified time | relevance | path

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

12345678910>>...14

/third_party/gstreamer/gstplugins_bad/ext/sctp/usrsctp/usrsctplib/netinet/
Dsctp_auth.c249 sctp_alloc_key(uint32_t keylen) in sctp_alloc_key() argument
253 SCTP_MALLOC(new_key, sctp_key_t *, sizeof(*new_key) + keylen, in sctp_alloc_key()
259 new_key->keylen = keylen; in sctp_alloc_key()
279 SCTP_PRINTF("%s: len %u, ", str, key->keylen); in sctp_print_key()
280 if (key->keylen) { in sctp_print_key()
281 for (i = 0; i < key->keylen; i++) in sctp_print_key()
298 SCTP_PRINTF("%s: len %u, ", str, key->keylen); in sctp_show_key()
299 if (key->keylen) { in sctp_show_key()
300 for (i = 0; i < key->keylen; i++) in sctp_show_key()
312 return (key->keylen); in sctp_get_keylen()
[all …]
/third_party/python/Modules/_blake2/impl/
Dblake2-dispatch.c159 int blake2b_init_key_ref( blake2b_state *S, size_t outlen, const void *key, size_t keylen );
163 …b_ref( uint8_t *out, const void *in, const void *key, size_t outlen, size_t inlen, size_t keylen );
168 int blake2b_init_key_sse2( blake2b_state *S, size_t outlen, const void *key, size_t keylen );
172 …_sse2( uint8_t *out, const void *in, const void *key, size_t outlen, size_t inlen, size_t keylen );
175 int blake2b_init_key_ssse3( blake2b_state *S, size_t outlen, const void *key, size_t keylen );
179 …ssse3( uint8_t *out, const void *in, const void *key, size_t outlen, size_t inlen, size_t keylen );
182 int blake2b_init_key_sse41( blake2b_state *S, size_t outlen, const void *key, size_t keylen );
186 …sse41( uint8_t *out, const void *in, const void *key, size_t outlen, size_t inlen, size_t keylen );
189 int blake2b_init_key_avx( blake2b_state *S, size_t outlen, const void *key, size_t keylen );
193 …b_avx( uint8_t *out, const void *in, const void *key, size_t outlen, size_t inlen, size_t keylen );
[all …]
Dblake2sp.c27 static int blake2sp_init_leaf( blake2s_state *S, uint8_t outlen, uint8_t keylen, uint64_t offset ) in blake2sp_init_leaf() argument
31 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()
83 int blake2sp_init_key( blake2sp_state *S, size_t outlen, const void *key, size_t keylen ) in blake2sp_init_key() argument
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()
96 if( blake2sp_init_leaf( S->S[i], ( uint8_t ) outlen, ( uint8_t ) keylen, i ) < 0 ) in blake2sp_init_key()
105 memcpy( block, key, keylen ); in blake2sp_init_key()
194 …ake2sp( uint8_t *out, const void *in, const void *key, size_t outlen, size_t inlen, size_t keylen ) in blake2sp() argument
[all …]
Dblake2bp.c28 static int blake2bp_init_leaf( blake2b_state *S, uint8_t outlen, uint8_t keylen, uint64_t offset ) in blake2bp_init_leaf() argument
32 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()
86 int blake2bp_init_key( blake2bp_state *S, size_t outlen, const void *key, size_t keylen ) in blake2bp_init_key() argument
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()
99 if( blake2bp_init_leaf( S->S[i], ( uint8_t ) outlen, ( uint8_t ) keylen, i ) < 0 ) in blake2bp_init_key()
108 memcpy( block, key, keylen ); in blake2bp_init_key()
196 …ake2bp( uint8_t *out, const void *in, const void *key, size_t outlen, size_t inlen, size_t keylen ) in blake2bp() argument
[all …]
/third_party/node/lib/internal/crypto/
Dpbkdf2.js18 function pbkdf2(password, salt, iterations, keylen, digest, callback) { argument
24 ({ password, salt, iterations, keylen, digest } =
25 check(password, salt, iterations, keylen, digest));
31 const keybuf = Buffer.alloc(keylen);
44 function pbkdf2Sync(password, salt, iterations, keylen, digest) { argument
45 ({ password, salt, iterations, keylen, digest } =
46 check(password, salt, iterations, keylen, digest));
47 const keybuf = Buffer.alloc(keylen);
54 function check(password, salt, iterations, keylen, digest) { argument
61 validateUint32(keylen, 'keylen');
[all …]
Dscrypt.js24 function scrypt(password, salt, keylen, options, callback = defaults) { argument
30 options = check(password, salt, keylen, options);
32 ({ password, salt, keylen } = options);
38 const keybuf = Buffer.alloc(keylen);
50 function scryptSync(password, salt, keylen, options = defaults) { argument
51 options = check(password, salt, keylen, options);
53 ({ password, salt, keylen } = options);
54 const keybuf = Buffer.alloc(keylen);
71 function check(password, salt, keylen, options) { argument
77 validateUint32(keylen, 'keylen');
[all …]
/third_party/openssl/crypto/evp/
De_camellia.c142 # define BLOCK_CIPHER_generic(nid,keylen,blocksize,ivlen,nmode,mode,MODE,flags) \ argument
143 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; }
167 # define BLOCK_CIPHER_generic(nid,keylen,blocksize,ivlen,nmode,mode,MODE,flags) \ argument
168 static const EVP_CIPHER camellia_##keylen##_##mode = { \
[all …]
Dp5_crpt2.c24 const EVP_MD *digest, int keylen, unsigned char *out, in ossl_pkcs5_pbkdf2_hmac_ex() argument
60 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()
84 int saltlen, int iter, const EVP_MD *digest, int keylen, in PKCS5_PBKDF2_HMAC() argument
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()
[all …]
/third_party/libwebsockets/lib/core/
Dlws_map.c41 size_t keylen; member
180 const lws_map_key_t key, size_t keylen, in lws_map_item_create() argument
189 item = lws_map_item_lookup(map, key, keylen); in lws_map_item_create()
193 item = map->info._alloc(map, sizeof(*item) + keylen + valuelen); in lws_map_item_create()
198 item->keylen = keylen; in lws_map_item_create()
202 memcpy(u, key, keylen); in lws_map_item_create()
203 u += keylen; in lws_map_item_create()
207 h = map->info._hash(key, keylen); in lws_map_item_create()
228 lws_map_item_lookup(lws_map_t *map, const lws_map_key_t key, size_t keylen) in lws_map_item_lookup() argument
230 lws_map_hash_t h = map->info._hash(key, keylen); in lws_map_item_lookup()
[all …]
/third_party/openssl/providers/implementations/exchange/
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 …]
/third_party/ffmpeg/libavutil/
Dhmac.c51 int keylen; member
145 void av_hmac_init(AVHMAC *c, const uint8_t *key, unsigned int keylen) in av_hmac_init() argument
149 if (keylen > c->blocklen) { in av_hmac_init()
151 c->update(c->hash, key, keylen); in av_hmac_init()
153 c->keylen = c->hashlen; in av_hmac_init()
155 memcpy(c->key, key, keylen); in av_hmac_init()
156 c->keylen = keylen; in av_hmac_init()
159 for (i = 0; i < c->keylen; i++) in av_hmac_init()
161 for (i = c->keylen; i < c->blocklen; i++) in av_hmac_init()
179 for (i = 0; i < c->keylen; i++) in av_hmac_final()
[all …]
/third_party/openssl/test/recipes/30-test_evp_data/
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 …]
/third_party/openssl/providers/implementations/macs/
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()
152 const unsigned char *key, size_t keylen) in hmac_setkey() argument
157 OPENSSL_secure_clear_free(macctx->key, macctx->keylen); in hmac_setkey()
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()
[all …]
Dblake2_mac_impl.c91 const unsigned char *key, size_t keylen) in blake2_setkey() argument
93 if (keylen > BLAKE2_KEYBYTES || keylen == 0) { in blake2_setkey()
97 memcpy(macctx->key, key, keylen); in blake2_setkey()
99 if (keylen < BLAKE2_KEYBYTES) in blake2_setkey()
100 memset(macctx->key + keylen, 0, BLAKE2_KEYBYTES - keylen); in blake2_setkey()
101 BLAKE2_PARAM_SET_KEY_LENGTH(&macctx->params, (uint8_t)keylen); in blake2_setkey()
106 size_t keylen, const OSSL_PARAM params[]) in blake2_mac_init() argument
113 if (!blake2_setkey(macctx, key, keylen)) in blake2_mac_init()
/third_party/openssl/crypto/cms/
Dcms_enc.c129 ec->keylen = tkeylen; in ossl_cms_EncryptedContent_init_bio()
138 if (ec->keylen != tkeylen) { in ossl_cms_EncryptedContent_init_bio()
140 if (EVP_CIPHER_CTX_set_key_length(ctx, ec->keylen) <= 0) { in ossl_cms_EncryptedContent_init_bio()
150 OPENSSL_clear_free(ec->key, ec->keylen); in ossl_cms_EncryptedContent_init_bio()
152 ec->keylen = tkeylen; in ossl_cms_EncryptedContent_init_bio()
192 OPENSSL_clear_free(ec->key, ec->keylen); in ossl_cms_EncryptedContent_init_bio()
204 const unsigned char *key, size_t keylen, in ossl_cms_EncryptedContent_init() argument
209 if ((ec->key = OPENSSL_malloc(keylen)) == NULL) { in ossl_cms_EncryptedContent_init()
213 memcpy(ec->key, key, keylen); in ossl_cms_EncryptedContent_init()
215 ec->keylen = keylen; in ossl_cms_EncryptedContent_init()
[all …]
/third_party/openssl/providers/implementations/ciphers/
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 …]
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()
99 int ossl_tdes_einit(void *vctx, const unsigned char *key, size_t keylen, in ossl_tdes_einit() argument
103 return tdes_init(vctx, key, keylen, iv, ivlen, params, 1); in ossl_tdes_einit()
106 int ossl_tdes_dinit(void *vctx, const unsigned char *key, size_t keylen, in ossl_tdes_dinit() argument
110 return tdes_init(vctx, key, keylen, iv, ivlen, params, 0); in ossl_tdes_dinit()
121 size_t kl = ctx->keylen;
Dcipher_aes_siv.c42 ctx->keylen = keybits / 8; in aes_siv_newctx()
79 static int siv_init(void *vctx, const unsigned char *key, size_t keylen, in siv_init() argument
91 if (keylen != ctx->keylen) { in siv_init()
95 if (!ctx->hw->initkey(ctx, key, ctx->keylen)) in siv_init()
101 static int siv_einit(void *vctx, const unsigned char *key, size_t keylen, in siv_einit() argument
105 return siv_init(vctx, key, keylen, iv, ivlen, params, 1); in siv_einit()
108 static int siv_dinit(void *vctx, const unsigned char *key, size_t keylen, in siv_dinit() argument
112 return siv_init(vctx, key, keylen, iv, ivlen, params, 0); in siv_dinit()
182 if (p != NULL && !OSSL_PARAM_set_size_t(p, ctx->keylen)) { in aes_siv_get_ctx_params()
230 size_t keylen; in aes_siv_set_ctx_params() local
[all …]
Dcipher_aes_wrp.c78 size_t keylen, const unsigned char *iv, in aes_wrap_init() argument
100 if (keylen != ctx->keylen) { in aes_wrap_init()
118 AES_set_encrypt_key(key, keylen * 8, &wctx->ks.ks); in aes_wrap_init()
121 AES_set_decrypt_key(key, keylen * 8, &wctx->ks.ks); in aes_wrap_init()
128 static int aes_wrap_einit(void *ctx, const unsigned char *key, size_t keylen, in aes_wrap_einit() argument
132 return aes_wrap_init(ctx, key, keylen, iv, ivlen, params, 1); in aes_wrap_einit()
135 static int aes_wrap_dinit(void *ctx, const unsigned char *key, size_t keylen, in aes_wrap_dinit() argument
139 return aes_wrap_init(ctx, key, keylen, iv, ivlen, params, 0); in aes_wrap_dinit()
244 size_t keylen = 0; in aes_wrap_set_ctx_params() local
251 if (!OSSL_PARAM_get_size_t(p, &keylen)) { in aes_wrap_set_ctx_params()
[all …]
Dcipher_aes_hw.c20 const unsigned char *key, size_t keylen) in cipher_hw_aes_initkey() argument
32 ret = HWAES_set_decrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
47 ret = AES_set_decrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
54 ret = vpaes_set_decrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
61 ret = AES_set_decrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
69 ret = HWAES_set_encrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
92 ret = AES_set_encrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
99 ret = vpaes_set_encrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
106 ret = AES_set_encrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
/third_party/openssl/crypto/asn1/
Dp5_scrypt.c34 size_t keylen, uint64_t N, uint64_t r,
48 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()
148 size_t keylen, uint64_t N, uint64_t r, in pkcs5_scrypt_set() argument
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()
[all …]
/third_party/nghttp2/contrib/
Dtlsticketupdate.go55 var keylen int
58 keylen = 48
60 keylen = 80
68 makeKey(keylen), // current encryption key
69 makeKey(keylen), // next encryption key; now decryption only
79 if err := binary.Write(buf, binary.BigEndian, uint16(keylen)); err != nil {
107 newKeys[n-1] = makeKey(keylen)
/third_party/node/test/parallel/
Dtest-crypto-scrypt.js19 keylen: 0, property
31 keylen: 64, property
42 keylen: 64, property
53 keylen: 64, property
64 keylen: 64, property
75 keylen: 64, property
86 keylen: 64, property
149 const { pass, salt, keylen, expected } = options;
150 const actual = crypto.scryptSync(pass, salt, keylen, options);
152 crypto.scrypt(pass, salt, keylen, options, common.mustSucceed((actual) => {
/third_party/openssl/providers/implementations/rands/
Ddrbg_ctr.c45 size_t keylen; member
82 n = inlen < ctr->keylen ? inlen : ctr->keylen; in ctr_XOR()
85 if (inlen <= ctr->keylen) in ctr_XOR()
88 n = inlen - ctr->keylen; in ctr_XOR()
94 ctr->V[i] ^= in[i + ctr->keylen]; in ctr_XOR()
125 if (ctr->keylen != 16) { in ctr_BCC_blocks()
142 num_of_blk = ctr->keylen == 16 ? 2 : 3; in ctr_BCC_init()
225 *p = (unsigned char)((ctr->keylen + 16) & 0xff); in ctr_df()
237 if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX, &outlen, ctr->KX + ctr->keylen, in ctr_df()
245 if (ctr->keylen != 16) in ctr_df()
[all …]
/third_party/node/benchmark/crypto/
Drsa-encrypt-decrypt-throughput.js21 keylen: keylen_list, property
25 function main({ len, algo, keylen, n }) { property
28 StreamWrite(algo, keylen, message, n, len);
31 function StreamWrite(algo, keylen, message, n, len) { argument
36 const privateKey = RSA_PrivatePem[keylen];
37 const publicKey = RSA_PublicPem[keylen];

12345678910>>...14