| /freebsd-12-stable/crypto/openssl/crypto/evp/ |
| D | cmeth_lib.c | 18 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 …]
|
| D | evp_enc.c | 26 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 …]
|
| D | evp_lib.c | 21 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 …]
|
| D | bio_enc.c | 33 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() 313 if (!EVP_CipherInit_ex(ctx->cipher, NULL, NULL, NULL, NULL, in enc_ctrl() [all …]
|
| /freebsd-12-stable/sys/crypto/rijndael/ |
| D | rijndael-api-fst.c | 72 int rijndael_cipherInit(cipherInstance *cipher, BYTE mode, char *IV) { in rijndael_cipherInit() argument 74 cipher->mode = mode; in rijndael_cipherInit() 79 memcpy(cipher->IV, IV, RIJNDAEL_MAX_IV_SIZE); in rijndael_cipherInit() 81 memset(cipher->IV, 0, RIJNDAEL_MAX_IV_SIZE); in rijndael_cipherInit() 86 int rijndael_blockEncrypt(cipherInstance *cipher, keyInstance *key, in rijndael_blockEncrypt() argument 91 if (cipher == NULL || in rijndael_blockEncrypt() 102 switch (cipher->mode) { in rijndael_blockEncrypt() 113 memcpy(block, cipher->IV, 16); in rijndael_blockEncrypt() 120 ((u_int32_t*)block)[0] = ((u_int32_t*)cipher->IV)[0] ^ ((u_int32_t*)input)[0]; in rijndael_blockEncrypt() 121 ((u_int32_t*)block)[1] = ((u_int32_t*)cipher->IV)[1] ^ ((u_int32_t*)input)[1]; in rijndael_blockEncrypt() [all …]
|
| /freebsd-12-stable/crypto/openssl/doc/man3/ |
| D | EVP_CIPHER_meth_new.pod | 20 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 …]
|
| D | SSL_CIPHER_get_name.pod | 26 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 …]
|
| D | EVP_rc4.pod | 8 - EVP RC4 stream cipher 20 The RC4 stream cipher for EVP. 26 RC4 stream cipher. This is a variable key length cipher with a default key 31 RC4 stream cipher with 40 bit key length. 38 Authenticated encryption with the RC4 stream cipher with MD5 as HMAC. 49 implementation of the symmetric cipher. See L<EVP_CIPHER_meth_new(3)> for
|
| D | BIO_f_cipher.pod | 5 BIO_f_cipher, BIO_set_cipher, BIO_get_cipher_status, BIO_get_cipher_ctx - cipher BIO filter 15 void BIO_set_cipher(BIO *b, const EVP_CIPHER *cipher, 22 BIO_f_cipher() returns the cipher BIO method. This is a filter 24 read from it. It is a BIO wrapper for the cipher routines 33 BIO_set_cipher() sets the cipher of BIO B<b> to B<cipher> using key B<key> 43 BIO cipher context. The retrieved context can be used in conjunction 44 with the standard cipher routines to set it up. This is useful when 59 be achieved by preceding the cipher BIO with a buffering BIO. 63 BIO_f_cipher() returns the cipher BIO method.
|
| /freebsd-12-stable/crypto/openssl/crypto/engine/ |
| D | eng_openssl.c | 58 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 …]
|
| /freebsd-12-stable/crypto/openssh/ |
| D | cipher.c | 64 const struct sshcipher *cipher; member 239 if (cc == NULL || cc->cipher == NULL) in cipher_warning_message() 246 cipher_init(struct sshcipher_ctx **ccp, const struct sshcipher *cipher, in cipher_init() argument 261 cc->plaintext = (cipher->flags & CFLAG_NONE) != 0; in cipher_init() 264 if (keylen < cipher->key_len || in cipher_init() 265 (iv != NULL && ivlen < cipher_ivlen(cipher))) { in cipher_init() 270 cc->cipher = cipher; in cipher_init() 271 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) { in cipher_init() 276 if ((cc->cipher->flags & CFLAG_NONE) != 0) { in cipher_init() 281 if ((cc->cipher->flags & CFLAG_AESCTR) != 0) { in cipher_init() [all …]
|
| /freebsd-12-stable/crypto/openssl/apps/ |
| D | enc.c | 100 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 …]
|
| /freebsd-12-stable/tools/tools/crypto/ |
| D | cryptocheck.c | 135 int cipher; member 165 { .name = "aes-cbc", .cipher = CRYPTO_AES_CBC, .type = T_BLKCIPHER, 167 { .name = "aes-cbc192", .cipher = CRYPTO_AES_CBC, .type = T_BLKCIPHER, 169 { .name = "aes-cbc256", .cipher = CRYPTO_AES_CBC, .type = T_BLKCIPHER, 171 { .name = "aes-ctr", .cipher = CRYPTO_AES_ICM, .type = T_BLKCIPHER, 173 { .name = "aes-ctr192", .cipher = CRYPTO_AES_ICM, .type = T_BLKCIPHER, 175 { .name = "aes-ctr256", .cipher = CRYPTO_AES_ICM, .type = T_BLKCIPHER, 177 { .name = "aes-xts", .cipher = CRYPTO_AES_XTS, .type = T_BLKCIPHER, 179 { .name = "aes-xts256", .cipher = CRYPTO_AES_XTS, .type = T_BLKCIPHER, 181 { .name = "chacha20", .cipher = CRYPTO_CHACHA20, .type = T_BLKCIPHER, [all …]
|
| /freebsd-12-stable/crypto/openssl/doc/man1/ |
| D | ciphers.pod | 6 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 …]
|
| /freebsd-12-stable/contrib/wpa/src/common/ |
| D | ptksa_cache.c | 133 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()
|
| D | ptksa_cache.h | 24 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
|
| /freebsd-12-stable/lib/libutil/ |
| D | login_crypt.c | 41 const char *cipher; in login_setcryptfmt() local 43 cipher = login_getcapstr(lc, "passwd_format", def, NULL); in login_setcryptfmt() 46 "passwd_format = %s\n", cipher); in login_setcryptfmt() 47 if (cipher == NULL) in login_setcryptfmt() 49 if (!crypt_set_format(cipher)) in login_setcryptfmt() 51 return (cipher); in login_setcryptfmt()
|
| /freebsd-12-stable/tests/sys/geom/class/eli/ |
| D | conf.sh | 38 for cipher in aes-xts:128 aes-xts:256 \ 41 ealgo=${cipher%%:*} 42 keylen=${cipher##*:} 46 ${func} $cipher $aalgo $secsize 62 for cipher in aes-xts:128 aes-xts:256 \ 65 ealgo=${cipher%%:*} 66 keylen=${cipher##*:} 68 ${func} $cipher $secsize
|
| /freebsd-12-stable/crypto/openssh/regress/ |
| 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`
|
| /freebsd-12-stable/contrib/wpa/src/tls/ |
| D | tlsv1_server.c | 531 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 …]
|
| D | tlsv1_client.c | 607 char *cipher; in tlsv1_client_get_cipher() local 611 cipher = "RC4-MD5"; in tlsv1_client_get_cipher() 614 cipher = "RC4-SHA"; in tlsv1_client_get_cipher() 617 cipher = "DES-CBC-SHA"; in tlsv1_client_get_cipher() 620 cipher = "DES-CBC3-SHA"; in tlsv1_client_get_cipher() 623 cipher = "DHE-RSA-DES-CBC-SHA"; in tlsv1_client_get_cipher() 626 cipher = "DHE-RSA-DES-CBC3-SHA"; in tlsv1_client_get_cipher() 629 cipher = "ADH-RC4-MD5"; in tlsv1_client_get_cipher() 632 cipher = "ADH-DES-SHA"; in tlsv1_client_get_cipher() 635 cipher = "ADH-DES-CBC3-SHA"; in tlsv1_client_get_cipher() [all …]
|
| /freebsd-12-stable/sys/dev/rtwn/ |
| D | if_rtwn_tx.c | 88 uint8_t cipher; in rtwn_get_cipher() local 92 cipher = RTWN_TXDW1_CIPHER_NONE; in rtwn_get_cipher() 96 cipher = RTWN_TXDW1_CIPHER_RC4; in rtwn_get_cipher() 99 cipher = RTWN_TXDW1_CIPHER_AES; in rtwn_get_cipher() 107 return (cipher); in rtwn_get_cipher() 122 u_int cipher; in rtwn_tx_data() local 157 cipher = IEEE80211_CIPHER_NONE; in rtwn_tx_data() 166 cipher = k->wk_cipher->ic_cipher; in rtwn_tx_data() 175 txd->txdw1 = htole32(SM(RTWN_TXDW1_CIPHER, rtwn_get_cipher(cipher))); in rtwn_tx_data() 201 u_int cipher; in rtwn_tx_raw() local [all …]
|
| /freebsd-12-stable/sys/opencrypto/ |
| D | skipjack.c | 129 skipjack_forwards(u_int8_t *plain, u_int8_t *cipher, u_int8_t **key_tables) in skipjack_forwards() argument 188 cipher [0] = wh1; cipher [1] = wl1; in skipjack_forwards() 189 cipher [2] = wh2; cipher [3] = wl2; in skipjack_forwards() 190 cipher [4] = wh3; cipher [5] = wl3; in skipjack_forwards() 191 cipher [6] = wh4; cipher [7] = wl4; in skipjack_forwards() 196 skipjack_backwards (u_int8_t *cipher, u_int8_t *plain, u_int8_t **key_tables) in skipjack_backwards() argument 199 u_int8_t wh1 = cipher[0]; u_int8_t wl1 = cipher[1]; in skipjack_backwards() 200 u_int8_t wh2 = cipher[2]; u_int8_t wl2 = cipher[3]; in skipjack_backwards() 201 u_int8_t wh3 = cipher[4]; u_int8_t wl3 = cipher[5]; in skipjack_backwards() 202 u_int8_t wh4 = cipher[6]; u_int8_t wl4 = cipher[7]; in skipjack_backwards()
|
| /freebsd-12-stable/crypto/openssl/engines/ |
| D | e_padlock.c | 78 static int padlock_ciphers(ENGINE *e, const EVP_CIPHER **cipher, 540 padlock_ciphers(ENGINE *e, const EVP_CIPHER **cipher, const int **nids, in padlock_ciphers() argument 544 if (!cipher) { in padlock_ciphers() 552 *cipher = padlock_aes_128_ecb(); in padlock_ciphers() 555 *cipher = padlock_aes_128_cbc(); in padlock_ciphers() 558 *cipher = padlock_aes_128_cfb(); in padlock_ciphers() 561 *cipher = padlock_aes_128_ofb(); in padlock_ciphers() 564 *cipher = padlock_aes_128_ctr(); in padlock_ciphers() 568 *cipher = padlock_aes_192_ecb(); in padlock_ciphers() 571 *cipher = padlock_aes_192_cbc(); in padlock_ciphers() [all …]
|
| /freebsd-12-stable/crypto/openssl/crypto/asn1/ |
| D | p5_pbev2.c | 40 X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter, 50 alg_nid = EVP_CIPHER_type(cipher); 67 if (EVP_CIPHER_iv_length(cipher)) { 69 memcpy(iv, aiv, EVP_CIPHER_iv_length(cipher)); 70 else if (RAND_bytes(iv, EVP_CIPHER_iv_length(cipher)) <= 0) 79 if (!EVP_CipherInit_ex(ctx, cipher, NULL, NULL, iv, 0)) 100 keylen = EVP_CIPHER_key_length(cipher); 143 X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, in PKCS5_pbe2_set() argument 146 return PKCS5_pbe2_set_iv(cipher, iter, salt, saltlen, NULL, -1); in PKCS5_pbe2_set()
|