Home
last modified time | relevance | path

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

1234567

/openbsd/lib/libcrypto/evp/
H A Devp_names.c162 .cipher = EVP_bf_cbc,
168 .cipher = EVP_bf_cbc,
176 .cipher = EVP_bf_ecb,
180 .cipher = EVP_bf_ofb,
460 .cipher = EVP_rc4,
464 .cipher = EVP_rc4_40,
974 .cipher = EVP_rc4,
1484 if ((evp_cipher = cipher->cipher()) == NULL) in EVP_CIPHER_do_all_sorted()
1488 fn(NULL, cipher->name, cipher->alias, arg); in EVP_CIPHER_do_all_sorted()
1546 if ((evp_cipher = cipher->cipher()) == NULL) in OBJ_NAME_from_cipher_name()
[all …]
H A Devp_cipher.c142 if (cipher == NULL && ctx->cipher == NULL) { in EVP_CipherInit_ex()
151 if (cipher != NULL) { in EVP_CipherInit_ex()
158 ctx->cipher = cipher; in EVP_CipherInit_ex()
681 if (!ctx->cipher) { in EVP_CIPHER_CTX_ctrl()
757 return ctx->cipher; in EVP_CIPHER_CTX_cipher()
1075 return cipher->nid; in EVP_CIPHER_nid()
1110 EVP_CIPHER *cipher; in EVP_CIPHER_meth_new() local
1119 if ((cipher = calloc(1, sizeof(*cipher))) == NULL) in EVP_CIPHER_meth_new()
1126 return cipher; in EVP_CIPHER_meth_new()
1138 *copy = *cipher; in EVP_CIPHER_meth_dup()
[all …]
H A Devp_pbe.c185 const EVP_CIPHER *cipher = NULL; in EVP_PBE_CipherInit() local
303 memcpy(key, md_tmp, EVP_CIPHER_key_length(cipher)); in PKCS5_PBE_keyivgen()
304 if ((size_t)EVP_CIPHER_iv_length(cipher) > 16) { in PKCS5_PBE_keyivgen()
308 memcpy(iv, md_tmp + (16 - EVP_CIPHER_iv_length(cipher)), in PKCS5_PBE_keyivgen()
309 EVP_CIPHER_iv_length(cipher)); in PKCS5_PBE_keyivgen()
310 if (!EVP_CipherInit_ex(cctx, cipher, NULL, key, iv, en_de)) in PKCS5_PBE_keyivgen()
425 const EVP_CIPHER *cipher; in PKCS5_v2_PBE_keyivgen() local
449 cipher = EVP_get_cipherbyobj(pbe2->encryption->algorithm); in PKCS5_v2_PBE_keyivgen()
450 if (!cipher) { in PKCS5_v2_PBE_keyivgen()
631 iter, EVP_CIPHER_key_length(cipher), key, md)) { in PKCS12_PBE_keyivgen()
[all …]
/openbsd/regress/lib/libssl/interop/cipher/
H A DMakefile83 TYPE_${cipher} = ec
93 REGRESS_TARGETS += run-cipher-${cipher}-client-${clib}-server-${slib}
96 SLOW_TARGETS += run-cipher-${cipher}-client-${clib}-server-${slib}
98 run-cipher-${cipher}-client-${clib}-server-${slib} \
99 client-cipher-${cipher}-client-${clib}-server-${slib}.out \
100 server-cipher-${cipher}-client-${clib}-server-${slib}.out: dh.param \
104 -c ${TYPE_${cipher}}.crt -k ${TYPE_${cipher}}.key \
105 -l ${cipher}${LEVEL_${slib}} ${DHPARAM_${cipher}_${slib}} \
121 check-cipher-${cipher}-client-${clib}-server-${slib}: \
122 client-cipher-${cipher}-client-${clib}-server-${slib}.out \
[all …]
/openbsd/lib/libssl/test/
H A Dtestenc10 $cmd enc < $test > $test.cipher
11 $cmd enc < $test.cipher >$test.clear
17 /bin/rm $test.cipher $test.clear
20 $cmd enc -a -e < $test > $test.cipher
21 $cmd enc -a -d < $test.cipher >$test.clear
27 /bin/rm $test.cipher $test.clear
30 for i in `$cmd list-cipher-commands`
33 $cmd $i -bufsize 113 -e -k test < $test > $test.$i.cipher
40 /bin/rm $test.$i.cipher $test.$i.clear
44 $cmd $i -bufsize 113 -a -e -k test < $test > $test.$i.cipher
[all …]
H A Dtestssl125 for cipher in `../util/shlib_wrap.sh ../apps/openssl ciphers "RSA+$protocol" | tr ':' ' '`; do
126 echo "Testing $cipher"
131 $ssltest -cipher $cipher $prot
133 echo "Failed $cipher"
145 $ssltest -v -bio_pair -tls1 -cipher ADH -dhe1024dsa -num 10 -f -time $extra || exit 1
163 $ssltest -tls1 -cipher PSK -psk abc123 $extra || exit 1
166 $ssltest -bio_pair -tls1 -cipher PSK -psk abc123 $extra || exit 1
172 $ssltest -tls1 -cipher SRP -srpuser test -srppass abc123
175 $ssltest -bio_pair -tls1 -cipher SRP -srpuser test -srppass abc123
/openbsd/regress/lib/libcrypto/evp/
H A Devptest.c249 c = EVP_get_cipherbyname(cipher); in test_cipher()
348 char *cipher; in main() local
358 cipher=sstrsep(&p, ":"); in main()
379 if (strstr(cipher, "AES") == cipher && verbose) { in main()
386 if (strstr(cipher, "DES") == cipher && verbose) { in main()
393 if (strstr(cipher, "RC4") == cipher && verbose) { in main()
400 if (strstr(cipher, "CAMELLIA") == cipher && verbose) { in main()
407 if (strstr(cipher, "SEED") == cipher) { in main()
414 if (strstr(cipher, "ChaCha") == cipher) { in main()
421 if (strstr(cipher, "md_gost") == cipher || in main()
[all …]
H A Devp_test.c272 .cipher = EVP_aes_128_ccm,
278 .cipher = EVP_aes_128_ccm,
284 .cipher = EVP_aes_128_ccm,
290 .cipher = EVP_aes_128_ccm,
297 .cipher = EVP_aes_192_ccm,
303 .cipher = EVP_aes_192_ccm,
309 .cipher = EVP_aes_192_ccm,
315 .cipher = EVP_aes_192_ccm,
322 .cipher = EVP_aes_256_ccm,
469 const EVP_CIPHER *cipher = test->cipher(); in evp_pkey_iv_len_testcase() local
[all …]
/openbsd/regress/lib/libssl/ssl/
H A Dtestssl60 echo "Testing $cipher"
61 $ssltest -cipher $cipher -tls1_2
63 echo "Failed $cipher"
72 echo "Testing $cipher"
73 $ssltest -cipher $cipher -seclevel 2
75 echo "Failed $cipher"
84 echo "Testing $cipher"
85 $ssltest -cipher $cipher -seclevel 3
136 echo "Testing $cipher"
137 $ssltest -cipher $cipher -dtls1_2
[all …]
/openbsd/lib/libssl/
H A Dssl_ciphers.c42 switch(cipher->algorithm_ssl) { in ssl_cipher_allowed_in_tls_version_range()
56 SSL_CIPHER *cipher; in ssl_cipher_list_to_bytes() local
73 if (!ssl_security_cipher_check(s, cipher)) in ssl_cipher_list_to_bytes()
75 if (!CBB_add_u16(cbb, cipher->value)) in ssl_cipher_list_to_bytes()
97 const SSL_CIPHER *cipher; in STACK_OF() local
150 if (!sk_SSL_CIPHER_push(ciphers, cipher)) { in STACK_OF()
207 const SSL_CIPHER *cipher; in ssl_parse_ciphersuites() local
240 if (!sk_SSL_CIPHER_push(ciphers, cipher)) in ssl_parse_ciphersuites()
263 const SSL_CIPHER *cipher; in ssl_merge_cipherlists() local
270 if (cipher->algorithm_ssl == SSL_TLSV1_3) in ssl_merge_cipherlists()
[all …]
H A Dssl_seclevel.c98 const SSL_CIPHER *cipher = arg; in ssl_security_secop_cipher() local
112 if (cipher->algorithm_auth & SSL_aNULL) in ssl_security_secop_cipher()
115 if (cipher->algorithm_mac & SSL_MD5) in ssl_security_secop_cipher()
121 if (cipher->algorithm_enc & SSL_RC4) in ssl_security_secop_cipher()
128 if ((cipher->algorithm_mkey & (SSL_kDHE | SSL_kECDHE)) == 0 && in ssl_security_secop_cipher()
129 cipher->algorithm_ssl != SSL_TLSV1_3) in ssl_security_secop_cipher()
135 if (cipher->algorithm_mac & SSL_SHA1) in ssl_security_secop_cipher()
204 int version, void *cipher, void *ex_data) in ssl_security_default_cb() argument
210 return ssl_security_secop_cipher(ctx, ssl, bits, cipher); in ssl_security_default_cb()
263 return ssl_security(ssl, secop, cipher->strength_bits, 0, cipher); in ssl_security_cipher()
[all …]
H A Dssl_ciph.c158 const SSL_CIPHER *cipher; member
403 const SSL_CIPHER *cipher; in ssl_cipher_get_evp() local
410 if ((cipher = s->s3->hs.cipher) == NULL) in ssl_cipher_get_evp()
483 const SSL_CIPHER *cipher; in ssl_cipher_get_evp_aead() local
487 if ((cipher = s->s3->hs.cipher) == NULL) in ssl_cipher_get_evp_aead()
515 if ((cipher = s->s3->hs.cipher) == NULL) in ssl_get_handshake_evp_md()
736 cp = curr->cipher; in ssl_cipher_apply_rule()
1454 if (cipher == NULL) in SSL_CIPHER_get_version()
1465 if (cipher == NULL) in SSL_CIPHER_get_name()
1468 return cipher->name; in SSL_CIPHER_get_name()
[all …]
H A Dt1_enc.c347 const EVP_CIPHER *cipher = NULL; in tls1_setup_key_block() local
360 if (s->s3->hs.cipher == NULL) in tls1_setup_key_block()
363 if ((s->s3->hs.cipher->algorithm_mac & SSL_AEAD) != 0) { in tls1_setup_key_block()
370 if (!ssl_cipher_get_evp(s, &cipher, &mac_hash, in tls1_setup_key_block()
381 tls12_record_layer_set_cipher_hash(s->rl, cipher, in tls1_setup_key_block()
386 if (!tls12_key_block_generate(key_block, s, aead, cipher, mac_hash)) in tls1_setup_key_block()
400 if (s->s3->hs.cipher != NULL) { in tls1_setup_key_block()
401 if (s->s3->hs.cipher->algorithm_enc == SSL_eNULL) in tls1_setup_key_block()
405 if (s->s3->hs.cipher->algorithm_enc == SSL_RC4) in tls1_setup_key_block()
/openbsd/regress/usr.bin/openssl/
H A Dtestenc.sh13 $cmd enc < $test > $test.cipher
14 $cmd enc < $test.cipher >$test.clear
20 /bin/rm $test.cipher $test.clear
23 $cmd enc -a -e < $test > $test.cipher
24 $cmd enc -a -d < $test.cipher >$test.clear
30 /bin/rm $test.cipher $test.clear
48 $cmd $i -bufsize 113 -e -k test < $test > $test.$i.cipher
49 $cmd $i -bufsize 157 -d -k test < $test.$i.cipher >$test.$i.clear
55 /bin/rm $test.$i.cipher $test.$i.clear
59 $cmd $i -bufsize 113 -a -e -k test < $test > $test.$i.cipher
[all …]
/openbsd/usr.bin/ssh/
H A Dcipher.c60 const struct sshcipher *cipher; member
233 if (cc == NULL || cc->cipher == NULL) in cipher_warning_message()
258 if (keylen < cipher->key_len || in cipher_init()
264 cc->cipher = cipher; in cipher_init()
284 type = (*cipher->evptype)(); in cipher_init()
294 if (cipher_authlen(cipher) && in cipher_init()
381 if (len % cc->cipher->block_size) in cipher_crypt()
435 const struct sshcipher *c = cc->cipher; in cipher_get_keyiv()
450 if ((cc->cipher->flags & CFLAG_NONE) != 0) in cipher_get_keyiv()
474 const struct sshcipher *c = cc->cipher; in cipher_set_keyiv()
[all …]
/openbsd/regress/lib/libradius/
H A Dtest24.c11 uint8_t cipher[256],cipher1[256]; in test24() local
24 clen = sizeof(cipher); in test24()
25 CHECK(radius_encrypt_user_password_attr(cipher, &clen, "challenge", ra, "xyzzy5461") == 0); in test24()
27 CHECK(memcmp(cipher, encryptedpass, 16) == 0); in test24()
29 CHECK(radius_decrypt_user_password_attr(plain, sizeof(plain), cipher, clen, ra, "xyzzy5461") == 0); in test24()
33 CHECK(radius_encrypt_user_password_attr(cipher, &clen, "challenge", ra, "xyzzy5461") != 0); in test24()
34 CHECK(radius_decrypt_user_password_attr(plain, 16, cipher, 16, ra, "xyzzy5461") != 0); in test24()
35 CHECK(radius_decrypt_user_password_attr(plain, 256, cipher, 17, ra, "xyzzy5461") != 0); in test24()
43 …radius_encrypt_user_password_attr(cipher, &clen, "foobarbaz", radius_get_authenticator_retval(pack… in test24()
44 CHECK(memcmp(cipher1, cipher, 16) == 0); in test24()
H A Dtest25.c26 uint8_t cipher[256]; in test25() local
35 clen = sizeof(cipher); in test25()
36 CHECK(radius_encrypt_mppe_key_attr(cipher, &clen, plainkey, 16, ra, "hogehogefugafuga") == 0); in test25()
40 CHECK(radius_decrypt_mppe_key_attr(plain, &plen, cipher, clen, ra, "hogehogefugafuga") == 0); in test25()
45 CHECK(radius_encrypt_mppe_key_attr(cipher, &clen, plainkey, 16, ra, "hogehogefugafuga") != 0); in test25()
47 CHECK(radius_decrypt_mppe_key_attr(plain, &plen, cipher, 34, ra, "hogehogefugafuga") != 0); in test25()
49 CHECK(radius_decrypt_mppe_key_attr(plain, &plen, cipher, 33, ra, "hogehogefugafuga") != 0); in test25()
54 clen = sizeof(cipher); in test25()
55 …CHECK(radius_get_vs_raw_attr(packet, RADIUS_VENDOR_MICROSOFT, RADIUS_VTYPE_MPPE_SEND_KEY, cipher, … in test25()
70 clen = sizeof(cipher); in test25()
[all …]
/openbsd/lib/libradius/
H A Dradius_mppe.c66 memcpy(cipher, &salt, 2); in radius_encrypt_mppe_key_attr()
68 c = ((uint8_t *)cipher) + 2 + off; in radius_encrypt_mppe_key_attr()
74 MD5_Update(&ctx, cipher, 2); in radius_encrypt_mppe_key_attr()
103 c = ((uint8_t *)cipher) + 2 + off; in radius_decrypt_mppe_key_attr()
109 MD5_Update(&ctx, cipher, 2); in radius_decrypt_mppe_key_attr()
129 uint8_t cipher[256]; in radius_get_mppe_key_attr() local
130 size_t clen = sizeof(cipher); in radius_get_mppe_key_attr()
133 cipher, &clen) != 0) in radius_get_mppe_key_attr()
145 uint8_t cipher[256]; in radius_put_mppe_key_attr() local
146 size_t clen = sizeof(cipher); in radius_put_mppe_key_attr()
[all …]
H A Dradius_userpass.c39 radius_encrypt_user_password_attr(void *cipher, size_t * clen, in radius_encrypt_user_password_attr() argument
53 c = ((char *)cipher) + off; in radius_encrypt_user_password_attr()
88 c = ((char *)cipher) + off; in radius_decrypt_user_password_attr()
119 char cipher[256]; in radius_get_user_password_attr() local
120 size_t clen = sizeof(cipher); in radius_get_user_password_attr()
122 if (radius_get_raw_attr(packet, RADIUS_TYPE_USER_PASSWORD, cipher, in radius_get_user_password_attr()
125 if (radius_decrypt_user_password_attr(buf, len, cipher, clen, in radius_get_user_password_attr()
136 char cipher[256]; in radius_put_user_password_attr() local
137 size_t clen = sizeof(cipher); in radius_put_user_password_attr()
139 if (radius_encrypt_user_password_attr(cipher, &clen, buf, in radius_put_user_password_attr()
[all …]
/openbsd/regress/lib/libssl/ciphers/
H A Dcipherstest.c40 const SSL_CIPHER *cipher; in check_cipher_order() local
52 if ((id = SSL_CIPHER_get_id(cipher)) <= prev_id) { in check_cipher_order()
723 const SSL_CIPHER *cipher; in test_ssl_ciphers() local
760 cipher = sk_SSL_CIPHER_value(ciphers, i); in test_ssl_ciphers()
761 cipher_value = SSL_CIPHER_get_value(cipher); in test_ssl_ciphers()
768 SSL_CIPHER_get_name(cipher)); in test_ssl_ciphers()
935 SSL_CIPHER *cipher; in parse_ciphersuites_test() local
954 cipher = sk_SSL_CIPHER_value(ciphers, j); in parse_ciphersuites_test()
959 SSL_CIPHER_get_id(cipher), pct->cids[j]); in parse_ciphersuites_test()
1123 SSL_CIPHER *cipher; in cipher_set_test() local
[all …]
/openbsd/regress/usr.bin/ssh/
H A Ddhgex.sh15 cipher="$1"; shift
20 echo "Ciphers=$cipher" >> $OBJ/sshd_proxy
22 opts="-oKexAlgorithms=$kex -oCiphers=$cipher"
26 verbose "$tid bits $bits $kex $cipher"
58 check 3072 `${SSH} -Q cipher | grep 128`
59 check 7680 `${SSH} -Q cipher | grep 192`
60 check 8192 `${SSH} -Q cipher | grep 256`
/openbsd/usr.bin/openssl/
H A Denc.c79 const EVP_CIPHER *cipher; member
109 cfg.cipher = NULL; in enc_opt_cipher()
296 const EVP_CIPHER *cipher; in skip_aead_and_xts() local
361 cfg.cipher = EVP_get_cipherbyname(pname); in enc_main()
403 if (cfg.cipher != NULL && in enc_main()
409 if (cfg.cipher != NULL && in enc_main()
547 if (cfg.cipher != NULL) { in enc_main()
622 EVP_BytesToKey(cfg.cipher, dgst, sptr, in enc_main()
669 EVP_CIPHER_name(cfg.cipher)); in enc_main()
678 EVP_CIPHER_name(cfg.cipher)); in enc_main()
[all …]
/openbsd/regress/lib/libcrypto/aead/
H A Daeadtest.c99 *cipher = NULL; in aead_from_name()
103 *cipher = EVP_aes_128_gcm(); in aead_from_name()
105 *cipher = EVP_aes_192_gcm(); in aead_from_name()
108 *cipher = EVP_aes_256_gcm(); in aead_from_name()
111 *cipher = EVP_chacha20_poly1305(); in aead_from_name()
198 run_cipher_aead_encrypt_test(const EVP_CIPHER *cipher, in run_cipher_aead_encrypt_test() argument
391 run_cipher_aead_test(const EVP_CIPHER *cipher, in run_cipher_aead_test() argument
410 const EVP_CIPHER *cipher = NULL; in main() local
460 if (!aead_from_name(&aead, &cipher, aeadname)) { in main()
470 if (cipher != NULL) { in main()
[all …]
/openbsd/lib/libcrypto/cms/
H A Dcms_enc.c88 enc = ec->cipher ? 1 : 0; in cms_EncryptedContent_init_bio()
99 ciph = ec->cipher; in cms_EncryptedContent_init_bio()
104 ec->cipher = NULL; in cms_EncryptedContent_init_bio()
212 const EVP_CIPHER *cipher, const unsigned char *key, size_t keylen) in cms_EncryptedContent_init() argument
214 ec->cipher = cipher; in cms_EncryptedContent_init()
223 if (cipher) in cms_EncryptedContent_init()
262 if (enc->encryptedContentInfo->cipher && enc->unprotectedAttrs) in cms_EncryptedData_init_bio()
/openbsd/lib/libcrypto/pem/
H A Dpem_lib.c282 EVP_CIPHER_INFO cipher; in PEM_bytes_read_bio() local
301 if (!PEM_get_EVP_CIPHER_INFO(header, &cipher)) in PEM_bytes_read_bio()
303 if (!PEM_do_header(&cipher, data, &len, cb, u)) in PEM_bytes_read_bio()
454 if (cipher->cipher == NULL) in PEM_do_header()
464 if (!EVP_BytesToKey(cipher->cipher, EVP_md5(), &(cipher->iv[0]), in PEM_do_header()
470 o = EVP_DecryptInit_ex(&ctx, cipher->cipher, NULL, key, in PEM_do_header()
471 &(cipher->iv[0])); in PEM_do_header()
489 PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher) in PEM_get_EVP_CIPHER_INFO() argument
495 cipher->cipher = NULL; in PEM_get_EVP_CIPHER_INFO()
535 cipher->cipher = enc = EVP_get_cipherbyname(p); in PEM_get_EVP_CIPHER_INFO()
[all …]

1234567