Home
last modified time | relevance | path

Searched refs:ciphertext (Results 1 – 25 of 53) sorted by relevance

123

/titanic_41/usr/src/uts/common/crypto/io/
H A Dblowfish.c337 crypto_data_t *ciphertext, crypto_req_handle_t req) in blowfish_encrypt() argument
354 BLOWFISH_ARG_INPLACE(plaintext, ciphertext); in blowfish_encrypt()
360 if (ciphertext->cd_length < plaintext->cd_length) { in blowfish_encrypt()
361 ciphertext->cd_length = plaintext->cd_length; in blowfish_encrypt()
368 ret = blowfish_encrypt_update(ctx, plaintext, ciphertext, req); in blowfish_encrypt()
378 blowfish_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext, in blowfish_decrypt() argument
390 if ((ciphertext->cd_length & (BLOWFISH_BLOCK_LEN - 1)) != 0) in blowfish_decrypt()
396 BLOWFISH_ARG_INPLACE(ciphertext, plaintext); in blowfish_decrypt()
402 if (plaintext->cd_length < ciphertext->cd_length) { in blowfish_decrypt()
403 plaintext->cd_length = ciphertext->cd_length; in blowfish_decrypt()
[all …]
H A Daes.c406 crypto_data_t *ciphertext, crypto_req_handle_t req) in aes_encrypt() argument
424 AES_ARG_INPLACE(plaintext, ciphertext); in aes_encrypt()
447 if (ciphertext->cd_length < length_needed) { in aes_encrypt()
448 ciphertext->cd_length = length_needed; in aes_encrypt()
452 saved_length = ciphertext->cd_length; in aes_encrypt()
453 saved_offset = ciphertext->cd_offset; in aes_encrypt()
458 ret = aes_encrypt_update(ctx, plaintext, ciphertext, req); in aes_encrypt()
475 ciphertext->cd_offset = ciphertext->cd_length; in aes_encrypt()
476 ciphertext->cd_length = saved_length - ciphertext->cd_length; in aes_encrypt()
477 ret = ccm_encrypt_final((ccm_ctx_t *)aes_ctx, ciphertext, in aes_encrypt()
[all …]
H A Drsa.c524 crypto_data_t *ciphertext, crypto_req_handle_t req) in rsaprov_encrypt() argument
532 RSA_ARG_INPLACE(plaintext, ciphertext); in rsaprov_encrypt()
541 ciphertext); in rsaprov_encrypt()
553 crypto_key_t *key, crypto_data_t *plaintext, crypto_data_t *ciphertext, in rsa_encrypt_atomic() argument
560 RSA_ARG_INPLACE(plaintext, ciphertext); in rsa_encrypt_atomic()
563 ciphertext)); in rsa_encrypt_atomic()
589 crypto_data_t *plaintext, crypto_data_t *ciphertext) in rsa_encrypt_common() argument
618 if (ciphertext->cd_length < modulus_len) { in rsa_encrypt_common()
619 ciphertext->cd_length = modulus_len; in rsa_encrypt_common()
643 ciphertext, modulus_len)) != CRYPTO_SUCCESS) in rsa_encrypt_common()
[all …]
/titanic_41/usr/src/uts/common/des/
H A Ddes_crypt.c530 crypto_data_t *ciphertext, crypto_req_handle_t req) in des_encrypt() argument
547 DES_ARG_INPLACE(plaintext, ciphertext); in des_encrypt()
553 if (ciphertext->cd_length < plaintext->cd_length) { in des_encrypt()
554 ciphertext->cd_length = plaintext->cd_length; in des_encrypt()
561 ret = des_encrypt_update(ctx, plaintext, ciphertext, req); in des_encrypt()
571 des_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext, in des_decrypt() argument
583 if ((ciphertext->cd_length & (DES_BLOCK_LEN - 1)) != 0) in des_decrypt()
589 DES_ARG_INPLACE(ciphertext, plaintext); in des_decrypt()
595 if (plaintext->cd_length < ciphertext->cd_length) { in des_decrypt()
596 plaintext->cd_length = ciphertext->cd_length; in des_decrypt()
[all …]
/titanic_41/usr/src/uts/common/crypto/api/
H A Dkcf_cipher.c320 crypto_ctx_template_t tmpl, crypto_data_t *ciphertext, in crypto_encrypt_prov() argument
340 plaintext, ciphertext, tmpl); in crypto_encrypt_prov()
355 crypto_key_t *key, crypto_ctx_template_t tmpl, crypto_data_t *ciphertext, in crypto_encrypt() argument
402 plaintext, ciphertext, spi_ctx_tmpl, KCF_SWFP_RHNDL(crq)); in crypto_encrypt()
406 mech, key, plaintext, ciphertext, spi_ctx_tmpl); in crypto_encrypt()
474 crypto_data_t *ciphertext, crypto_call_req_t *cr) in crypto_encrypt_update() argument
493 ciphertext, NULL); in crypto_encrypt_update()
508 ctx->cc_session, NULL, NULL, plaintext, ciphertext, NULL); in crypto_encrypt_update()
533 crypto_encrypt_final(crypto_context_t context, crypto_data_t *ciphertext, in crypto_encrypt_final() argument
552 error = KCF_PROV_ENCRYPT_FINAL(pd, ctx, ciphertext, NULL); in crypto_encrypt_final()
[all …]
/titanic_41/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/
H A Denc_helper.c39 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()
48 free(cipher->ciphertext.data); in krb5_encrypt_helper()
49 cipher->ciphertext.data = NULL; in krb5_encrypt_helper()
H A Dencode_kdc.c102 (void) memset(dec_rep->enc_part.ciphertext.data, 0, \ in krb5_encode_kdc_rep()
103 dec_rep->enc_part.ciphertext.length); \ in krb5_encode_kdc_rep()
104 free(dec_rep->enc_part.ciphertext.data); \ in krb5_encode_kdc_rep()
105 dec_rep->enc_part.ciphertext.length = 0; \ in krb5_encode_kdc_rep()
106 dec_rep->enc_part.ciphertext.data = 0;} in krb5_encode_kdc_rep()
H A Dmk_rep.c86 memset(reply.enc_part.ciphertext.data, 0, reply.enc_part.ciphertext.length); in krb5_mk_rep()
87 free(reply.enc_part.ciphertext.data); in krb5_mk_rep()
88 reply.enc_part.ciphertext.length = 0; in krb5_mk_rep()
89 reply.enc_part.ciphertext.data = 0; in krb5_mk_rep()
H A Dmk_priv.c71 privmsg.enc_part.ciphertext.length = enclen; in krb5_mk_priv_basic()
72 if (!(privmsg.enc_part.ciphertext.data = in krb5_mk_priv_basic()
73 malloc(privmsg.enc_part.ciphertext.length))) { in krb5_mk_priv_basic()
102 memset(privmsg.enc_part.ciphertext.data, 0, in krb5_mk_priv_basic()
103 privmsg.enc_part.ciphertext.length); in krb5_mk_priv_basic()
104 free(privmsg.enc_part.ciphertext.data); in krb5_mk_priv_basic()
105 privmsg.enc_part.ciphertext.length = 0; in krb5_mk_priv_basic()
106 privmsg.enc_part.ciphertext.data = 0; in krb5_mk_priv_basic()
H A Dsend_tgs.c93 request.authenticator.ciphertext.data = 0; in krb5_send_tgs_basic()
116 memset(request.authenticator.ciphertext.data, 0, in krb5_send_tgs_basic()
117 request.authenticator.ciphertext.length); in krb5_send_tgs_basic()
118 free(request.authenticator.ciphertext.data); in krb5_send_tgs_basic()
207 krb5_xfree(tgsreq.authorization_data.ciphertext.data); in krb5_send_tgs2()
332 if (tgsreq.authorization_data.ciphertext.data) { in krb5_send_tgs2()
333 memset(tgsreq.authorization_data.ciphertext.data, 0, in krb5_send_tgs2()
334 tgsreq.authorization_data.ciphertext.length); in krb5_send_tgs2()
335 krb5_xfree(tgsreq.authorization_data.ciphertext.data); in krb5_send_tgs2()
H A Dmk_cred.c45 pencdata->ciphertext.data = scratch->data; in encrypt_credencpart()
46 pencdata->ciphertext.length = scratch->length; in encrypt_credencpart()
57 memset(pencdata->ciphertext.data, 0, pencdata->ciphertext.length); in encrypt_credencpart()
58 free(pencdata->ciphertext.data); in encrypt_credencpart()
59 pencdata->ciphertext.length = 0; in encrypt_credencpart()
60 pencdata->ciphertext.data = 0; in encrypt_credencpart()
H A Dmk_req_ext.c144 request.authenticator.ciphertext.data = 0; in krb5_mk_req_extended()
266 if (request.authenticator.ciphertext.data) { in krb5_mk_req_extended()
267 (void) memset(request.authenticator.ciphertext.data, 0, in krb5_mk_req_extended()
268 request.authenticator.ciphertext.length); in krb5_mk_req_extended()
269 free(request.authenticator.ciphertext.data); in krb5_mk_req_extended()
H A Ddecrypt_tk.c53 scratch.length = ticket->enc_part.ciphertext.length; in krb5_decrypt_tkt_part()
54 if (!(scratch.data = malloc(ticket->enc_part.ciphertext.length))) in krb5_decrypt_tkt_part()
H A Dkdc_rep_dc.c55 scratch.length = dec_rep->enc_part.ciphertext.length; in krb5_kdc_rep_decrypt_proc()
56 if (!(scratch.data = malloc(dec_rep->enc_part.ciphertext.length))) { in krb5_kdc_rep_decrypt_proc()
H A Dcopy_tick.c109 retval = krb5_copy_data(context, &from->enc_part.ciphertext, &scratch); in krb5_copy_ticket()
115 tempto->enc_part.ciphertext = *scratch; in krb5_copy_ticket()
119 krb5_xfree(tempto->enc_part.ciphertext.data); in krb5_copy_ticket()
H A Dpreauth2.c673 0xff & enc_data.ciphertext.data[0], in pa_enc_timestamp()
674 0xff & enc_data.ciphertext.data[1]); in pa_enc_timestamp()
680 krb5_xfree(enc_data.ciphertext.data); in pa_enc_timestamp()
686 krb5_xfree(enc_data.ciphertext.data); in pa_enc_timestamp()
989 enc_data->ciphertext.length = enclen; in pa_sam()
991 if ((enc_data->ciphertext.data = MALLOC(enclen)) == NULL) { in pa_sam()
992 enc_data->ciphertext.length = 0; in pa_sam()
999 FREE(enc_data->ciphertext.data, enclen); in pa_sam()
1000 enc_data->ciphertext.data = NULL; in pa_sam()
1001 enc_data->ciphertext.length = 0; in pa_sam()
[all …]
/titanic_41/usr/src/uts/common/gssapi/mechs/krb5/krb5/krb/
H A Dkfree.c64 if (val->enc_part.ciphertext.data) { in krb5_free_ap_rep()
65 krb5_xfree(val->enc_part.ciphertext.data); in krb5_free_ap_rep()
66 val->enc_part.ciphertext.data = 0; in krb5_free_ap_rep()
78 if (val->authenticator.ciphertext.data) { in krb5_free_ap_req()
79 krb5_xfree(val->authenticator.ciphertext.data); in krb5_free_ap_req()
80 val->authenticator.ciphertext.data = 0; in krb5_free_ap_req()
165 if (val->enc_part.ciphertext.data) { in krb5_free_cred()
166 krb5_xfree(val->enc_part.ciphertext.data); in krb5_free_cred()
167 val->enc_part.ciphertext.data = 0; in krb5_free_cred()
353 if (val->enc_part.ciphertext.data) { in krb5_free_kdc_rep()
[all …]
/titanic_41/usr/src/uts/common/sys/crypto/
H A Dimpl.h680 #define KCF_PROV_ENCRYPT(pd, ctx, plaintext, ciphertext, req) ( \ argument
682 KCF_PROV_CIPHER_OPS(pd)->encrypt(ctx, plaintext, ciphertext, req) : \
685 #define KCF_PROV_ENCRYPT_UPDATE(pd, ctx, plaintext, ciphertext, req) ( \ argument
688 ciphertext, req) : \
691 #define KCF_PROV_ENCRYPT_FINAL(pd, ctx, ciphertext, req) ( \ argument
693 KCF_PROV_CIPHER_OPS(pd)->encrypt_final(ctx, ciphertext, req) : \
696 #define KCF_PROV_ENCRYPT_ATOMIC(pd, session, mech, key, plaintext, ciphertext, \ argument
700 (pd)->pd_prov_handle, session, mech, key, plaintext, ciphertext, \
710 #define KCF_PROV_DECRYPT(pd, ctx, ciphertext, plaintext, req) ( \ argument
712 KCF_PROV_CIPHER_OPS(pd)->decrypt(ctx, ciphertext, plaintext, req) : \
[all …]
/titanic_41/usr/src/lib/crypt_modules/bsdbf/
H A Dbcrypt.c200 uint8_t ciphertext[4 * BCRYPT_BLOCKS] = "OrpheanBeholderScryDoubt"; local
279 cdata[i] = Blowfish_stream2word(ciphertext,
287 ciphertext[4 * i + 3] = cdata[i] & 0xff;
289 ciphertext[4 * i + 2] = cdata[i] & 0xff;
291 ciphertext[4 * i + 1] = cdata[i] & 0xff;
293 ciphertext[4 * i + 0] = cdata[i] & 0xff;
307 encode_base64((uint8_t *)encrypted + strlen(encrypted), ciphertext,
/titanic_41/usr/src/lib/gss_mechs/mech_krb5/crypto/
H A Dold_api_glue.c68 outputd.ciphertext.length = outlen; in krb5_encrypt()
69 outputd.ciphertext.data = outptr; in krb5_encrypt()
95 inputd.ciphertext.length = size; in krb5_decrypt()
97 inputd.ciphertext.data = (char*)inptr; in krb5_decrypt()
308 enc_data->ciphertext.length = enclen; in krb5_encrypt_data()
309 if ((enc_data->ciphertext.data = malloc(enclen)) == NULL) in krb5_encrypt_data()
313 free(enc_data->ciphertext.data); in krb5_encrypt_data()
334 data->length = enc_data->ciphertext.length; in krb5_decrypt_data()
/titanic_41/usr/src/uts/common/gssapi/mechs/krb5/crypto/arcfour/
H A Dk5_arcfour.c84 krb5_data d1, d2, d3, salt, plaintext, checksum, ciphertext, confounder; local
173 ciphertext.length=krb5_roundup(input->length+CONFOUNDERLENGTH,blocksize);
174 ciphertext.data=output->data+hashsize;
248 ret = (*(enc->encrypt))(context, &k3, ivec, &plaintext, &ciphertext);
280 krb5_data d1,d2,d3,salt,ciphertext,plaintext,checksum; local
354 ciphertext.length=input->length-hashsize;
355 ciphertext.data=input->data+hashsize;
357 plaintext.length=ciphertext.length;
412 ret=(*(enc->decrypt))(context, &k3, ivec, &ciphertext, &plaintext);
/titanic_41/usr/src/cmd/krb5/krb5kdc/
H A Ddo_tgs_req.c437 if (request->authorization_data.ciphertext.data) { in process_tgs_req()
440 scratch.length = request->authorization_data.ciphertext.length; in process_tgs_req()
442 malloc(request->authorization_data.ciphertext.length))) { in process_tgs_req()
684 if (ticket_reply.enc_part.ciphertext.data) { in process_tgs_req()
685 memset(ticket_reply.enc_part.ciphertext.data, 0, in process_tgs_req()
686 ticket_reply.enc_part.ciphertext.length); in process_tgs_req()
687 free(ticket_reply.enc_part.ciphertext.data); in process_tgs_req()
688 ticket_reply.enc_part.ciphertext.data = NULL; in process_tgs_req()
692 if (reply.enc_part.ciphertext.data) { in process_tgs_req()
693 memset(reply.enc_part.ciphertext.data, 0, in process_tgs_req()
[all …]
H A Ddo_as_req.c92 ticket_reply.enc_part.ciphertext.data = 0; in process_as_req()
448 memset(reply.enc_part.ciphertext.data, 0, reply.enc_part.ciphertext.length); in process_as_req()
449 free(reply.enc_part.ciphertext.data); in process_as_req()
547 if (ticket_reply.enc_part.ciphertext.data) { in process_as_req()
548 memset(ticket_reply.enc_part.ciphertext.data , 0, in process_as_req()
549 ticket_reply.enc_part.ciphertext.length); in process_as_req()
550 free(ticket_reply.enc_part.ciphertext.data); in process_as_req()
/titanic_41/usr/src/uts/common/gssapi/mechs/krb5/mech/
H A Dutil_crypt.c155 outputd.ciphertext.length = length;
156 outputd.ciphertext.data = out;
200 inputd.ciphertext.length = length;
201 inputd.ciphertext.data = (char *)in; /* Solaris Kerberos */
/titanic_41/usr/src/lib/krb5/kdb/
H A Dencrypt_key.c116 cipher.ciphertext.length = len; in krb5_dbekd_encrypt_key_data()
117 cipher.ciphertext.data = (char *)ptr; /* SUNWresync121 XXX */ in krb5_dbekd_encrypt_key_data()

123