| /NextBSD/crypto/openssl/crypto/evp/ |
| HD | evp_enc.c | 75 # define M_do_cipher(ctx, out, in, inl) ctx->cipher->do_cipher(ctx, out, in, inl) 94 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, in EVP_CipherInit() argument 97 if (cipher) in EVP_CipherInit() 99 return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc); in EVP_CipherInit() 102 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, in EVP_CipherInit_ex() argument 120 if (ctx->engine && ctx->cipher && (!cipher || in EVP_CipherInit_ex() 121 (cipher in EVP_CipherInit_ex() 122 && (cipher->nid == in EVP_CipherInit_ex() 123 ctx->cipher->nid)))) in EVP_CipherInit_ex() 126 if (cipher) { in EVP_CipherInit_ex() [all …]
|
| HD | evp_lib.c | 72 if (c->cipher->set_asn1_parameters != NULL) in EVP_CIPHER_param_to_asn1() 73 ret = c->cipher->set_asn1_parameters(c, type); in EVP_CIPHER_param_to_asn1() 74 else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1) { in EVP_CIPHER_param_to_asn1() 100 if (c->cipher->get_asn1_parameters != NULL) in EVP_CIPHER_asn1_to_param() 101 ret = c->cipher->get_asn1_parameters(c, type); in EVP_CIPHER_asn1_to_param() 102 else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1) { in EVP_CIPHER_asn1_to_param() 221 return ctx->cipher->block_size; in EVP_CIPHER_CTX_block_size() 227 return ctx->cipher->do_cipher(ctx, out, in, inl); in EVP_Cipher() 232 return ctx->cipher; in EVP_CIPHER_CTX_cipher() 235 unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher) in EVP_CIPHER_flags() argument [all …]
|
| HD | evp_test.c | 377 static int test_cipher(const char *cipher, const unsigned char *key, int kn, in test_cipher() argument 386 c = EVP_get_cipherbyname(cipher); in test_cipher() 500 char *cipher; in main() local 512 cipher = sstrsep(&p, ":"); in main() 547 (cipher, key, kn, iv, in, plaintext, pn, ciphertext, cn, aad, an, in main() 549 && !test_digest(cipher, plaintext, pn, ciphertext, cn)) { in main() 551 if (strstr(cipher, "AES") == cipher) { in main() 552 fprintf(stdout, "Cipher disabled, skipping %s\n", cipher); in main() 557 if (strstr(cipher, "DES") == cipher) { in main() 558 fprintf(stdout, "Cipher disabled, skipping %s\n", cipher); in main() [all …]
|
| HD | bio_enc.c | 86 EVP_CIPHER_CTX cipher; member 118 EVP_CIPHER_CTX_init(&ctx->cipher); in enc_new() 139 EVP_CIPHER_CTX_cleanup(&(b->cipher)); in enc_free() 194 i = EVP_CipherFinal_ex(&(ctx->cipher), in enc_read() 204 EVP_CipherUpdate(&(ctx->cipher), in enc_read() 263 EVP_CipherUpdate(&(ctx->cipher), in enc_write() 301 EVP_CipherInit_ex(&(ctx->cipher), NULL, NULL, NULL, NULL, in enc_ctrl() 302 ctx->cipher.encrypt); in enc_ctrl() 333 ret = EVP_CipherFinal_ex(&(ctx->cipher), in enc_ctrl() 357 (*c_ctx) = &(ctx->cipher); in enc_ctrl() [all …]
|
| HD | p5_crpt.c | 75 ASN1_TYPE *param, const EVP_CIPHER *cipher, in PKCS5_PBE_keyivgen() argument 135 OPENSSL_assert(EVP_CIPHER_key_length(cipher) <= (int)sizeof(md_tmp)); in PKCS5_PBE_keyivgen() 136 memcpy(key, md_tmp, EVP_CIPHER_key_length(cipher)); in PKCS5_PBE_keyivgen() 137 OPENSSL_assert(EVP_CIPHER_iv_length(cipher) <= 16); in PKCS5_PBE_keyivgen() 138 memcpy(iv, md_tmp + (16 - EVP_CIPHER_iv_length(cipher)), in PKCS5_PBE_keyivgen() 139 EVP_CIPHER_iv_length(cipher)); in PKCS5_PBE_keyivgen() 140 if (!EVP_CipherInit_ex(cctx, cipher, NULL, key, iv, en_de)) in PKCS5_PBE_keyivgen()
|
| /NextBSD/sys/crypto/rijndael/ |
| HD | 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 …]
|
| /NextBSD/crypto/openssh/ |
| HD | cipher.c | 263 cipher_init(CipherContext *cc, const Cipher *cipher, in cipher_init() argument 276 if (cipher->number == SSH_CIPHER_DES) { in cipher_init() 285 cc->plaintext = (cipher->number == SSH_CIPHER_NONE); in cipher_init() 288 if (keylen < cipher->key_len) in cipher_init() 290 keylen, cipher->name); in cipher_init() 291 if (iv != NULL && ivlen < cipher_ivlen(cipher)) in cipher_init() 293 ivlen, cipher->name); in cipher_init() 294 cc->cipher = cipher; in cipher_init() 296 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) { in cipher_init() 300 type = (*cipher->evptype)(); in cipher_init() [all …]
|
| /NextBSD/crypto/openssl/doc/apps/ |
| HD | ciphers.pod | 5 ciphers - SSL cipher display and cipher list tool. 19 The B<ciphers> command converts textual OpenSSL cipher lists into ordered 20 SSL cipher preference lists. It can be used as a test tool to determine 32 restrictions and whether the algorithm is classed as an "export" cipher. 34 in a cipher list; this is when similar ciphers are available for 39 Like B<-v>, but include cipher suite codes in output (hex format). 59 a cipher list to convert to a cipher preference list. If it is not included 60 then the default cipher list will be used. The format is described below. 66 The cipher list consists of one or more I<cipher strings> separated by colons. 69 The actual cipher string can take several different forms. [all …]
|
| /NextBSD/crypto/openssl/crypto/asn1/ |
| HD | x_pkey.c | 82 ret->cipher.cipher = in d2i_X509_PKEY() 85 if (ret->cipher.cipher == NULL) { in d2i_X509_PKEY() 97 memcpy(ret->cipher.iv, in d2i_X509_PKEY() 100 memset(ret->cipher.iv, 0, EVP_MAX_IV_LENGTH); in d2i_X509_PKEY() 117 ret->cipher.cipher = NULL; in X509_PKEY_new() 118 memset(ret->cipher.iv, 0, EVP_MAX_IV_LENGTH); in X509_PKEY_new()
|
| HD | p5_pbev2.c | 90 X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter, 101 alg_nid = EVP_CIPHER_type(cipher); 120 if (EVP_CIPHER_iv_length(cipher)) { 122 memcpy(iv, aiv, EVP_CIPHER_iv_length(cipher)); 123 else if (RAND_pseudo_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0) 130 if (!EVP_CipherInit_ex(&ctx, cipher, NULL, NULL, iv, 0)) 151 keylen = EVP_CIPHER_key_length(cipher); 198 X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, in PKCS5_pbe2_set() argument 201 return PKCS5_pbe2_set_iv(cipher, iter, salt, saltlen, NULL, -1); in PKCS5_pbe2_set()
|
| /NextBSD/crypto/openssl/apps/ |
| HD | enc.c | 122 const EVP_CIPHER *cipher = NULL, *c; in MAIN() local 153 cipher = EVP_get_cipherbyname(pname); in MAIN() 155 if (!do_zlib && !base64 && (cipher == NULL) in MAIN() 158 if (!base64 && (cipher == NULL) && (strcmp(pname, "enc") != 0)) in MAIN() 273 cipher = c; in MAIN() 275 cipher = NULL; in MAIN() 329 if (cipher && EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) { in MAIN() 335 if (cipher && (EVP_CIPHER_mode(cipher) == EVP_CIPH_XTS_MODE)) { in MAIN() 419 if ((str == NULL) && (cipher != NULL) && (hkey == NULL)) { in MAIN() 424 OBJ_nid2ln(EVP_CIPHER_nid(cipher)), in MAIN() [all …]
|
| /NextBSD/lib/libutil/ |
| HD | login_crypt.c | 39 const char *cipher; in login_setcryptfmt() local 41 cipher = login_getcapstr(lc, "passwd_format", def, NULL); in login_setcryptfmt() 44 "passwd_format = %s\n", cipher); in login_setcryptfmt() 45 if (cipher == NULL) in login_setcryptfmt() 47 if (!crypt_set_format(cipher)) in login_setcryptfmt() 49 return (cipher); in login_setcryptfmt()
|
| /NextBSD/contrib/wpa/src/tls/ |
| HD | tlsv1_server.c | 504 char *cipher; in tlsv1_server_get_cipher() local 508 cipher = "RC4-MD5"; in tlsv1_server_get_cipher() 511 cipher = "RC4-SHA"; in tlsv1_server_get_cipher() 514 cipher = "DES-CBC-SHA"; in tlsv1_server_get_cipher() 517 cipher = "DES-CBC3-SHA"; in tlsv1_server_get_cipher() 520 cipher = "DHE-RSA-DES-CBC-SHA"; in tlsv1_server_get_cipher() 523 cipher = "DHE-RSA-DES-CBC3-SHA"; in tlsv1_server_get_cipher() 526 cipher = "ADH-RC4-MD5"; in tlsv1_server_get_cipher() 529 cipher = "ADH-DES-SHA"; in tlsv1_server_get_cipher() 532 cipher = "ADH-DES-CBC3-SHA"; in tlsv1_server_get_cipher() [all …]
|
| HD | tlsv1_client.c | 558 char *cipher; in tlsv1_client_get_cipher() local 562 cipher = "RC4-MD5"; in tlsv1_client_get_cipher() 565 cipher = "RC4-SHA"; in tlsv1_client_get_cipher() 568 cipher = "DES-CBC-SHA"; in tlsv1_client_get_cipher() 571 cipher = "DES-CBC3-SHA"; in tlsv1_client_get_cipher() 574 cipher = "DHE-RSA-DES-CBC-SHA"; in tlsv1_client_get_cipher() 577 cipher = "DHE-RSA-DES-CBC3-SHA"; in tlsv1_client_get_cipher() 580 cipher = "ADH-RC4-MD5"; in tlsv1_client_get_cipher() 583 cipher = "ADH-DES-SHA"; in tlsv1_client_get_cipher() 586 cipher = "ADH-DES-CBC3-SHA"; in tlsv1_client_get_cipher() [all …]
|
| /NextBSD/crypto/openssl/doc/ssl/ |
| HD | SSL_CIPHER_get_name.pod | 11 const char *SSL_CIPHER_get_name(const SSL_CIPHER *cipher); 12 int SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *alg_bits); 13 char *SSL_CIPHER_get_version(const SSL_CIPHER *cipher); 14 char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int size); 18 SSL_CIPHER_get_name() returns a pointer to the name of B<cipher>. If the 22 SSL_CIPHER_get_bits() returns the number of secret bits used for B<cipher>. If 24 chosen algorithm. If B<cipher> is NULL, 0 is returned. 27 version that first defined the cipher. 31 If B<cipher> is NULL, "(NONE)" is returned. 33 SSL_CIPHER_description() returns a textual description of the cipher used [all …]
|
| /NextBSD/crypto/openssh/regress/ |
| HD | dhgex.sh | 14 cipher="$1"; shift 18 opts="-oKexAlgorithms=$kex -oCiphers=$cipher" 20 verbose "$tid bits $bits $kex $cipher" 50 check 3072 `${SSH} -Q cipher | grep 128` 52 check 7680 `${SSH} -Q cipher | grep 192` 53 check 8192 `${SSH} -Q cipher | grep 256`
|
| /NextBSD/crypto/openssl/doc/crypto/ |
| HD | EVP_EncryptInit.pod | 29 EVP_aes_192_ccm, EVP_aes_256_ccm - EVP cipher routines 90 #define EVP_CIPHER_CTX_cipher(e) ((e)->cipher) 91 #define EVP_CIPHER_CTX_nid(e) ((e)->cipher->nid) 92 #define EVP_CIPHER_CTX_block_size(e) ((e)->cipher->block_size) 94 #define EVP_CIPHER_CTX_iv_length(e) ((e)->cipher->iv_len) 98 #define EVP_CIPHER_CTX_flags(e) ((e)->cipher->flags) 99 #define EVP_CIPHER_CTX_mode(e) ((e)->cipher->flags & EVP_CIPH_MODE) 106 The EVP cipher routines are a high level interface to certain 109 EVP_CIPHER_CTX_init() initializes cipher contex B<ctx>. 111 EVP_EncryptInit_ex() sets up cipher context B<ctx> for encryption [all …]
|
| HD | BIO_f_cipher.pod | 5 BIO_f_cipher, BIO_set_cipher, BIO_get_cipher_status, BIO_get_cipher_ctx - cipher BIO filter 13 void BIO_set_cipher(BIO *b,const EVP_CIPHER *cipher, 20 BIO_f_cipher() returns the cipher BIO method. This is a filter 22 read from it. It is a BIO wrapper for the cipher routines 31 BIO_set_cipher() sets the cipher of BIO B<b> to B<cipher> using key B<key> 41 BIO cipher context. The retrieved context can be used in conjunction 42 with the standard cipher routines to set it up. This is useful when 57 be achieved by preceding the cipher BIO with a buffering BIO. 61 BIO_f_cipher() returns the cipher BIO method.
|
| HD | EVP_OpenInit.pod | 24 EVP_OpenInit() initializes a cipher context B<ctx> for decryption 25 with cipher B<type>. It decrypts the encrypted symmetric key of length 38 and (after setting any cipher parameters) it should be called again 41 If the cipher passed in the B<type> parameter is a variable length 42 cipher then the key length will be set to the value of the recovered 43 key length. If the cipher is a fixed length cipher then the recovered 44 key length must match the fixed cipher length.
|
| /NextBSD/contrib/wpa/src/common/ |
| HD | wpa_common.c | 144 struct wpa_ptk *ptk, int akmp, int cipher) in wpa_pmk_to_ptk() argument 170 ptk->tk_len = wpa_cipher_key_len(cipher); in wpa_pmk_to_ptk() 501 int wpa_cipher_valid_group(int cipher) in wpa_cipher_valid_group() argument 503 return wpa_cipher_valid_pairwise(cipher) || in wpa_cipher_valid_group() 504 cipher == WPA_CIPHER_GTK_NOT_USED; in wpa_cipher_valid_group() 509 int wpa_cipher_valid_mgmt_group(int cipher) in wpa_cipher_valid_mgmt_group() argument 511 return cipher == WPA_CIPHER_AES_128_CMAC || in wpa_cipher_valid_mgmt_group() 512 cipher == WPA_CIPHER_BIP_GMAC_128 || in wpa_cipher_valid_mgmt_group() 513 cipher == WPA_CIPHER_BIP_GMAC_256 || in wpa_cipher_valid_mgmt_group() 514 cipher == WPA_CIPHER_BIP_CMAC_256; in wpa_cipher_valid_mgmt_group() [all …]
|
| /NextBSD/contrib/apr-util/crypto/ |
| HD | apr_crypto_openssl.c | 56 const EVP_CIPHER * cipher; member 382 key->cipher = EVP_des_ede3_cbc(); in crypto_passphrase() 385 key->cipher = EVP_des_ede3_ecb(); in crypto_passphrase() 392 key->cipher = EVP_aes_128_cbc(); in crypto_passphrase() 395 key->cipher = EVP_aes_128_ecb(); in crypto_passphrase() 402 key->cipher = EVP_aes_192_cbc(); in crypto_passphrase() 405 key->cipher = EVP_aes_192_ecb(); in crypto_passphrase() 412 key->cipher = EVP_aes_256_cbc(); in crypto_passphrase() 415 key->cipher = EVP_aes_256_ecb(); in crypto_passphrase() 427 key->keyLen = EVP_CIPHER_key_length(key->cipher); in crypto_passphrase() [all …]
|
| /NextBSD/sys/opencrypto/ |
| HD | 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()
|
| /NextBSD/contrib/file/magic/Magdir/ |
| HD | gnu | 43 >>2 leshort 0x0204 GPG symmetrically encrypted data (3DES cipher) 44 >>2 leshort 0x0304 GPG symmetrically encrypted data (CAST5 cipher) 45 >>2 leshort 0x0404 GPG symmetrically encrypted data (BLOWFISH cipher) 46 >>2 leshort 0x0704 GPG symmetrically encrypted data (AES cipher) 47 >>2 leshort 0x0804 GPG symmetrically encrypted data (AES192 cipher) 48 >>2 leshort 0x0904 GPG symmetrically encrypted data (AES256 cipher) 49 >>2 leshort 0x0a04 GPG symmetrically encrypted data (TWOFISH cipher) 50 >>2 leshort 0x0b04 GPG symmetrically encrypted data (CAMELLIA128 cipher) 51 >>2 leshort 0x0c04 GPG symmetrically encrypted data (CAMELLIA192 cipher) 52 >>2 leshort 0x0d04 GPG symmetrically encrypted data (CAMELLIA256 cipher)
|
| /NextBSD/sys/net80211/ |
| HD | ieee80211_crypto.c | 230 ieee80211_crypto_available(u_int cipher) in ieee80211_crypto_available() argument 232 return cipher < IEEE80211_CIPHER_MAX && ciphers[cipher] != NULL; in ieee80211_crypto_available() 263 int cipher, int flags, struct ieee80211_key *key) in ieee80211_crypto_newkey() argument 273 __func__, cipher, flags, key->wk_keyix); in ieee80211_crypto_newkey() 278 if (cipher >= IEEE80211_CIPHER_MAX) { in ieee80211_crypto_newkey() 280 "%s: invalid cipher %u\n", __func__, cipher); in ieee80211_crypto_newkey() 284 cip = ciphers[cipher]; in ieee80211_crypto_newkey() 294 __func__, cipher, cipher_modnames[cipher]); in ieee80211_crypto_newkey() 295 ieee80211_load_module(cipher_modnames[cipher]); in ieee80211_crypto_newkey() 301 cip = ciphers[cipher]; in ieee80211_crypto_newkey() [all …]
|
| /NextBSD/crypto/openssl/crypto/cms/ |
| HD | cms_enc.c | 84 enc = ec->cipher ? 1 : 0; in DECLARE_ASN1_ITEM() 95 ciph = ec->cipher; in DECLARE_ASN1_ITEM() 100 ec->cipher = NULL; in DECLARE_ASN1_ITEM() 214 const EVP_CIPHER *cipher, in cms_EncryptedContent_init() argument 217 ec->cipher = cipher; in cms_EncryptedContent_init() 225 if (cipher) in cms_EncryptedContent_init() 257 if (enc->encryptedContentInfo->cipher && enc->unprotectedAttrs) in cms_EncryptedData_init_bio()
|