| /freebsd/sys/dev/glxsb/ |
| H A D | glxsb_hash.c | 50 glxsb_hash_key_setup(struct glxsb_session *ses, const char *key, int klen) in glxsb_hash_key_setup() argument 54 axf = ses->ses_axf; in glxsb_hash_key_setup() 55 hmac_init_ipad(axf, key, klen, ses->ses_ictx); in glxsb_hash_key_setup() 56 hmac_init_opad(axf, key, klen, ses->ses_octx); in glxsb_hash_key_setup() 63 glxsb_authcompute(struct glxsb_session *ses, struct cryptop *crp) in glxsb_authcompute() argument 70 axf = ses->ses_axf; in glxsb_authcompute() 71 bcopy(ses->ses_ictx, &ctx, axf->ctxsize); in glxsb_authcompute() 83 bcopy(ses->ses_octx, &ctx, axf->ctxsize); in glxsb_authcompute() 92 crypto_copydata(crp, crp->crp_digest_start, ses->ses_mlen, in glxsb_authcompute() 94 if (timingsafe_bcmp(hash, hash2, ses->ses_mlen) != 0) in glxsb_authcompute() [all …]
|
| H A D | glxsb.c | 525 struct glxsb_session *ses; in glxsb_crypto_newsession() local 528 ses = crypto_get_driver_session(cses); in glxsb_crypto_newsession() 532 bcopy(csp->csp_cipher_key, ses->ses_key, sizeof(ses->ses_key)); in glxsb_crypto_newsession() 535 error = glxsb_hash_setup(ses, csp); in glxsb_crypto_newsession() 548 struct glxsb_session *ses; in glxsb_crypto_freesession() local 550 ses = crypto_get_driver_session(cses); in glxsb_crypto_freesession() 551 glxsb_hash_free(ses); in glxsb_crypto_freesession() 622 glxsb_crypto_encdec(struct cryptop *crp, struct glxsb_session *ses, in glxsb_crypto_encdec() argument 664 key = ses->ses_key; in glxsb_crypto_encdec() 709 struct glxsb_session *ses; in glxsb_crypto_task() local [all …]
|
| H A D | glxsb.h | 44 int glxsb_hash_setup(struct glxsb_session *ses, 47 int glxsb_hash_process(struct glxsb_session *ses, 50 void glxsb_hash_free(struct glxsb_session *ses);
|
| /freebsd/sys/crypto/aesni/ |
| H A D | aesni.c | 69 static int aesni_cipher_setup(struct aesni_session *ses, 71 static int aesni_cipher_process(struct aesni_session *ses, struct cryptop *crp); 72 static int aesni_cipher_crypt(struct aesni_session *ses, struct cryptop *crp, 74 static int aesni_cipher_mac(struct aesni_session *ses, struct cryptop *crp, 286 struct aesni_session *ses; in aesni_newsession() local 289 ses = crypto_get_driver_session(cses); in aesni_newsession() 300 error = aesni_cipher_setup(ses, csp); in aesni_newsession() 312 struct aesni_session *ses; in aesni_process() local 315 ses = crypto_get_driver_session(crp->crp_session); in aesni_process() 317 error = aesni_cipher_process(ses, crp); in aesni_process() [all …]
|
| H A D | aesni_wrap.c | 444 aesni_cipher_setup_common(struct aesni_session *ses, in aesni_cipher_setup_common() argument 464 ses->rounds = AES128_ROUNDS; in aesni_cipher_setup_common() 467 ses->rounds = AES192_ROUNDS; in aesni_cipher_setup_common() 470 ses->rounds = AES256_ROUNDS; in aesni_cipher_setup_common() 476 aesni_set_enckey(key, ses->enc_schedule, ses->rounds); in aesni_cipher_setup_common() 478 aesni_set_deckey(ses->enc_schedule, ses->dec_schedule, in aesni_cipher_setup_common() 479 ses->rounds); in aesni_cipher_setup_common() 482 aesni_set_enckey(key + keylen, ses->xts_schedule, in aesni_cipher_setup_common() 483 ses->rounds); in aesni_cipher_setup_common()
|
| /freebsd/sys/crypto/via/ |
| H A D | padlock_hash.c | 253 padlock_hash_key_setup(struct padlock_session *ses, const uint8_t *key, in padlock_hash_key_setup() argument 258 axf = ses->ses_axf; in padlock_hash_key_setup() 265 padlock_free_ctx(axf, ses->ses_ictx); in padlock_hash_key_setup() 266 padlock_free_ctx(axf, ses->ses_octx); in padlock_hash_key_setup() 268 hmac_init_ipad(axf, key, klen, ses->ses_ictx); in padlock_hash_key_setup() 269 hmac_init_opad(axf, key, klen, ses->ses_octx); in padlock_hash_key_setup() 276 padlock_authcompute(struct padlock_session *ses, struct cryptop *crp) in padlock_authcompute() argument 283 axf = ses->ses_axf; in padlock_authcompute() 285 padlock_copy_ctx(axf, ses->ses_ictx, &ctx); in padlock_authcompute() 300 padlock_copy_ctx(axf, ses->ses_octx, &ctx); in padlock_authcompute() [all …]
|
| H A D | padlock.c | 65 static void padlock_freesession_one(struct padlock_session *ses); 162 struct padlock_session *ses; in padlock_newsession() local 166 ses = crypto_get_driver_session(cses); in padlock_newsession() 168 error = padlock_cipher_setup(ses, csp); in padlock_newsession() 170 padlock_freesession_one(ses); in padlock_newsession() 177 error = padlock_hash_setup(ses, csp); in padlock_newsession() 180 padlock_freesession_one(ses); in padlock_newsession() 189 padlock_freesession_one(struct padlock_session *ses) in padlock_freesession_one() argument 192 padlock_hash_free(ses); in padlock_freesession_one() 198 struct padlock_session *ses; in padlock_freesession() local [all …]
|
| H A D | padlock_cipher.c | 97 padlock_cipher_key_setup(struct padlock_session *ses, const void *key, int klen) in padlock_cipher_key_setup() argument 102 cw = &ses->ses_cw; in padlock_cipher_key_setup() 105 rijndaelKeySetupEnc(ses->ses_ekey, key, klen * 8); in padlock_cipher_key_setup() 106 rijndaelKeySetupDec(ses->ses_dkey, key, klen * 8); in padlock_cipher_key_setup() 108 ses->ses_ekey[i] = ntohl(ses->ses_ekey[i]); in padlock_cipher_key_setup() 109 ses->ses_dkey[i] = ntohl(ses->ses_dkey[i]); in padlock_cipher_key_setup() 112 bcopy(key, ses->ses_ekey, klen); in padlock_cipher_key_setup() 113 bcopy(key, ses->ses_dkey, klen); in padlock_cipher_key_setup() 118 padlock_cipher_setup(struct padlock_session *ses, in padlock_cipher_setup() argument 128 cw = &ses->ses_cw; in padlock_cipher_setup() [all …]
|
| H A D | padlock.h | 71 int padlock_cipher_setup(struct padlock_session *ses, 73 int padlock_cipher_process(struct padlock_session *ses, 76 int padlock_hash_setup(struct padlock_session *ses, 78 int padlock_hash_process(struct padlock_session *ses, 80 void padlock_hash_free(struct padlock_session *ses);
|
| /freebsd/sys/crypto/blake2/ |
| H A D | blake2_cryptodev.c | 52 static int blake2_cipher_setup(struct blake2_session *ses, 54 static int blake2_cipher_process(struct blake2_session *ses, 132 struct blake2_session *ses; in blake2_newsession() local 135 ses = crypto_get_driver_session(cses); in blake2_newsession() 137 error = blake2_cipher_setup(ses, csp); in blake2_newsession() 149 struct blake2_session *ses; in blake2_process() local 152 ses = crypto_get_driver_session(crp->crp_session); in blake2_process() 153 error = blake2_cipher_process(ses, crp); in blake2_process() 194 blake2_cipher_setup(struct blake2_session *ses, in blake2_cipher_setup() argument 222 ses->mlen = hashlen; in blake2_cipher_setup() [all …]
|
| /freebsd/sys/crypto/armv8/ |
| H A D | armv8_crypto.c | 216 armv8_crypto_cipher_setup(struct armv8_crypto_session *ses, in armv8_crypto_cipher_setup() argument 236 keylen * 8, &ses->enc_schedule); in armv8_crypto_cipher_setup() 241 keylen * 8, &ses->dec_schedule); in armv8_crypto_cipher_setup() 244 aes_v8_set_encrypt_key(key + keylen, keylen * 8, &ses->xts_schedule); in armv8_crypto_cipher_setup() 248 aes_v8_encrypt(H.c, H.c, &ses->enc_schedule); in armv8_crypto_cipher_setup() 251 gcm_init_v8(ses->Htable, H.u); in armv8_crypto_cipher_setup() 263 struct armv8_crypto_session *ses; in armv8_crypto_newsession() local 266 ses = crypto_get_driver_session(cses); in armv8_crypto_newsession() 267 error = armv8_crypto_cipher_setup(ses, csp, csp->csp_cipher_key, in armv8_crypto_newsession() 275 struct armv8_crypto_session *ses; in armv8_crypto_process() local [all …]
|
| /freebsd/tools/tools/crypto/ |
| H A D | cryptocheck.c | 160 int ses; member 473 struct ocf_session *ses) in ocf_init_session() argument 481 ses->fd = -1; in ocf_init_session() 484 ses->fd = fd; in ocf_init_session() 485 ses->ses = sop->ses; in ocf_init_session() 486 ses->crid = sop->crid; in ocf_init_session() 491 ocf_destroy_session(struct ocf_session *ses) in ocf_destroy_session() argument 493 if (ses->fd == -1) in ocf_destroy_session() 496 if (ioctl(ses->fd, CIOCFSESSION, &ses->ses) < 0) in ocf_destroy_session() 501 ocf_init_cop(const struct ocf_session *ses, struct crypt_op *cop) in ocf_init_cop() argument [all …]
|
| /freebsd/sbin/nvmecontrol/ |
| H A D | format.c | 58 uint32_t ses; member 67 .ses = SES_NONE, 87 OPT("ses", 's', arg_uint32, opt, ses, 120 int lbaf, ms, pi, pil, ses, fd; in format() local 125 if ((int)opt.Eflag + opt.Cflag + (opt.ses != SES_NONE) > 1) { in format() 137 ses = SES_USER; in format() 139 ses = SES_CRYPTO; in format() 141 ses = opt.ses; in format() 165 ses == SES_CRYPTO) in format() 170 ses == SES_NONE) in format() [all …]
|
| /freebsd/tests/sys/opencrypto/ |
| H A D | poly1305_test.c | 325 return (sop.ses); in create_session() 331 uint32_t ses; in destroy_session() local 333 ses = _ses; in destroy_session() 334 ATF_REQUIRE_MSG(ioctl(fd, CIOCFSESSION, &ses) >= 0, in destroy_session() 339 do_cryptop(int fd, int ses, const void *inp, size_t inlen, void *out) in do_cryptop() argument 345 cop.ses = ses; in do_cryptop() 357 int fd, ses; in test_rfc7539_poly1305_vectors() local 368 ses = create_session(fd, CRYPTO_POLY1305, crid, key, sizeof(key)); in test_rfc7539_poly1305_vectors() 370 do_cryptop(fd, ses, msg, kat->test_msg_len, comptag); in test_rfc7539_poly1305_vectors() 374 destroy_session(fd, ses); in test_rfc7539_poly1305_vectors()
|
| H A D | blake2_test.c | 111 return (sop.ses); in create_session() 115 do_cryptop(int fd, int ses, size_t inlen, void *out) in do_cryptop() argument 121 cop.ses = ses; in do_cryptop() 132 int crid, fd, ses; in test_blake2b_vectors() local 138 ses = create_session(fd, CRYPTO_BLAKE2B, crid, key2b, sizeof(key2b)); in test_blake2b_vectors() 141 do_cryptop(fd, ses, i, hash); in test_blake2b_vectors() 153 int crid, fd, ses; in test_blake2s_vectors() local 159 ses = create_session(fd, CRYPTO_BLAKE2S, crid, key2s, sizeof(key2s)); in test_blake2s_vectors() 162 do_cryptop(fd, ses, i, hash); in test_blake2s_vectors()
|
| H A D | cryptodev.py | 181 ses = SessionOp2() 182 ses.cipher = cipher 183 ses.mac = mac 186 ses.keylen = len(key) 188 ses.key = k.buffer_info()[0] 193 ses.mackeylen = len(mackey) 195 ses.mackey = mk.buffer_info()[0] 199 ses.crid = crid 201 ses.ivlen = ivlen 203 ses.maclen = maclen [all …]
|
| /freebsd/sys/opencrypto/ |
| H A D | cryptosoft.c | 88 swcr_null(const struct swcr_session *ses, struct cryptop *crp) in swcr_null() argument 98 swcr_encdec(const struct swcr_session *ses, struct cryptop *crp) in swcr_encdec() argument 115 sw = &ses->swcr_encdec; in swcr_encdec() 241 swcr_authcompute(const struct swcr_session *ses, struct cryptop *crp) in swcr_authcompute() argument 253 sw = &ses->swcr_auth; in swcr_authcompute() 320 swcr_gmac(const struct swcr_session *ses, struct cryptop *crp) in swcr_gmac() argument 337 swa = &ses->swcr_auth; in swcr_gmac() 399 swcr_gcm(const struct swcr_session *ses, struct cryptop *crp) in swcr_gcm() argument 418 swa = &ses->swcr_auth; in swcr_gcm() 419 swe = &ses->swcr_encdec; in swcr_gcm() [all …]
|
| H A D | cryptodev.c | 91 uint32_t ses; member 101 uint32_t ses; member 109 uint32_t ses; member 119 uint32_t ses; member 148 CP(*from, *to, ses); in session_op_from_32() 172 CP(*from, *to, ses); in session_op_to_32() 187 CP(*from, *to, ses); in crypt_op_from_32() 201 CP(*from, *to, ses); in crypt_op_to_32() 215 CP(*from, *to, ses); in crypt_aead_from_32() 232 CP(*from, *to, ses); in crypt_aead_to_32() [all …]
|
| /freebsd/sys/dev/safe/ |
| H A D | safe.c | 623 safe_setup_enckey(struct safe_session *ses, const void *key) in safe_setup_enckey() argument 627 bcopy(key, ses->ses_key, ses->ses_klen); in safe_setup_enckey() 630 for (i = 0; i < N(ses->ses_key); i++) in safe_setup_enckey() 631 ses->ses_key[i] = htole32(ses->ses_key[i]); in safe_setup_enckey() 635 safe_setup_mackey(struct safe_session *ses, int algo, const uint8_t *key, in safe_setup_mackey() argument 642 bcopy(sha1ctx.h.b32, ses->ses_hminner, sizeof(sha1ctx.h.b32)); in safe_setup_mackey() 645 bcopy(sha1ctx.h.b32, ses->ses_hmouter, sizeof(sha1ctx.h.b32)); in safe_setup_mackey() 650 for (i = 0; i < N(ses->ses_hminner); i++) { in safe_setup_mackey() 651 ses->ses_hminner[i] = htole32(ses->ses_hminner[i]); in safe_setup_mackey() 652 ses->ses_hmouter[i] = htole32(ses->ses_hmouter[i]); in safe_setup_mackey() [all …]
|
| /freebsd/contrib/netbsd-tests/crypto/opencrypto/ |
| H A D | h_aesctr2.c | 72 co.ses = cs.ses; in main() 83 co.ses = cs.ses; in main()
|
| H A D | h_comp.c | 60 co1.ses = cs.ses; in main() 75 co2.ses = cs.ses; in main()
|
| H A D | h_gcm.c | 78 co.ses = cs.ses; in main() 109 co.ses = cs.ses; in main()
|
| H A D | h_md5.c | 92 co.ses = cs.ses; in main() 104 res = ioctl(fd, CIOCFSESSION, &cs.ses); in main()
|
| /freebsd/crypto/openssl/engines/ |
| H A D | e_devcrypto.c | 89 if (ioctl(cfd, CIOCFSESSION, &sess->ses) < 0) { in clean_devcrypto_session() 214 if (cipher_ctx->sess.ses != 0 && clean_devcrypto_session(&cipher_ctx->sess) == 0) in cipher_init() 250 cryp.ses = cipher_ctx->sess.ses; in cipher_do_cipher() 502 siop.ses = sess.ses; in prepare_cipher_methods() 515 ioctl(cfd, CIOCFSESSION, &sess.ses); in prepare_cipher_methods() 755 cryp.ses = ctx->sess.ses; in digest_op() 816 cphash.src_ses = digest_from->sess.ses; in digest_copy() 817 cphash.dst_ses = digest_to->sess.ses; in digest_copy() 896 sess2.ses = 0; in prepare_digest_methods() 904 siop.ses = sess1.ses; in prepare_digest_methods() [all …]
|
| /freebsd/sys/cam/scsi/ |
| H A D | scsi_enc_ses.c | 1205 ses_softc_t *ses; in ses_set_timed_completion() local 1208 ses = enc->enc_private; in ses_set_timed_completion() 1257 ses->ses_flags |= SES_FLAG_TIMEDCOMP; in ses_set_timed_completion() 1260 ses->ses_flags &= ~SES_FLAG_TIMEDCOMP; in ses_set_timed_completion() 1266 return (ses->ses_flags & SES_FLAG_TIMEDCOMP); in ses_set_timed_completion() 1282 ses_softc_t *ses; in ses_process_pages() local 1288 ses = enc->enc_private; in ses_process_pages() 1312 ses->ses_flags |= SES_FLAG_DESC; in ses_process_pages() 1314 ses->ses_flags |= SES_FLAG_ADDLSTATUS; in ses_process_pages() 1532 ses_softc_t *ses; in ses_process_status() local [all …]
|