/freebsd/crypto/openssl/crypto/evp/ |
H A D | cmeth_lib.c | 25 EVP_CIPHER *cipher = evp_cipher_new(); in EVP_CIPHER_meth_new() local 27 if (cipher != NULL) { in EVP_CIPHER_meth_new() 28 cipher->nid = cipher_type; in EVP_CIPHER_meth_new() 29 cipher->block_size = block_size; in EVP_CIPHER_meth_new() 30 cipher->key_len = key_len; in EVP_CIPHER_meth_new() 31 cipher->origin = EVP_ORIG_METH; in EVP_CIPHER_meth_new() 33 return cipher; in EVP_CIPHER_meth_new() 36 EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher) in EVP_CIPHER_meth_dup() argument 44 if (cipher->prov != NULL) in EVP_CIPHER_meth_dup() 47 if ((to = EVP_CIPHER_meth_new(cipher->nid, cipher->block_size, in EVP_CIPHER_meth_dup() [all …]
|
H A D | evp_enc.c | 35 if (ctx->cipher == NULL || ctx->cipher->prov == NULL) in EVP_CIPHER_CTX_reset() 39 if (ctx->cipher->freectx != NULL) in EVP_CIPHER_CTX_reset() 40 ctx->cipher->freectx(ctx->algctx); in EVP_CIPHER_CTX_reset() 53 if (ctx->cipher != NULL) { in EVP_CIPHER_CTX_reset() 54 if (ctx->cipher->cleanup && !ctx->cipher->cleanup(ctx)) in EVP_CIPHER_CTX_reset() 57 if (ctx->cipher_data && ctx->cipher->ctx_size) in EVP_CIPHER_CTX_reset() 58 OPENSSL_cleanse(ctx->cipher_data, ctx->cipher->ctx_size); in EVP_CIPHER_CTX_reset() 83 const EVP_CIPHER *cipher, in evp_cipher_init_internal() argument 108 if (cipher == NULL && ctx->cipher == NULL) { in evp_cipher_init_internal() 122 if (ctx->engine && ctx->cipher in evp_cipher_init_internal() [all …]
|
H A D | asymcipher.c | 25 EVP_ASYM_CIPHER *cipher = NULL; in evp_pkey_asym_cipher_init() local 93 EVP_ASYM_CIPHER_free(cipher); in evp_pkey_asym_cipher_init() 98 cipher = EVP_ASYM_CIPHER_fetch(ctx->libctx, supported_ciph, in evp_pkey_asym_cipher_init() 100 if (cipher != NULL) in evp_pkey_asym_cipher_init() 101 tmp_prov = EVP_ASYM_CIPHER_get0_provider(cipher); in evp_pkey_asym_cipher_init() 105 cipher = in evp_pkey_asym_cipher_init() 108 if (cipher == NULL) in evp_pkey_asym_cipher_init() 112 if (cipher == NULL) in evp_pkey_asym_cipher_init() 136 EVP_ASYM_CIPHER_free(cipher); in evp_pkey_asym_cipher_init() 144 ctx->op.ciph.cipher = cipher; in evp_pkey_asym_cipher_init() [all …]
|
H A D | evp_lib.c | 84 const EVP_CIPHER *cipher = c->cipher; in evp_cipher_param_to_asn1_ex() local 102 if (cipher->set_asn1_parameters != NULL) { in evp_cipher_param_to_asn1_ex() 103 ret = cipher->set_asn1_parameters(c, type); in evp_cipher_param_to_asn1_ex() 104 } else if ((EVP_CIPHER_get_flags(cipher) & EVP_CIPH_FLAG_CUSTOM_ASN1) == 0) { in evp_cipher_param_to_asn1_ex() 105 switch (EVP_CIPHER_get_mode(cipher)) { in evp_cipher_param_to_asn1_ex() 107 if (EVP_CIPHER_is_a(cipher, SN_id_smime_alg_CMS3DESwrap)) in evp_cipher_param_to_asn1_ex() 125 } else if (cipher->prov != NULL) { in evp_cipher_param_to_asn1_ex() 175 const EVP_CIPHER *cipher = c->cipher; in evp_cipher_asn1_to_param_ex() local 193 if (cipher->get_asn1_parameters != NULL) { in evp_cipher_asn1_to_param_ex() 194 ret = cipher->get_asn1_parameters(c, type); in evp_cipher_asn1_to_param_ex() [all …]
|
/freebsd/crypto/openssl/test/ssl-tests/ |
H A D | 25-cipher.cnf | 5 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 …]
|
/freebsd/crypto/openssl/test/recipes/30-test_evp_data/ |
H A D | evpkdf_krb5.txt | 18 Ctrl.cipher = cipher:DES-EDE3-CBC 24 Ctrl.cipher = cipher:DES-EDE3-CBC 30 Ctrl.cipher = cipher:DES-EDE3-CBC 36 Ctrl.cipher = cipher:DES-EDE3-CBC 42 Ctrl.cipher = cipher:DES-EDE3-CBC 48 Ctrl.cipher = cipher:DES-EDE3-CBC 54 Ctrl.cipher = cipher:DES-EDE3-CBC 60 Ctrl.cipher = cipher:DES-EDE3-CBC 66 Ctrl.cipher = cipher:DES-EDE3-CBC 73 Ctrl.cipher = cipher:DES-EDE3-CBC [all …]
|
/freebsd/sys/crypto/rijndael/ |
H A D | rijndael-api-fst.c | 67 int rijndael_cipherInit(cipherInstance *cipher, BYTE mode, char *IV) { in rijndael_cipherInit() argument 69 cipher->mode = mode; in rijndael_cipherInit() 74 memcpy(cipher->IV, IV, RIJNDAEL_MAX_IV_SIZE); in rijndael_cipherInit() 76 memset(cipher->IV, 0, RIJNDAEL_MAX_IV_SIZE); in rijndael_cipherInit() 81 int rijndael_blockEncrypt(cipherInstance *cipher, keyInstance *key, in rijndael_blockEncrypt() argument 86 if (cipher == NULL || in rijndael_blockEncrypt() 97 switch (cipher->mode) { in rijndael_blockEncrypt() 108 memcpy(block, cipher->IV, 16); in rijndael_blockEncrypt() 115 ((uint32_t*)block)[0] = ((uint32_t*)cipher->IV)[0] ^ ((uint32_t*)input)[0]; in rijndael_blockEncrypt() 116 ((uint32_t*)block)[1] = ((uint32_t*)cipher->IV)[1] ^ ((uint32_t*)input)[1]; in rijndael_blockEncrypt() [all …]
|
/freebsd/crypto/openssl/doc/man3/ |
H A D | EVP_CIPHER_meth_new.pod | 25 EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher); 26 void EVP_CIPHER_meth_free(EVP_CIPHER *cipher); 28 int EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len); 29 int EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags); 30 int EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size); 31 int EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher, 36 int EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher, 41 int EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher, 43 int EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher, 46 int EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher, [all …]
|
H A 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 const 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> [all...] |
H A D | EVP_ASYM_CIPHER_free.pod | 18 void EVP_ASYM_CIPHER_free(EVP_ASYM_CIPHER *cipher); 19 int EVP_ASYM_CIPHER_up_ref(EVP_ASYM_CIPHER *cipher); 20 const char *EVP_ASYM_CIPHER_get0_name(const EVP_ASYM_CIPHER *cipher); 21 int EVP_ASYM_CIPHER_is_a(const EVP_ASYM_CIPHER *cipher, const char *name); 22 OSSL_PROVIDER *EVP_ASYM_CIPHER_get0_provider(const EVP_ASYM_CIPHER *cipher); 24 void (*fn)(EVP_ASYM_CIPHER *cipher, 27 int EVP_ASYM_CIPHER_names_do_all(const EVP_ASYM_CIPHER *cipher, 30 const char *EVP_ASYM_CIPHER_get0_description(const EVP_ASYM_CIPHER *cipher); 40 asymmetric cipher related tasks such as asymmetric encryption and decryption. 53 EVP_ASYM_CIPHER_is_a() returns 1 if I<cipher> is an implementation of an [all …]
|
/freebsd/crypto/openssh/ |
H A 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/crypto/openssl/crypto/engine/ |
H A D | eng_openssl.c | 67 static int openssl_ciphers(ENGINE *e, const EVP_CIPHER **cipher, 234 EVP_CIPHER *cipher; in test_r4_cipher() local 236 if ((cipher = EVP_CIPHER_meth_new(NID_rc4, 1, TEST_RC4_KEY_SIZE)) == NULL in test_r4_cipher() 237 || !EVP_CIPHER_meth_set_iv_length(cipher, 0) in test_r4_cipher() 238 || !EVP_CIPHER_meth_set_flags(cipher, EVP_CIPH_VARIABLE_LENGTH) in test_r4_cipher() 239 || !EVP_CIPHER_meth_set_init(cipher, test_rc4_init_key) in test_r4_cipher() 240 || !EVP_CIPHER_meth_set_do_cipher(cipher, test_rc4_cipher) in test_r4_cipher() 241 || !EVP_CIPHER_meth_set_impl_ctx_size(cipher, sizeof(TEST_RC4_KEY))) { in test_r4_cipher() 242 EVP_CIPHER_meth_free(cipher); in test_r4_cipher() 243 cipher = NULL; in test_r4_cipher() [all …]
|
/freebsd/crypto/openssl/crypto/cms/ |
H A D | cms_enc.c | 31 const EVP_CIPHER *cipher = NULL; in ossl_cms_EncryptedContent_init_bio() local 44 enc = ec->cipher ? 1 : 0; in ossl_cms_EncryptedContent_init_bio() 56 cipher = ec->cipher; in ossl_cms_EncryptedContent_init_bio() 61 ec->cipher = NULL; in ossl_cms_EncryptedContent_init_bio() 63 cipher = EVP_get_cipherbyobj(calg->algorithm); in ossl_cms_EncryptedContent_init_bio() 65 if (cipher != NULL) { in ossl_cms_EncryptedContent_init_bio() 66 fetched_ciph = EVP_CIPHER_fetch(libctx, EVP_CIPHER_get0_name(cipher), in ossl_cms_EncryptedContent_init_bio() 69 cipher = fetched_ciph; in ossl_cms_EncryptedContent_init_bio() 71 if (cipher == NULL) { in ossl_cms_EncryptedContent_init_bio() 78 if (EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, enc) <= 0) { in ossl_cms_EncryptedContent_init_bio() [all …]
|
/freebsd/crypto/openssl/providers/implementations/keymgmt/ |
H A D | mac_legacy_kmgmt.c | 61 PROV_CIPHER cipher; member 100 ossl_prov_cipher_reset(&mackey->cipher); in ossl_mac_key_free() 170 || (key1->cipher.cipher == NULL && key2->cipher.cipher != NULL) in mac_match() 171 || (key1->cipher.cipher != NULL && key2->cipher.cipher == NULL)) in mac_match() 177 if (key1->cipher.cipher != NULL) in mac_match() 178 ok = ok && EVP_CIPHER_is_a(key1->cipher.cipher, in mac_match() 179 EVP_CIPHER_get0_name(key2->cipher.cipher)); in mac_match() 219 if (key->cmac && !ossl_prov_cipher_load_from_params(&key->cipher, params, in mac_key_fromdata() 256 if (key->cipher.cipher != NULL in key_to_params() 259 EVP_CIPHER_get0_name(key->cipher.cipher))) in key_to_params() [all …]
|
/freebsd/sys/crypto/openssl/ |
H A D | ossl.c | 252 struct ossl_cipher *cipher; in ossl_newsession_cipher() local 255 cipher = ossl_lookup_cipher(csp); in ossl_newsession_cipher() 256 if (cipher == NULL) in ossl_newsession_cipher() 259 s->cipher.cipher = cipher; in ossl_newsession_cipher() 265 if (cipher->set_encrypt_key != NULL) { in ossl_newsession_cipher() 266 error = cipher->set_encrypt_key(csp->csp_cipher_key, in ossl_newsession_cipher() 267 8 * csp->csp_cipher_klen, &s->cipher.enc_ctx); in ossl_newsession_cipher() 273 if (cipher in ossl_newsession_cipher() [all...] |
/freebsd/crypto/openssl/test/ |
H A D | afalgtest.c | 31 const EVP_CIPHER *cipher; in test_afalg_aes_cbc() local 68 cipher = EVP_aes_128_cbc(); in test_afalg_aes_cbc() 72 cipher = EVP_aes_192_cbc(); in test_afalg_aes_cbc() 76 cipher = EVP_aes_256_cbc(); in test_afalg_aes_cbc() 80 cipher = NULL; in test_afalg_aes_cbc() 85 if (!TEST_true(EVP_CipherInit_ex(ctx, cipher, e, key, iv, 1)) in test_afalg_aes_cbc() 95 || !TEST_true(EVP_CipherInit_ex(ctx, cipher, e, key, iv, 0)) in test_afalg_aes_cbc() 115 const EVP_CIPHER * cipher; in test_pr16743() local 120 cipher = ENGINE_get_cipher(e, NID_aes_128_cbc); in test_pr16743() 122 if (cipher != NULL && ctx != NULL) in test_pr16743() [all …]
|
/freebsd/crypto/openssl/providers/implementations/kdfs/ |
H A D | krb5kdf.c | 45 static int KRB5KDF(const EVP_CIPHER *cipher, ENGINE *engine, 52 PROV_CIPHER cipher; member 89 ossl_prov_cipher_reset(&ctx->cipher); in krb5kdf_reset() 109 const EVP_CIPHER *cipher; in krb5kdf_derive() local 115 cipher = ossl_prov_cipher_cipher(&ctx->cipher); in krb5kdf_derive() 116 if (cipher == NULL) { in krb5kdf_derive() 128 engine = ossl_prov_cipher_engine(&ctx->cipher); in krb5kdf_derive() 129 return KRB5KDF(cipher, engine, ctx->key, ctx->key_len, in krb5kdf_derive() 143 if (!ossl_prov_cipher_load_from_params(&ctx->cipher, params, provctx)) in krb5kdf_set_ctx_params() 174 const EVP_CIPHER *cipher; in krb5kdf_get_ctx_params() local [all …]
|
/freebsd/crypto/openssl/doc/man1/ |
H A D | openssl-ciphers.pod.in | 6 openssl-ciphers - SSL cipher display and cipher list command 31 This command converts textual OpenSSL cipher lists into 32 ordered SSL cipher preference lists. It can be used to 48 minimum and maximum protocol version. This is closer to the actual cipher list 64 When combined with B<-s> includes cipher suites which require PSK. 68 When combined with B<-s> includes cipher suites which require SRP. This option 73 Verbose output: For each cipher suite, list details as provided by 78 Like B<-v>, but include the official cipher suite values in hex. 89 Precede each cipher suite by its standard name. 93 Convert a standard cipher I<name> to its OpenSSL name. [all …]
|
/freebsd/contrib/wpa/src/common/ |
H A D | ptksa_cache.c | 138 const u8 *addr, u32 cipher) in ptksa_cache_get() argument 147 (cipher == WPA_CIPHER_NONE || cipher == e->cipher)) in ptksa_cache_get() 191 wpa_cipher_txt(e->cipher), in ptksa_cache_list() 233 void ptksa_cache_flush(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher) in ptksa_cache_flush() argument 244 (cipher == WPA_CIPHER_NONE || cipher == e->cipher)) { in ptksa_cache_flush() 278 const u8 *addr, u32 cipher, in ptksa_cache_add() argument 289 if (!ptksa || !ptk || !addr || !life_time || cipher == WPA_CIPHER_NONE) in ptksa_cache_add() 293 ptksa_cache_flush(ptksa, addr, cipher); in ptksa_cache_add() 305 entry->cipher = cipher; in ptksa_cache_add() 340 MAC2STR(addr), cipher); in ptksa_cache_add() [all …]
|
/freebsd/lib/libutil/ |
H A D | login_crypt.c | 38 const char *cipher; in login_setcryptfmt() local 40 cipher = login_getcapstr(lc, "passwd_format", def, NULL); in login_setcryptfmt() 43 "passwd_format = %s\n", cipher); in login_setcryptfmt() 44 if (cipher == NULL) in login_setcryptfmt() 46 if (!crypt_set_format(cipher)) in login_setcryptfmt() 48 return (cipher); in login_setcryptfmt()
|
/freebsd/tools/tools/crypto/ |
H A D | cryptocheck.c | 166 int cipher; member 212 { .name = "aes-cbc128", .cipher = CRYPTO_AES_CBC, .type = T_CIPHER, 214 { .name = "aes-cbc192", .cipher = CRYPTO_AES_CBC, .type = T_CIPHER, 216 { .name = "aes-cbc256", .cipher = CRYPTO_AES_CBC, .type = T_CIPHER, 218 { .name = "aes-ctr128", .cipher = CRYPTO_AES_ICM, .type = T_CIPHER, 220 { .name = "aes-ctr192", .cipher = CRYPTO_AES_ICM, .type = T_CIPHER, 222 { .name = "aes-ctr256", .cipher = CRYPTO_AES_ICM, .type = T_CIPHER, 224 { .name = "aes-xts128", .cipher = CRYPTO_AES_XTS, .type = T_CIPHER, 226 { .name = "aes-xts256", .cipher = CRYPTO_AES_XTS, .type = T_CIPHER, 228 { .name = "camellia-cbc128", .cipher = CRYPTO_CAMELLIA_CBC, [all …]
|
/freebsd/crypto/openssl/apps/ |
H A D | enc.c | 121 EVP_CIPHER *cipher = NULL; in enc_main() local 287 cipher = NULL; in enc_main() 309 if (!opt_cipher(ciphername, &cipher)) in enc_main() 357 if ((str == NULL) && (cipher != NULL) && (hkey == NULL)) { in enc_main() 364 EVP_CIPHER_get0_name(cipher), in enc_main() 432 if (cipher != NULL) { in enc_main() 496 int iklen = EVP_CIPHER_get_key_length(cipher); in enc_main() 497 int ivlen = EVP_CIPHER_get_iv_length(cipher); in enc_main() 512 if (!EVP_BytesToKey(cipher, dgst, sptr, in enc_main() 529 int siz = EVP_CIPHER_get_iv_length(cipher); in enc_main() [all …]
|
/freebsd/crypto/openssl/crypto/pkcs12/ |
H A D | p12_crpt.c | 24 ASN1_TYPE *param, const EVP_CIPHER *cipher, in PKCS12_PBE_keyivgen_ex() argument 34 if (cipher == NULL) in PKCS12_PBE_keyivgen_ex() 52 iter, EVP_CIPHER_get_key_length(cipher), in PKCS12_PBE_keyivgen_ex() 59 if (EVP_CIPHER_get_iv_length(cipher) > 0) { in PKCS12_PBE_keyivgen_ex() 61 iter, EVP_CIPHER_get_iv_length(cipher), in PKCS12_PBE_keyivgen_ex() 72 ret = EVP_CipherInit_ex(ctx, cipher, NULL, key, piv, en_de); in PKCS12_PBE_keyivgen_ex() 79 ASN1_TYPE *param, const EVP_CIPHER *cipher, in PKCS12_PBE_keyivgen() argument 82 return PKCS12_PBE_keyivgen_ex(ctx, pass, passlen, param, cipher, md, en_de, in PKCS12_PBE_keyivgen()
|
/freebsd/tests/sys/geom/class/eli/ |
H A D | conf.sh | 40 for cipher in aes-xts:128 aes-xts:256 \ 43 ealgo=${cipher%%:*} 44 keylen=${cipher##*:} 48 ${func} $cipher $aalgo $secsize 64 for cipher in aes-xts:128 aes-xts:256 \ 67 ealgo=${cipher%%:*} 68 keylen=${cipher##*:} 70 ${func} $cipher $secsize
|
/freebsd/crypto/openssl/demos/cipher/ |
H A D | aeskeywrap.c | 60 EVP_CIPHER *cipher = NULL; in aes_wrap_encrypt() local 75 if ((cipher = EVP_CIPHER_fetch(libctx, "AES-256-WRAP", propq)) == NULL) in aes_wrap_encrypt() 82 if (!EVP_EncryptInit_ex2(ctx, cipher, wrap_key, wrap_iv, /* params */ NULL)) in aes_wrap_encrypt() 108 EVP_CIPHER_free(cipher); in aes_wrap_encrypt() 118 EVP_CIPHER *cipher = NULL; in aes_wrap_decrypt() local 132 if ((cipher = EVP_CIPHER_fetch(libctx, "aes-256-wrap", propq)) == NULL) in aes_wrap_decrypt() 139 if (!EVP_DecryptInit_ex2(ctx, cipher, wrap_key, wrap_iv, /* params */ NULL)) in aes_wrap_decrypt() 165 EVP_CIPHER_free(cipher); in aes_wrap_decrypt()
|