| /onnv-gate/usr/src/uts/common/crypto/io/ |
| H A D | blowfish.c | 344 crypto_data_t *ciphertext, crypto_req_handle_t req) in blowfish_encrypt() argument 363 BLOWFISH_ARG_INPLACE(plaintext, ciphertext); in blowfish_encrypt() 369 if (ciphertext->cd_length < plaintext->cd_length) { in blowfish_encrypt() 370 ciphertext->cd_length = plaintext->cd_length; in blowfish_encrypt() 377 ret = blowfish_encrypt_update(ctx, plaintext, ciphertext, req); in blowfish_encrypt() 389 blowfish_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext, in blowfish_decrypt() argument 403 if ((ciphertext->cd_length & (BLOWFISH_BLOCK_LEN - 1)) != 0) in blowfish_decrypt() 409 BLOWFISH_ARG_INPLACE(ciphertext, plaintext); in blowfish_decrypt() 415 if (plaintext->cd_length < ciphertext->cd_length) { in blowfish_decrypt() 416 plaintext->cd_length = ciphertext->cd_length; in blowfish_decrypt() [all …]
|
| H A D | aes.c | 433 crypto_data_t *ciphertext, crypto_req_handle_t req) in aes_encrypt() argument 453 AES_ARG_INPLACE(plaintext, ciphertext); in aes_encrypt() 476 if (ciphertext->cd_length < length_needed) { in aes_encrypt() 477 ciphertext->cd_length = length_needed; in aes_encrypt() 481 saved_length = ciphertext->cd_length; in aes_encrypt() 482 saved_offset = ciphertext->cd_offset; in aes_encrypt() 487 ret = aes_encrypt_update(ctx, plaintext, ciphertext, req); in aes_encrypt() 504 ciphertext->cd_offset = ciphertext->cd_length; in aes_encrypt() 505 ciphertext->cd_length = saved_length - ciphertext->cd_length; in aes_encrypt() 506 ret = ccm_encrypt_final((ccm_ctx_t *)aes_ctx, ciphertext, in aes_encrypt() [all …]
|
| H A D | rsa.c | 539 crypto_data_t *ciphertext, crypto_req_handle_t req) in rsaprov_encrypt() argument 547 RSA_ARG_INPLACE(plaintext, ciphertext); in rsaprov_encrypt() 556 ciphertext); in rsaprov_encrypt() 568 crypto_key_t *key, crypto_data_t *plaintext, crypto_data_t *ciphertext, in rsa_encrypt_atomic() argument 575 RSA_ARG_INPLACE(plaintext, ciphertext); in rsa_encrypt_atomic() 578 ciphertext)); in rsa_encrypt_atomic() 604 crypto_data_t *plaintext, crypto_data_t *ciphertext) in rsa_encrypt_common() argument 635 if (ciphertext->cd_length < modulus_len) { in rsa_encrypt_common() 636 ciphertext->cd_length = modulus_len; in rsa_encrypt_common() 660 ciphertext, modulus_len)) != CRYPTO_SUCCESS) in rsa_encrypt_common() [all …]
|
| /onnv-gate/usr/src/uts/common/des/ |
| H A D | des_crypt.c | 554 crypto_data_t *ciphertext, crypto_req_handle_t req) in des_encrypt() argument 572 DES_ARG_INPLACE(plaintext, ciphertext); in des_encrypt() 578 if (ciphertext->cd_length < plaintext->cd_length) { in des_encrypt() 579 ciphertext->cd_length = plaintext->cd_length; in des_encrypt() 586 ret = des_encrypt_update(ctx, plaintext, ciphertext, req); in des_encrypt() 598 des_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext, in des_decrypt() argument 611 if ((ciphertext->cd_length & (DES_BLOCK_LEN - 1)) != 0) in des_decrypt() 617 DES_ARG_INPLACE(ciphertext, plaintext); in des_decrypt() 623 if (plaintext->cd_length < ciphertext->cd_length) { in des_decrypt() 624 plaintext->cd_length = ciphertext->cd_length; in des_decrypt() [all …]
|
| /onnv-gate/usr/src/common/openssl/crypto/evp/ |
| H A D | evp_test.c | 139 const unsigned char *ciphertext,int cn, in test1() argument 152 hexdump(stdout,"Ciphertext",ciphertext,cn); in test1() 191 if(memcmp(out,ciphertext,cn)) in test1() 195 hexdump(stderr,"Expected",ciphertext,cn); in test1() 210 if(!EVP_DecryptUpdate(&ctx,out,&outl,ciphertext,cn)) in test1() 247 const unsigned char *ciphertext,int cn, in test_cipher() argument 256 test1(c,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec); in test_cipher() 263 const unsigned char *ciphertext, unsigned int cn) in test_digest() argument 276 hexdump(stdout,"Digest",ciphertext,cn); in test_digest() 305 if(memcmp(md,ciphertext,cn)) in test_digest() [all …]
|
| H A D | evptests.txt | 1 #cipher:key:iv:plaintext:ciphertext:0/1(decrypt/encrypt) 62 # AES-bits-ECB:key::plaintext:ciphertext:encdec 79 # AES-bits-CBC:key:IV/ciphertext':plaintext:ciphertext:encdec 97 # AES-bits-CFB:key:IV/ciphertext':plaintext:ciphertext:encdec 129 # AES-bits-CFB:key:IV/output':plaintext:ciphertext:encdec
|
| /onnv-gate/usr/src/uts/common/crypto/api/ |
| H A D | kcf_cipher.c | 320 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 …]
|
| /onnv-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/ |
| H A D | enc_helper.c | 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() 48 free(cipher->ciphertext.data); in krb5_encrypt_helper() 49 cipher->ciphertext.data = NULL; in krb5_encrypt_helper()
|
| H A D | encode_kdc.c | 102 (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 D | mk_rep.c | 86 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 D | mk_priv.c | 71 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 D | send_tgs.c | 93 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 D | mk_cred.c | 45 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 D | mk_req_ext.c | 144 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 D | decrypt_tk.c | 53 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 D | kdc_rep_dc.c | 55 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 D | copy_tick.c | 109 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()
|
| /onnv-gate/usr/src/uts/common/gssapi/mechs/krb5/krb5/krb/ |
| H A D | kfree.c | 64 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 …]
|
| /onnv-gate/usr/src/uts/common/sys/crypto/ |
| H A D | impl.h | 687 #define KCF_PROV_ENCRYPT(pd, ctx, plaintext, ciphertext, req) ( \ argument 689 KCF_PROV_CIPHER_OPS(pd)->encrypt(ctx, plaintext, ciphertext, req) : \ 692 #define KCF_PROV_ENCRYPT_UPDATE(pd, ctx, plaintext, ciphertext, req) ( \ argument 695 ciphertext, req) : \ 698 #define KCF_PROV_ENCRYPT_FINAL(pd, ctx, ciphertext, req) ( \ argument 700 KCF_PROV_CIPHER_OPS(pd)->encrypt_final(ctx, ciphertext, req) : \ 703 #define KCF_PROV_ENCRYPT_ATOMIC(pd, session, mech, key, plaintext, ciphertext, \ argument 707 (pd)->pd_prov_handle, session, mech, key, plaintext, ciphertext, \ 717 #define KCF_PROV_DECRYPT(pd, ctx, ciphertext, plaintext, req) ( \ argument 719 KCF_PROV_CIPHER_OPS(pd)->decrypt(ctx, ciphertext, plaintext, req) : \ [all …]
|
| /onnv-gate/usr/src/common/openssl/doc/crypto/ |
| H A D | des_modes.pod | 33 The same plaintext block always produces the same ciphertext block 38 An error will only affect one ciphertext block. 56 The CBC mode produces the same ciphertext whenever the same 61 The chaining operation makes the ciphertext blocks dependent on the 68 enciphering to the same ciphertext. 72 An error will affect the current and the following ciphertext blocks. 88 The CFB mode produces the same ciphertext whenever the same 93 The chaining operation makes the ciphertext variables dependent on the 100 enciphering to the same ciphertext. 119 An error will affect the current and the following ciphertext variables. [all …]
|
| /onnv-gate/usr/src/lib/crypt_modules/bsdbf/ |
| H A D | bcrypt.c | 193 uint8_t ciphertext[4 * BCRYPT_BLOCKS] = "OrpheanBeholderScryDoubt"; local 253 cdata[i] = Blowfish_stream2word(ciphertext, 4 * BCRYPT_BLOCKS, &j); 260 ciphertext[4 * i + 3] = cdata[i] & 0xff; 262 ciphertext[4 * i + 2] = cdata[i] & 0xff; 264 ciphertext[4 * i + 1] = cdata[i] & 0xff; 266 ciphertext[4 * i + 0] = cdata[i] & 0xff; 280 encode_base64((uint8_t *) encrypted + strlen(encrypted), ciphertext,
|
| /onnv-gate/usr/src/lib/gss_mechs/mech_krb5/crypto/ |
| H A D | old_api_glue.c | 68 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()
|
| /onnv-gate/usr/src/uts/common/gssapi/mechs/krb5/crypto/arcfour/ |
| H A D | k5_arcfour.c | 84 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);
|
| /onnv-gate/usr/src/cmd/krb5/krb5kdc/ |
| H A D | do_tgs_req.c | 437 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 D | do_as_req.c | 92 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()
|