Home
last modified time | relevance | path

Searched refs:cipher (Results 1 – 25 of 509) sorted by relevance

12345678910>>...21

/third_party/openssl/crypto/evp/
Dcmeth_lib.c18 EVP_CIPHER *cipher = OPENSSL_zalloc(sizeof(EVP_CIPHER)); in EVP_CIPHER_meth_new() local
20 if (cipher != NULL) { in EVP_CIPHER_meth_new()
21 cipher->nid = cipher_type; in EVP_CIPHER_meth_new()
22 cipher->block_size = block_size; in EVP_CIPHER_meth_new()
23 cipher->key_len = key_len; in EVP_CIPHER_meth_new()
25 return cipher; in EVP_CIPHER_meth_new()
28 EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher) in EVP_CIPHER_meth_dup() argument
30 EVP_CIPHER *to = EVP_CIPHER_meth_new(cipher->nid, cipher->block_size, in EVP_CIPHER_meth_dup()
31 cipher->key_len); in EVP_CIPHER_meth_dup()
34 memcpy(to, cipher, sizeof(*to)); in EVP_CIPHER_meth_dup()
[all …]
Devp_enc.c26 if (c->cipher != NULL) { in EVP_CIPHER_CTX_reset()
27 if (c->cipher->cleanup && !c->cipher->cleanup(c)) in EVP_CIPHER_CTX_reset()
30 if (c->cipher_data && c->cipher->ctx_size) in EVP_CIPHER_CTX_reset()
31 OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size); in EVP_CIPHER_CTX_reset()
52 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, in EVP_CipherInit() argument
55 if (cipher != NULL) in EVP_CipherInit()
57 return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc); in EVP_CipherInit()
60 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, in EVP_CipherInit_ex() argument
78 if (ctx->engine && ctx->cipher in EVP_CipherInit_ex()
79 && (cipher == NULL || cipher->nid == ctx->cipher->nid)) in EVP_CipherInit_ex()
[all …]
Devp_lib.c21 if (c->cipher->set_asn1_parameters != NULL) in EVP_CIPHER_param_to_asn1()
22 ret = c->cipher->set_asn1_parameters(c, type); in EVP_CIPHER_param_to_asn1()
23 else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1) { in EVP_CIPHER_param_to_asn1()
56 if (c->cipher->get_asn1_parameters != NULL) in EVP_CIPHER_asn1_to_param()
57 ret = c->cipher->get_asn1_parameters(c, type); in EVP_CIPHER_asn1_to_param()
58 else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1) { in EVP_CIPHER_asn1_to_param()
184 return ctx->cipher->block_size; in EVP_CIPHER_CTX_block_size()
195 return ctx->cipher->do_cipher(ctx, out, in, inl); in EVP_Cipher()
200 return ctx->cipher; in EVP_CIPHER_CTX_cipher()
208 unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher) in EVP_CIPHER_flags() argument
[all …]
Dbio_enc.c33 EVP_CIPHER_CTX *cipher; member
73 ctx->cipher = EVP_CIPHER_CTX_new(); in enc_new()
74 if (ctx->cipher == NULL) { in enc_new()
98 EVP_CIPHER_CTX_free(b->cipher); in enc_free()
136 blocksize = EVP_CIPHER_CTX_block_size(ctx->cipher); in enc_read()
162 i = EVP_CipherFinal_ex(ctx->cipher, in enc_read()
179 if (!EVP_CipherUpdate(ctx->cipher, in enc_read()
197 if (!EVP_CipherUpdate(ctx->cipher, in enc_read()
266 if (!EVP_CipherUpdate(ctx->cipher, in enc_write()
312 if (!EVP_CipherInit_ex(ctx->cipher, NULL, NULL, NULL, NULL, in enc_ctrl()
[all …]
/third_party/openssl/test/ssl-tests/
D25-cipher.conf5 test-0 = 0-cipher-server-1
6 test-1 = 1-cipher-server-2
7 test-2 = 2-cipher-server-client-list
8 test-3 = 3-cipher-server-pref-1
9 test-4 = 4-cipher-server-pref-2
10 test-5 = 5-cipher-server-pref-client-list
11 test-6 = 6-cipher-server-pref-not-mobile
12 test-7 = 7-cipher-server-pref-mobile
13 test-8 = 8-cipher-server-pref-mobile2
16 [0-cipher-server-1]
[all …]
/third_party/libwebsockets/lib/tls/openssl/
Dlws-genaes.c62 ctx->cipher = EVP_aes_128_wrap(); in lws_genaes_create()
70 ctx->cipher = EVP_aes_128_cbc(); in lws_genaes_create()
74 ctx->cipher = EVP_aes_128_cfb128(); in lws_genaes_create()
79 ctx->cipher = EVP_aes_128_cfb8(); in lws_genaes_create()
84 ctx->cipher = EVP_aes_128_ctr(); in lws_genaes_create()
89 ctx->cipher = EVP_aes_128_ecb(); in lws_genaes_create()
94 ctx->cipher = EVP_aes_128_ofb(); in lws_genaes_create()
104 ctx->cipher = EVP_aes_128_gcm(); in lws_genaes_create()
117 ctx->cipher = EVP_aes_192_wrap(); in lws_genaes_create()
125 ctx->cipher = EVP_aes_192_cbc(); in lws_genaes_create()
[all …]
/third_party/FreeBSD/sys/crypto/rijndael/
Drijndael-api-fst.c73 int rijndael_cipherInit(cipherInstance *cipher, BYTE mode, char *IV) { in rijndael_cipherInit() argument
75 cipher->mode = mode; in rijndael_cipherInit()
80 memcpy(cipher->IV, IV, RIJNDAEL_MAX_IV_SIZE); in rijndael_cipherInit()
82 memset(cipher->IV, 0, RIJNDAEL_MAX_IV_SIZE); in rijndael_cipherInit()
87 int rijndael_blockEncrypt(cipherInstance *cipher, keyInstance *key, in rijndael_blockEncrypt() argument
92 if (cipher == NULL || in rijndael_blockEncrypt()
103 switch (cipher->mode) { in rijndael_blockEncrypt()
114 memcpy(block, cipher->IV, 16); in rijndael_blockEncrypt()
121 ((u_int32_t*)block)[0] = ((u_int32_t*)cipher->IV)[0] ^ ((u_int32_t*)input)[0]; in rijndael_blockEncrypt()
122 ((u_int32_t*)block)[1] = ((u_int32_t*)cipher->IV)[1] ^ ((u_int32_t*)input)[1]; in rijndael_blockEncrypt()
[all …]
/third_party/node/test/parallel/
Dtest-tls-getcipher.js53 const cipher = this.getCipher();
54 assert.strictEqual(cipher.name, 'AES128-SHA256');
55 assert.strictEqual(cipher.standardName, 'TLS_RSA_WITH_AES_128_CBC_SHA256');
56 assert.strictEqual(cipher.version, 'TLSv1.2');
67 const cipher = this.getCipher();
68 assert.strictEqual(cipher.name, 'ECDHE-RSA-AES128-GCM-SHA256');
69 assert.strictEqual(cipher.standardName,
71 assert.strictEqual(cipher.version, 'TLSv1.2');
90 const cipher = client.getCipher();
91 assert.strictEqual(cipher.name, 'TLS_AES_128_CCM_8_SHA256');
[all …]
Dtest-crypto-cipher-decipher.js25 const cipher = crypto.createCipher('aes192', key);
29 let ciph = cipher.update(plaintext, 'utf8', 'hex');
31 ciph += cipher.final('hex');
62 const cipher = crypto.createCipher('aes256', key);
66 let ciph = cipher.update(plaintext, 'utf8', 'base64');
67 ciph += cipher.final('base64');
247 const cipher = crypto.createCipher('aes-256-gcm', key); constant
248 cipher.setAAD(aadbuf);
249 cipher.setAutoPadding();
252 () => cipher.getAuthTag(),
[all …]
Dtest-crypto-authenticated-stream.js27 const { cipher, key, iv, aad, authTagLength, plaintextLength } = config;
30 const c = crypto.createCipheriv(cipher, key, iv, { authTagLength });
34 const d = crypto.createDecipheriv(cipher, key, iv, { authTagLength });
43 const { cipher, key, iv, aad, authTagLength, plaintextLength } = config;
46 const c = crypto.createCipheriv(cipher, key, iv, { authTagLength });
56 const d = crypto.createDecipheriv(cipher, key, iv, { authTagLength });
77 const { cipher, key, iv, aad, authTagLength, plaintextLength } = config;
81 const c = crypto.createCipheriv(cipher, key, iv, { authTagLength });
95 const d = crypto.createDecipheriv(cipher, key, iv, { authTagLength });
102 const d = crypto.createDecipheriv(cipher, key, iv, { authTagLength });
[all …]
Dtest-crypto-authenticated.js280 const cipher = crypto.createCipheriv('aes-256-gcm', constant
285 cipher.setAAD(Buffer.from('abcd'));
286 cipher.update('01234567', 'hex');
287 cipher.final();
288 const tag = cipher.getAuthTag();
443 const cipher = crypto.createCipheriv('aes-256-ccm', constant
452 cipher.setAAD(Buffer.from('0123456789', 'hex'), { plaintextLength });
467 const cipher = () => crypto.createCipheriv('aes-256-ccm', key, function
474 cipher().setAAD(Buffer.alloc(0), {
481 cipher().update(msg);
[all …]
/third_party/openssl/doc/man3/
DEVP_CIPHER_meth_new.pod20 EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher);
21 void EVP_CIPHER_meth_free(EVP_CIPHER *cipher);
23 int EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len);
24 int EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags);
25 int EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size);
26 int EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher,
31 int EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher,
36 int EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher,
38 int EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher,
41 int EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher,
[all …]
DSSL_CIPHER_get_name.pod26 const char *SSL_CIPHER_get_name(const SSL_CIPHER *cipher);
27 const char *SSL_CIPHER_standard_name(const SSL_CIPHER *cipher);
29 int SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *alg_bits);
30 char *SSL_CIPHER_get_version(const SSL_CIPHER *cipher);
31 char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int size);
44 SSL_CIPHER_get_name() returns a pointer to the name of B<cipher>. If the
45 B<cipher> is NULL, it returns "(NONE)".
48 B<cipher>. If the B<cipher> is NULL, it returns "(NONE)". If the B<cipher>
49 has no standard name, it returns B<NULL>. If B<cipher> was defined in both
57 SSL_CIPHER_get_bits() returns the number of secret bits used for B<cipher>.
[all …]
/third_party/openssl/crypto/engine/
Deng_openssl.c58 static int openssl_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
217 EVP_CIPHER *cipher; in test_r4_cipher() local
219 if ((cipher = EVP_CIPHER_meth_new(NID_rc4, 1, TEST_RC4_KEY_SIZE)) == NULL in test_r4_cipher()
220 || !EVP_CIPHER_meth_set_iv_length(cipher, 0) in test_r4_cipher()
221 || !EVP_CIPHER_meth_set_flags(cipher, EVP_CIPH_VARIABLE_LENGTH) in test_r4_cipher()
222 || !EVP_CIPHER_meth_set_init(cipher, test_rc4_init_key) in test_r4_cipher()
223 || !EVP_CIPHER_meth_set_do_cipher(cipher, test_rc4_cipher) in test_r4_cipher()
224 || !EVP_CIPHER_meth_set_impl_ctx_size(cipher, sizeof(TEST_RC4_KEY))) { in test_r4_cipher()
225 EVP_CIPHER_meth_free(cipher); in test_r4_cipher()
226 cipher = NULL; in test_r4_cipher()
[all …]
/third_party/node/lib/internal/crypto/
Dcipher.js96 function createCipherBase(cipher, credential, options, decipher, iv) { argument
101 this[kHandle].init(cipher, credential, authTagLength);
103 this[kHandle].initiv(cipher, credential, iv, authTagLength);
110 function createCipher(cipher, password, options, decipher) { argument
111 validateString(cipher, 'cipher');
114 createCipherBase.call(this, cipher, password, options, decipher);
117 function createCipherWithIV(cipher, key, options, decipher, iv) { argument
118 validateString(cipher, 'cipher');
121 createCipherBase.call(this, cipher, key, options, decipher, iv);
124 function Cipher(cipher, password, options) { argument
[all …]
/third_party/openssl/test/
Dafalgtest.c28 const EVP_CIPHER *cipher; in test_afalg_aes_cbc() local
53 cipher = EVP_aes_128_cbc(); in test_afalg_aes_cbc()
57 cipher = EVP_aes_192_cbc(); in test_afalg_aes_cbc()
61 cipher = EVP_aes_256_cbc(); in test_afalg_aes_cbc()
65 cipher = NULL; in test_afalg_aes_cbc()
70 if (!TEST_true(EVP_CipherInit_ex(ctx, cipher, e, key, iv, 1)) in test_afalg_aes_cbc()
80 || !TEST_true(EVP_CipherInit_ex(ctx, cipher, e, key, iv, 0)) in test_afalg_aes_cbc()
100 const EVP_CIPHER * cipher; in test_pr16743() local
105 cipher = ENGINE_get_cipher(e, NID_aes_128_cbc); in test_pr16743()
107 if (cipher != NULL && ctx != NULL) in test_pr16743()
[all …]
/third_party/openssl/apps/
Denc.c100 const EVP_CIPHER *cipher = NULL, *c; in enc_main() local
131 cipher = EVP_get_cipherbyname(prog); in enc_main()
132 if (cipher == NULL && strcmp(prog, "enc") != 0) { in enc_main()
261 cipher = c; in enc_main()
274 cipher = NULL; in enc_main()
287 if (cipher && EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) { in enc_main()
292 if (cipher && (EVP_CIPHER_mode(cipher) == EVP_CIPH_XTS_MODE)) { in enc_main()
338 if ((str == NULL) && (cipher != NULL) && (hkey == NULL)) { in enc_main()
345 OBJ_nid2ln(EVP_CIPHER_nid(cipher)), in enc_main()
413 if (cipher != NULL) { in enc_main()
[all …]
/third_party/openssl/doc/man1/
Dciphers.pod6 ciphers - SSL cipher display and cipher list tool
30 The B<ciphers> command converts textual OpenSSL cipher lists into ordered
31 SSL cipher preference lists. It can be used as a test tool to determine
45 minimum and maximum protocol version. This is closer to the actual cipher list
61 When combined with B<-s> includes cipher suites which require PSK.
65 When combined with B<-s> includes cipher suites which require SRP.
69 Verbose output: For each cipher suite, list details as provided by
74 Like B<-v>, but include the official cipher suite values in hex.
85 Precede each cipher suite by its standard name.
89 Convert a standard cipher B<name> to its OpenSSL name.
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/common/
Dptksa_cache.c133 const u8 *addr, u32 cipher) in ptksa_cache_get() argument
142 (cipher == WPA_CIPHER_NONE || cipher == e->cipher)) in ptksa_cache_get()
186 wpa_cipher_txt(e->cipher), in ptksa_cache_list()
228 void ptksa_cache_flush(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher) in ptksa_cache_flush() argument
239 (cipher == WPA_CIPHER_NONE || cipher == e->cipher)) { in ptksa_cache_flush()
268 const u8 *addr, u32 cipher, in ptksa_cache_add() argument
275 if (!ptksa || !ptk || !addr || !life_time || cipher == WPA_CIPHER_NONE) in ptksa_cache_add()
279 ptksa_cache_flush(ptksa, addr, cipher); in ptksa_cache_add()
291 entry->cipher = cipher; in ptksa_cache_add()
318 MAC2STR(addr), cipher); in ptksa_cache_add()
Dptksa_cache.h24 u32 cipher; member
35 const u8 *addr, u32 cipher);
38 const u8 *addr, u32 cipher,
41 void ptksa_cache_flush(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher);
55 ptksa_cache_get(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher) in ptksa_cache_get() argument
67 ptksa_cache_add(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher, in ptksa_cache_add() argument
74 const u8 *addr, u32 cipher) in ptksa_cache_flush() argument
/third_party/mbedtls/tests/
DCMakeLists.txt171 add_test_suite(cipher cipher.aes)
172 add_test_suite(cipher cipher.camellia)
173 add_test_suite(cipher cipher.ccm)
174 add_test_suite(cipher cipher.chacha20)
175 add_test_suite(cipher cipher.chachapoly)
176 add_test_suite(cipher cipher.des)
177 add_test_suite(cipher cipher.gcm)
178 add_test_suite(cipher cipher.misc)
179 add_test_suite(cipher cipher.nist_kw)
180 add_test_suite(cipher cipher.null)
[all …]
/third_party/node/benchmark/crypto/
Daes-gcm-throughput.js7 cipher: ['aes-128-gcm', 'aes-192-gcm', 'aes-256-gcm'], property
11 function main({ n, len, cipher }) { field
13 const key = crypto.randomBytes(keylen[cipher]);
17 AEAD_Bench(cipher, message, associate_data, key, iv, n, len);
20 function AEAD_Bench(cipher, message, associate_data, key, iv, n, len) { argument
26 const alice = crypto.createCipheriv(cipher, key, iv);
31 const bob = crypto.createDecipheriv(cipher, key, iv);
/third_party/mbedtls/tests/scripts/
Dgenerate_tls13_compat_tests.py91 [cipher for cipher in ciphersuites if cipher not in self._ciphers])
259 map(lambda cipher: self.CIPHER_SUITE[cipher], self._ciphers))
307 def generate_compat_test(server=None, client=None, cipher=None, sig_alg=None, named_group=None): argument
312 client=client, server=server, cipher=cipher, sig_alg=sig_alg, named_group=named_group)
313 server_object = SERVER_CLASSES[server](cipher, sig_alg, named_group)
314 client_object = CLIENT_CLASSES[client](cipher, sig_alg, named_group)
401 for cipher, sig_alg, named_group, server, client in \
405 yield generate_compat_test(cipher=cipher, sig_alg=sig_alg, named_group=named_group,
434 cipher=args.cipher, named_group=args.named_group))
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/tls/
Dtlsv1_server.c531 char *cipher; in tlsv1_server_get_cipher() local
535 cipher = "RC4-MD5"; in tlsv1_server_get_cipher()
538 cipher = "RC4-SHA"; in tlsv1_server_get_cipher()
541 cipher = "DES-CBC-SHA"; in tlsv1_server_get_cipher()
544 cipher = "DES-CBC3-SHA"; in tlsv1_server_get_cipher()
547 cipher = "DHE-RSA-DES-CBC-SHA"; in tlsv1_server_get_cipher()
550 cipher = "DHE-RSA-DES-CBC3-SHA"; in tlsv1_server_get_cipher()
553 cipher = "ADH-RC4-MD5"; in tlsv1_server_get_cipher()
556 cipher = "ADH-DES-SHA"; in tlsv1_server_get_cipher()
559 cipher = "ADH-DES-CBC3-SHA"; in tlsv1_server_get_cipher()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/tls/
Dtlsv1_server.c531 char *cipher; in tlsv1_server_get_cipher() local
535 cipher = "RC4-MD5"; in tlsv1_server_get_cipher()
538 cipher = "RC4-SHA"; in tlsv1_server_get_cipher()
541 cipher = "DES-CBC-SHA"; in tlsv1_server_get_cipher()
544 cipher = "DES-CBC3-SHA"; in tlsv1_server_get_cipher()
547 cipher = "DHE-RSA-DES-CBC-SHA"; in tlsv1_server_get_cipher()
550 cipher = "DHE-RSA-DES-CBC3-SHA"; in tlsv1_server_get_cipher()
553 cipher = "ADH-RC4-MD5"; in tlsv1_server_get_cipher()
556 cipher = "ADH-DES-SHA"; in tlsv1_server_get_cipher()
559 cipher = "ADH-DES-CBC3-SHA"; in tlsv1_server_get_cipher()
[all …]

12345678910>>...21