Home
last modified time | relevance | path

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

1234567

/onnv-gate/usr/src/common/openssl/crypto/evp/
H A Devp_enc.c78 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, in EVP_CipherInit() argument
81 if (cipher) in EVP_CipherInit()
83 return EVP_CipherInit_ex(ctx,cipher,NULL,key,iv,enc); in EVP_CipherInit()
86 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, in EVP_CipherInit_ex() argument
102 if (ctx->engine && ctx->cipher && (!cipher || in EVP_CipherInit_ex()
103 (cipher && (cipher->nid == ctx->cipher->nid)))) in EVP_CipherInit_ex()
106 if (cipher) in EVP_CipherInit_ex()
126 impl = ENGINE_get_cipher_engine(cipher->nid); in EVP_CipherInit_ex()
130 const EVP_CIPHER *c = ENGINE_get_cipher(impl, cipher->nid); in EVP_CipherInit_ex()
141 cipher = c; in EVP_CipherInit_ex()
[all …]
H A Devp_test.c244 static int test_cipher(const char *cipher,const unsigned char *key,int kn, in test_cipher() argument
252 c=EVP_get_cipherbyname(cipher); in test_cipher()
368 char *cipher; in main() local
378 cipher=sstrsep(&p,":"); in main()
396 if(!test_cipher(cipher,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec) in main()
397 && !test_digest(cipher,plaintext,pn,ciphertext,cn)) in main()
400 if (strstr(cipher, "AES") == cipher) in main()
402 fprintf(stdout, "Cipher disabled, skipping %s\n", cipher); in main()
407 if (strstr(cipher, "DES") == cipher) in main()
409 fprintf(stdout, "Cipher disabled, skipping %s\n", cipher); in main()
[all …]
H A Dbio_enc.c83 EVP_CIPHER_CTX cipher; member
114 EVP_CIPHER_CTX_init(&ctx->cipher); in enc_new()
134 EVP_CIPHER_CTX_cleanup(&(b->cipher)); in enc_free()
187 i=EVP_CipherFinal_ex(&(ctx->cipher), in enc_read()
201 EVP_CipherUpdate(&(ctx->cipher), in enc_read()
260 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()
335 ret=EVP_CipherFinal_ex(&(ctx->cipher), in enc_ctrl()
358 (*c_ctx)= &(ctx->cipher); in enc_ctrl()
[all …]
H A Dp5_crpt.c104 ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, in PKCS5_PBE_keyivgen() argument
149 OPENSSL_assert(EVP_CIPHER_key_length(cipher) <= (int)sizeof(md_tmp)); in PKCS5_PBE_keyivgen()
150 memcpy(key, md_tmp, EVP_CIPHER_key_length(cipher)); in PKCS5_PBE_keyivgen()
151 OPENSSL_assert(EVP_CIPHER_iv_length(cipher) <= 16); in PKCS5_PBE_keyivgen()
152 memcpy(iv, md_tmp + (16 - EVP_CIPHER_iv_length(cipher)), in PKCS5_PBE_keyivgen()
153 EVP_CIPHER_iv_length(cipher)); in PKCS5_PBE_keyivgen()
154 EVP_CipherInit_ex(cctx, cipher, NULL, key, iv, en_de); in PKCS5_PBE_keyivgen()
H A Devp_pbe.c72 const EVP_CIPHER *cipher; member
98 i = (*pbetmp->keygen)(ctx, pass, passlen, param, pbetmp->cipher, in EVP_PBE_CipherInit()
116 int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md, in EVP_PBE_alg_add() argument
126 pbe_tmp->cipher = cipher; in EVP_PBE_alg_add()
/onnv-gate/usr/src/common/openssl/doc/apps/
H A Dciphers.pod5 ciphers - SSL cipher display and cipher list tool.
18 The B<cipherlist> command converts OpenSSL cipher lists into ordered
19 SSL cipher preference lists. It can be used as a test tool to determine
31 restrictions and whether the algorithm is classed as an "export" cipher.
33 in a cipher list; this is when similar ciphers are available for
54 a cipher list to convert to a cipher preference list. If it is not included
55 then the default cipher list will be used. The format is described below.
61 The cipher list consists of one or more I<cipher strings> separated by colons.
64 The actual cipher string can take several different forms.
66 It can consist of a single cipher suite such as B<RC4-SHA>.
[all …]
/onnv-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/
H A Denc_helper.c30 …text, const krb5_keyblock *key, krb5_keyusage usage, const krb5_data *plain, krb5_enc_data *cipher) in krb5_encrypt_helper() argument
39 cipher->ciphertext.length = enclen; in krb5_encrypt_helper()
42 if ((cipher->ciphertext.data = (char *) malloc(enclen)) == NULL) { in krb5_encrypt_helper()
43 cipher->ciphertext.length = 0; in krb5_encrypt_helper()
46 ret = krb5_c_encrypt(context, key, usage, 0, plain, cipher); in krb5_encrypt_helper()
48 free(cipher->ciphertext.data); in krb5_encrypt_helper()
49 cipher->ciphertext.data = NULL; in krb5_encrypt_helper()
/onnv-gate/usr/src/cmd/ssh/libssh/common/
H A Dcipher.c195 cipher_init(CipherContext *cc, Cipher *cipher, in cipher_init() argument
204 if (cipher->number == SSH_CIPHER_DES) { in cipher_init()
213 cc->plaintext = (cipher->number == SSH_CIPHER_NONE); in cipher_init()
215 if (keylen < cipher->key_len) in cipher_init()
217 keylen, cipher->name); in cipher_init()
218 if (iv != NULL && ivlen < cipher->block_size) in cipher_init()
220 ivlen, cipher->name); in cipher_init()
221 cc->cipher = cipher; in cipher_init()
223 type = (*cipher->evptype)(); in cipher_init()
235 cipher->name); in cipher_init()
[all …]
/onnv-gate/usr/src/common/openssl/crypto/asn1/
H A Dx_pkey.c82 ret->cipher.cipher=EVP_get_cipherbyname( in d2i_X509_PKEY()
84 if (ret->cipher.cipher == NULL) in d2i_X509_PKEY()
99 memcpy(ret->cipher.iv, in d2i_X509_PKEY()
103 memset(ret->cipher.iv,0,EVP_MAX_IV_LENGTH); in d2i_X509_PKEY()
120 ret->cipher.cipher=NULL; in X509_PKEY_new()
121 memset(ret->cipher.iv,0,EVP_MAX_IV_LENGTH); in X509_PKEY_new()
H A Dp5_pbev2.c87 X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
99 alg_nid = EVP_CIPHER_type(cipher);
116 if (EVP_CIPHER_iv_length(cipher) &&
117 RAND_pseudo_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0)
123 EVP_CipherInit_ex(&ctx, cipher, NULL, NULL, iv, 0);
154 EVP_CIPHER_key_length(cipher))) goto merr;
/onnv-gate/usr/src/uts/common/des/
H A Ddes_soft.c328 #define cipher(iter, inR, inL, outR, outL) { \ in des_encrypt() macro
342 cipher(0, r0, l0, r1, l1); in des_encrypt()
343 cipher(1, r1, l1, r0, l0); in des_encrypt()
344 cipher(2, r0, l0, r1, l1); in des_encrypt()
345 cipher(3, r1, l1, r0, l0); in des_encrypt()
346 cipher(4, r0, l0, r1, l1); in des_encrypt()
347 cipher(5, r1, l1, r0, l0); in des_encrypt()
348 cipher(6, r0, l0, r1, l1); in des_encrypt()
349 cipher(7, r1, l1, r0, l0); in des_encrypt()
350 cipher(8, r0, l0, r1, l1); in des_encrypt()
[all …]
/onnv-gate/usr/src/lib/libcrypt/common/
H A Ddes_soft.c368 #define cipher(iter, inR, inL, outR, outL) { \ in des_encrypt() macro
382 cipher(0, r0, l0, r1, l1); in des_encrypt()
383 cipher(1, r1, l1, r0, l0); in des_encrypt()
384 cipher(2, r0, l0, r1, l1); in des_encrypt()
385 cipher(3, r1, l1, r0, l0); in des_encrypt()
386 cipher(4, r0, l0, r1, l1); in des_encrypt()
387 cipher(5, r1, l1, r0, l0); in des_encrypt()
388 cipher(6, r0, l0, r1, l1); in des_encrypt()
389 cipher(7, r1, l1, r0, l0); in des_encrypt()
390 cipher(8, r0, l0, r1, l1); in des_encrypt()
[all …]
/onnv-gate/usr/src/lib/libnsl/des/
H A Ddes_soft.c403 #define cipher(iter, inR, inL, outR, outL) { \ in __des_encrypt() macro
417 cipher(0, r0, l0, r1, l1); in __des_encrypt()
418 cipher(1, r1, l1, r0, l0); in __des_encrypt()
419 cipher(2, r0, l0, r1, l1); in __des_encrypt()
420 cipher(3, r1, l1, r0, l0); in __des_encrypt()
421 cipher(4, r0, l0, r1, l1); in __des_encrypt()
422 cipher(5, r1, l1, r0, l0); in __des_encrypt()
423 cipher(6, r0, l0, r1, l1); in __des_encrypt()
424 cipher(7, r1, l1, r0, l0); in __des_encrypt()
425 cipher(8, r0, l0, r1, l1); in __des_encrypt()
[all …]
/onnv-gate/usr/src/cmd/lofiadm/
H A Dmain.c366 mech_alias_t *cipher, const char *rkey, size_t rksz) in add_mapping() argument
371 if (cipher != NULL) { in add_mapping()
374 (void) strlcpy(li.li_cipher, cipher->name, in add_mapping()
382 li.li_iv_type = cipher->iv_type; in add_mapping()
383 li.li_iv_len = cipher->iv_len; /* 0 when no iv needed */ in add_mapping()
384 switch (cipher->iv_type) { in add_mapping()
386 (void) strlcpy(li.li_iv_cipher, cipher->iv_name, in add_mapping()
558 kernel_cipher_check(mech_alias_t *cipher) in kernel_cipher_check() argument
571 if (cipher->iv_name == NULL) in kernel_cipher_check()
627 strcasecmp(cipher->name, kciphers->ml_list[i]) == 0) in kernel_cipher_check()
[all …]
/onnv-gate/usr/src/common/openssl/doc/ssl/
H A DSSL_CIPHER_get_name.pod11 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(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.
26 SSL_CIPHER_get_version() returns the protocol version for B<cipher>, currently
27 "SSLv2", "SSLv3", or "TLSv1". If B<cipher> is NULL, "(NONE)" is returned.
29 SSL_CIPHER_description() returns a textual description of the cipher used
[all …]
/onnv-gate/usr/src/common/openssl/doc/crypto/
H A DEVP_EncryptInit.pod19 EVP_CIPHER_CTX_set_padding - EVP cipher routines
80 #define EVP_CIPHER_CTX_cipher(e) ((e)->cipher)
81 #define EVP_CIPHER_CTX_nid(e) ((e)->cipher->nid)
82 #define EVP_CIPHER_CTX_block_size(e) ((e)->cipher->block_size)
84 #define EVP_CIPHER_CTX_iv_length(e) ((e)->cipher->iv_len)
88 #define EVP_CIPHER_CTX_flags(e) ((e)->cipher->flags)
89 #define EVP_CIPHER_CTX_mode(e) ((e)->cipher->flags & EVP_CIPH_MODE)
96 The EVP cipher routines are a high level interface to certain
99 EVP_CIPHER_CTX_init() initializes cipher contex B<ctx>.
101 EVP_EncryptInit_ex() sets up cipher context B<ctx> for encryption
[all …]
H A DBIO_f_cipher.pod5 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.
H A DEVP_OpenInit.pod24 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.
/onnv-gate/usr/src/uts/common/io/net80211/
H A Dnet80211_crypto.c129 ieee80211_crypto_newkey(ieee80211com_t *ic, int cipher, int flags, in ieee80211_crypto_newkey() argument
140 if (cipher >= IEEE80211_CIPHER_MAX) { in ieee80211_crypto_newkey()
142 "invalid cipher %u\n", cipher); in ieee80211_crypto_newkey()
145 cip = ic->ic_ciphers[cipher]; in ieee80211_crypto_newkey()
150 cipher, cipher < IEEE80211_N(cipher_modnames) ? in ieee80211_crypto_newkey()
151 cipher_modnames[cipher] : "<unknown>"); in ieee80211_crypto_newkey()
161 if ((ic->ic_caps & (1<<cipher)) == 0) { in ieee80211_crypto_newkey()
172 if (cipher == IEEE80211_CIPHER_TKIP && in ieee80211_crypto_newkey()
235 if (cipher == IEEE80211_CIPHER_TKIP) in ieee80211_crypto_newkey()
360 uint32_t cipher; in ieee80211_crypto_getciphertype() local
[all …]
/onnv-gate/usr/src/common/openssl/crypto/engine/
H A Deng_cryptodev.c78 static int cryptodev_max_iv(int cipher);
79 static int cryptodev_key_length_valid(int cipher, int len);
90 static int cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
210 cryptodev_max_iv(int cipher) in cryptodev_max_iv() argument
215 if (ciphers[i].id == cipher) in cryptodev_max_iv()
227 cryptodev_key_length_valid(int cipher, int len) in cryptodev_key_length_valid() argument
232 if (ciphers[i].id == cipher) in cryptodev_key_length_valid()
272 sess.cipher = ciphers[i].id; in get_cryptodev_ciphers()
310 sess.cipher = 0; in get_cryptodev_digests()
384 if ((inl % ctx->cipher->block_size) != 0) in cryptodev_cipher()
[all …]
/onnv-gate/usr/src/common/net/wanboot/crypt/
H A Daes_test.c48 char cipher[AES_BLOCK_SIZE * 2]; member
71 unsigned char cipher[AES_BLOCK_SIZE]; in aestest() local
93 getxdata(cipher, td[i].cipher, AES_BLOCK_SIZE); in aestest()
98 if (bcmp(work, cipher, AES_BLOCK_SIZE) != 0) { in aestest()
/onnv-gate/usr/src/common/openssl/apps/
H A Denc.c120 const EVP_CIPHER *cipher=NULL,*c; in MAIN() local
145 cipher=EVP_get_cipherbyname(pname); in MAIN()
146 if (!base64 && (cipher == NULL) && (strcmp(pname,"enc") != 0)) in MAIN()
267 cipher=c; in MAIN()
270 cipher=NULL; in MAIN()
391 if ((str == NULL) && (cipher != NULL) && (hkey == NULL)) in MAIN()
398 OBJ_nid2ln(EVP_CIPHER_nid(cipher)), in MAIN()
460 if (cipher != NULL) in MAIN()
507 EVP_BytesToKey(cipher,dgst,sptr, in MAIN()
546 if (!EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, enc)) in MAIN()
[all …]
/onnv-gate/usr/src/lib/krb5/kdb/
H A Ddecrypt_key.c81 krb5_enc_data cipher; in krb5_dbekd_decrypt_key_data() local
90 cipher.enctype = ENCTYPE_UNKNOWN; in krb5_dbekd_decrypt_key_data()
91 cipher.ciphertext.length = key_data->key_data_length[0]-2; in krb5_dbekd_decrypt_key_data()
92 cipher.ciphertext.data = (char *)ptr; /* SUNWresync121 XXX */ in krb5_dbekd_decrypt_key_data()
99 &cipher, &plain))) { in krb5_dbekd_decrypt_key_data()
/onnv-gate/usr/src/lib/krb5/kadm5/srv/
H A Dchgpwd.c60 krb5_data cipher, clear; in process_chpw_request() local
81 cipher.length = 0; in process_chpw_request()
82 cipher.data = NULL; in process_chpw_request()
333 cipher.length = (req->data + req->length) - ptr; in process_chpw_request()
334 cipher.data = ptr; in process_chpw_request()
336 if (ret = krb5_rd_priv(context, auth_context, &cipher, in process_chpw_request()
431 cipher.length = 0; in process_chpw_request()
442 &cipher, &replay)) { in process_chpw_request()
455 if (cipher.length == 0) { in process_chpw_request()
492 ret = krb5_mk_error(context, &krberror, &cipher); in process_chpw_request()
[all …]
/onnv-gate/usr/src/common/openssl/crypto/pkcs7/
H A Denc.c77 const EVP_CIPHER *cipher=NULL; local
91 if(!(cipher = EVP_get_cipherbyname(argv[2]))) {
130 if(!cipher) {
132 cipher = EVP_des_ede3_cbc();
139 if (!PKCS7_set_cipher(p7,cipher)) goto err;

1234567