/openbsd-current/lib/libcrypto/evp/ |
H A D | evp_names.c | 33 const EVP_CIPHER *(*cipher)(void); member in struct:cipher_name 51 .cipher = EVP_aes_128_cbc, 55 .cipher = EVP_aes_128_cfb128, 59 .cipher = EVP_aes_128_cfb1, 63 .cipher = EVP_aes_128_cfb8, 67 .cipher = EVP_aes_128_ctr, 71 .cipher = EVP_aes_128_ecb, 75 .cipher = EVP_aes_128_ofb, 79 .cipher = EVP_aes_128_xts, 84 .cipher 1486 const struct cipher_name *cipher = &cipher_names[i]; local 1547 OBJ_NAME_from_cipher_name(OBJ_NAME *obj_name, const struct cipher_name *cipher) argument 1573 const struct cipher_name *cipher = &cipher_names[i]; local 1645 const struct cipher_name *cipher; local [all...] |
H A D | evp_cipher.c | 125 EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, argument 128 return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc); 133 EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine, argument 142 if (cipher == NULL && ctx->cipher == NULL) { 148 * Set up cipher and context. Allocate cipher data and initialize ctx. 151 if (cipher != NULL) { 158 ctx->cipher = cipher; 280 EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const unsigned char *key, const unsigned char *iv) argument 288 EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine, const unsigned char *key, const unsigned char *iv) argument 469 EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const unsigned char *key, const unsigned char *iv) argument 477 EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine, const unsigned char *key, const unsigned char *iv) argument 1015 EVP_CIPHER_type(const EVP_CIPHER *cipher) argument 1073 EVP_CIPHER_nid(const EVP_CIPHER *cipher) argument 1080 EVP_CIPHER_block_size(const EVP_CIPHER *cipher) argument 1087 EVP_CIPHER_key_length(const EVP_CIPHER *cipher) argument 1094 EVP_CIPHER_iv_length(const EVP_CIPHER *cipher) argument 1101 EVP_CIPHER_flags(const EVP_CIPHER *cipher) argument 1110 EVP_CIPHER *cipher; local 1131 EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher) argument 1145 EVP_CIPHER_meth_free(EVP_CIPHER *cipher) argument 1152 EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len) argument 1161 EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags) argument 1170 EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size) argument 1179 EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher, int (*init)(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc)) argument 1190 EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher, int (*do_cipher)(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)) argument 1201 EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher, int (*cleanup)(EVP_CIPHER_CTX *)) argument 1211 EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher, int (*set_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *)) argument 1221 EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher, int (*get_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *)) argument 1231 EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher, int (*ctrl)(EVP_CIPHER_CTX *, int type, int arg, void *ptr)) argument [all...] |
/openbsd-current/lib/libssl/test/ |
H A D | testenc | 10 $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 34 $cmd $i -bufsize 157 -d -k test < $test.$i.cipher >$test.$i.clear 40 /bin/rm $test.$i.cipher [all...] |
/openbsd-current/regress/lib/libradius/ |
H A D | test24.c | 11 uint8_t cipher[256],cipher1[256]; local 24 clen = sizeof(cipher); 25 CHECK(radius_encrypt_user_password_attr(cipher, &clen, "challenge", ra, "xyzzy5461") == 0); 27 CHECK(memcmp(cipher, encryptedpass, 16) == 0); 29 CHECK(radius_decrypt_user_password_attr(plain, sizeof(plain), cipher, clen, ra, "xyzzy5461") == 0); 33 CHECK(radius_encrypt_user_password_attr(cipher, &clen, "challenge", ra, "xyzzy5461") != 0); 34 CHECK(radius_decrypt_user_password_attr(plain, 16, cipher, 16, ra, "xyzzy5461") != 0); 35 CHECK(radius_decrypt_user_password_attr(plain, 256, cipher, 17, ra, "xyzzy5461") != 0); 43 radius_encrypt_user_password_attr(cipher, &clen, "foobarbaz", radius_get_authenticator_retval(packet), "sharedsecret"); 44 CHECK(memcmp(cipher1, cipher, 1 [all...] |
H A D | test25.c | 26 uint8_t cipher[256]; local 35 clen = sizeof(cipher); 36 CHECK(radius_encrypt_mppe_key_attr(cipher, &clen, plainkey, 16, ra, "hogehogefugafuga") == 0); 40 CHECK(radius_decrypt_mppe_key_attr(plain, &plen, cipher, clen, ra, "hogehogefugafuga") == 0); 45 CHECK(radius_encrypt_mppe_key_attr(cipher, &clen, plainkey, 16, ra, "hogehogefugafuga") != 0); 47 CHECK(radius_decrypt_mppe_key_attr(plain, &plen, cipher, 34, ra, "hogehogefugafuga") != 0); 49 CHECK(radius_decrypt_mppe_key_attr(plain, &plen, cipher, 33, ra, "hogehogefugafuga") != 0); 54 clen = sizeof(cipher); 55 CHECK(radius_get_vs_raw_attr(packet, RADIUS_VENDOR_MICROSOFT, RADIUS_VTYPE_MPPE_SEND_KEY, cipher, &clen) == 0); 58 CHECK(radius_decrypt_mppe_key_attr(plain, &plen, cipher, cle [all...] |
/openbsd-current/regress/usr.bin/openssl/ |
H A D | testenc.sh | 13 $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-current/regress/lib/libssl/interop/cipher/ |
H A D | Makefile | 7 # have used correct cipher by grepping in their session print out. 26 sed -n 's/^cipher //p' <$@.tmp | sort -u >$@ 33 sed -n 's/^cipher //p' <$@.tmp | sort -u >$@ 82 .for cipher in ${CIPHERS_${clib}_${slib}} 84 .if "${cipher:M*-DSS-*}" != "" 85 TYPE_${cipher} = dsa 86 .elif "${cipher:M*-ECDSA-*}" != "" 87 TYPE_${cipher} = ec 88 .elif "${cipher:M*-RSA-*}" != "" 89 TYPE_${cipher} [all...] |
/openbsd-current/regress/usr.bin/ssh/ |
H A D | dhgex.sh | 15 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`
|
H A D | try-ciphers.sh | 8 for c in `${SSH} -Q cipher`; do 11 trace "cipher $c mac $m" 12 verbose "test $tid: cipher $c mac $m" 18 fail "ssh failed with mac $m cipher $c" 22 if ${SSH} -Q cipher-auth | grep "^${c}\$" >/dev/null 2>&1 ; then
|
H A D | cipher-speed.sh | 1 # $OpenBSD: cipher-speed.sh,v 1.15 2022/01/21 02:54:41 dtucker Exp $ 4 tid="cipher speed" 23 for c in `${SSH} -Q cipher`; do n=0; for m in `${SSH} -Q mac`; do 24 trace "cipher $c mac $m" 33 fail "ssh failed with mac $m cipher $c" 37 if ${SSH} -Q cipher-auth | grep "^${c}\$" >/dev/null 2>&1 ; then
|
/openbsd-current/lib/libradius/ |
H A D | radius_userpass.c | 39 radius_encrypt_user_password_attr(void *cipher, size_t * clen, argument 53 c = ((char *)cipher) + off; 72 radius_decrypt_user_password_attr(char *plain, size_t plen, const void *cipher, argument 88 c = ((char *)cipher) + off; 119 char cipher[256]; local 120 size_t clen = sizeof(cipher); 122 if (radius_get_raw_attr(packet, RADIUS_TYPE_USER_PASSWORD, cipher, 125 if (radius_decrypt_user_password_attr(buf, len, cipher, clen, 136 char cipher[256]; local 137 size_t clen = sizeof(cipher); [all...] |
H A D | radius_mppe.c | 45 radius_encrypt_mppe_key_attr(void *cipher, size_t * clen, const void *plain, argument 66 memcpy(cipher, &salt, 2); 68 c = ((uint8_t *)cipher) + 2 + off; 74 MD5_Update(&ctx, cipher, 2); 86 radius_decrypt_mppe_key_attr(void *plain, size_t * plen, const void *cipher, argument 103 c = ((uint8_t *)cipher) + 2 + off; 109 MD5_Update(&ctx, cipher, 2); 129 uint8_t cipher[256]; local 130 size_t clen = sizeof(cipher); 133 cipher, 145 uint8_t cipher[256]; local [all...] |
/openbsd-current/regress/lib/libcrypto/evp/ |
H A D | evptest.c | 144 printf("Testing cipher %s%s\n", EVP_CIPHER_name(c), 243 test_cipher(const char *cipher, const unsigned char *key, int kn, argument 249 c = EVP_get_cipherbyname(cipher); 348 char *cipher; local 358 cipher=sstrsep(&p, ":"); 376 if (!test_cipher(cipher, key, kn, iv, in, plaintext, pn, ciphertext, cn, encdec) && 377 !test_digest(cipher, plaintext, pn, ciphertext, cn)) { 379 if (strstr(cipher, "AES") == cipher && verbose) { 381 fprintf(stdout, "Cipher disabled, skipping %s\n", cipher); [all...] |
H A D | evp_test.c | 264 const EVP_CIPHER *(*cipher)(void); member in struct:evp_iv_len_test 270 .cipher = EVP_aes_128_ccm, 276 .cipher = EVP_aes_128_ccm, 282 .cipher = EVP_aes_128_ccm, 288 .cipher = EVP_aes_128_ccm, 295 .cipher = EVP_aes_192_ccm, 301 .cipher = EVP_aes_192_ccm, 307 .cipher = EVP_aes_192_ccm, 313 .cipher = EVP_aes_192_ccm, 320 .cipher 467 const EVP_CIPHER *cipher = test->cipher(); local 563 evp_cipher_do_all_cb(const EVP_CIPHER *cipher, const char *from, const char *to, void *arg) argument 593 evp_cipher_aliases_cb(const EVP_CIPHER *cipher, const char *from, const char *to, void *arg) argument 666 const EVP_CIPHER *cipher; local [all...] |
/openbsd-current/regress/lib/libssl/ssl/ |
H A D | testssl | 58 for cipher in `$openssl ciphers -v "$protocol+aRSA" | 60 echo "Testing $cipher" 61 $ssltest -cipher $cipher -tls1_2 63 echo "Failed $cipher" 70 for cipher in `$openssl ciphers -v "$protocol" | 72 echo "Testing $cipher" 73 $ssltest -cipher $cipher -seclevel 2 75 echo "Failed $cipher" [all...] |
/openbsd-current/lib/libssl/ |
H A D | ssl_ciphers.c | 26 ssl_cipher_in_list(STACK_OF(SSL_CIPHER) *ciphers, const SSL_CIPHER *cipher) 31 if (sk_SSL_CIPHER_value(ciphers, i)->id == cipher->id) 39 ssl_cipher_allowed_in_tls_version_range(const SSL_CIPHER *cipher, uint16_t min_ver, argument 42 switch(cipher->algorithm_ssl) { 56 SSL_CIPHER *cipher; local 68 if ((cipher = sk_SSL_CIPHER_value(ciphers, i)) == NULL) 70 if (!ssl_cipher_allowed_in_tls_version_range(cipher, min_vers, 73 if (!ssl_security_cipher_check(s, cipher)) 75 if (!CBB_add_u16(cbb, ssl3_cipher_get_value(cipher))) 97 const SSL_CIPHER *cipher; local 207 const SSL_CIPHER *cipher; local 263 const SSL_CIPHER *cipher; local [all...] |
H A D | ssl_seclevel.c | 98 const SSL_CIPHER *cipher = arg; local 112 if (cipher->algorithm_auth & SSL_aNULL) 115 if (cipher->algorithm_mac & SSL_MD5) 121 if (cipher->algorithm_enc & SSL_RC4) 127 /* Security level >= 3 requires a cipher with forward secrecy. */ 128 if ((cipher->algorithm_mkey & (SSL_kDHE | SSL_kECDHE)) == 0 && 129 cipher->algorithm_ssl != SSL_TLSV1_3) 135 if (cipher->algorithm_mac & SSL_SHA1) 204 int version, void *cipher, void *ex_data) 210 return ssl_security_secop_cipher(ctx, ssl, bits, cipher); 203 ssl_security_default_cb(const SSL *ssl, const SSL_CTX *ctx, int secop, int bits, int version, void *cipher, void *ex_data) argument 261 ssl_security_cipher(const SSL *ssl, SSL_CIPHER *cipher, int secop) argument 267 ssl_security_cipher_check(const SSL *ssl, SSL_CIPHER *cipher) argument 273 ssl_security_shared_cipher(const SSL *ssl, SSL_CIPHER *cipher) argument 279 ssl_security_supported_cipher(const SSL *ssl, SSL_CIPHER *cipher) argument [all...] |
H A D | ssl_txt.c | 124 if (x->cipher == NULL) { 131 if (x->cipher->name != NULL) 132 cipher_name = x->cipher->name;
|
/openbsd-current/regress/lib/libssl/interop/ |
H A D | Makefile | 15 SUBDIR += cipher
|
/openbsd-current/usr.bin/ssh/ |
H A D | cipher.c | 1 /* $OpenBSD: cipher.c,v 1.121 2024/05/17 02:39:11 jsg Exp $ */ 44 #include "cipher.h" 60 const struct sshcipher *cipher; member in struct:sshcipher_ctx 177 * Default is cipher block size, except for chacha20+poly1305 that 233 if (cc == NULL || cc->cipher == NULL) 240 cipher_init(struct sshcipher_ctx **ccp, const struct sshcipher *cipher, argument 255 cc->plaintext = (cipher->flags & CFLAG_NONE) != 0; 258 if (keylen < cipher->key_len || 259 (iv != NULL && ivlen < cipher_ivlen(cipher))) { 264 cc->cipher [all...] |
/openbsd-current/regress/lib/libssl/ciphers/ |
H A D | cipherstest.c | 42 const SSL_CIPHER *cipher; local 53 if ((cipher = ssl3_get_cipher(num_ciphers - i)) == NULL) { 58 if ((id = SSL_CIPHER_get_id(cipher)) <= prev_id) { 60 "id - cipher %d (%lx) <= cipher %d (%lx)\n", 74 const SSL_CIPHER *cipher; local 102 cipher = sk_SSL_CIPHER_value(ciphers, i); 103 cipher_value = SSL_CIPHER_get_value(cipher); 108 if ((cipher = SSL_CIPHER_find(ssl, buf)) == NULL) { 111 SSL_CIPHER_get_name(cipher)); 201 SSL_CIPHER *cipher; local 389 SSL_CIPHER *cipher; local [all...] |
/openbsd-current/lib/libcrypto/pkcs12/ |
H A D | p12_p8e.c | 68 PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher, const char *pass, argument 81 pbe = PKCS5_pbe2_set(cipher, iter, salt, saltlen);
|
/openbsd-current/lib/libcrypto/asn1/ |
H A D | x_pkey.c | 89 ret->cipher.cipher = NULL; 90 memset(ret->cipher.iv, 0, EVP_MAX_IV_LENGTH);
|
/openbsd-current/regress/lib/libcrypto/aead/ |
H A D | aeadtest.c | 95 aead_from_name(const EVP_AEAD **aead, const EVP_CIPHER **cipher, argument 99 *cipher = NULL; 103 *cipher = EVP_aes_128_gcm(); 105 *cipher = EVP_aes_192_gcm(); 108 *cipher = EVP_aes_256_gcm(); 111 *cipher = EVP_chacha20_poly1305(); 198 run_cipher_aead_encrypt_test(const EVP_CIPHER *cipher, argument 214 if (!EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL)) { 215 fprintf(stderr, "FAIL: EVP_EncryptInit_ex with cipher\n"); 261 fprintf(stderr, "FAIL: EVP_EncryptInit_ex with cipher\ 291 run_cipher_aead_decrypt_test(const EVP_CIPHER *cipher, int invalid, unsigned char bufs[NUM_TYPES][BUF_MAX], const unsigned int lengths[NUM_TYPES], unsigned int line_no) argument 391 run_cipher_aead_test(const EVP_CIPHER *cipher, unsigned char bufs[NUM_TYPES][BUF_MAX], const unsigned int lengths[NUM_TYPES], unsigned int line_no) argument 410 const EVP_CIPHER *cipher = NULL; local [all...] |
/openbsd-current/usr.bin/openssl/ |
H A D | enc.c | 79 const EVP_CIPHER *cipher; member in struct:__anon9 109 cfg.cipher = NULL; 114 if ((cfg.cipher = EVP_get_cipherbyname(name)) != NULL) { 214 .desc = "Use NULL cipher (no encryption or decryption)", 296 const EVP_CIPHER *cipher; local 298 if ((cipher = EVP_get_cipherbyname(name->name)) == NULL) 301 if ((EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) != 0) 303 if (EVP_CIPHER_mode(cipher) == EVP_CIPH_XTS_MODE) 361 cfg.cipher = EVP_get_cipherbyname(pname); 363 if (!cfg.base64 && cfg.cipher [all...] |