Home
last modified time | relevance | path

Searched refs:bctx (Results 1 – 12 of 12) sorted by relevance

/src/contrib/bearssl/src/aead/
H A Dccm.c51 br_ccm_init(br_ccm_context *ctx, const br_block_ctrcbc_class **bctx) in br_ccm_init() argument
53 ctx->bctx = bctx; in br_ccm_init()
97 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, tmp, sizeof tmp); in br_ccm_reset()
126 (*ctx->bctx)->ctr(ctx->bctx, ctx->ctr, in br_ccm_reset()
157 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, in br_ccm_aad_inject()
166 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, dbuf, len); in br_ccm_aad_inject()
188 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, in br_ccm_flip()
246 (*ctx->bctx)->mac(ctx->bctx, in br_ccm_run()
264 (*ctx->bctx)->decrypt(ctx->bctx, ctx->ctr, ctx->cbcmac, in br_ccm_run()
267 (*ctx->bctx)->encrypt(ctx->bctx, ctx->ctr, ctx->cbcmac, in br_ccm_run()
[all …]
H A Deax.c112 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, ctx->buf, sizeof ctx->buf); in do_pad()
143 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, in do_cbcmac_chunk()
146 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, data, len); in do_cbcmac_chunk()
153 br_eax_init(br_eax_context *ctx, const br_block_ctrcbc_class **bctx) in br_eax_init() argument
158 ctx->bctx = bctx; in br_eax_init()
165 (*bctx)->ctr(bctx, iv, tmp, sizeof tmp); in br_eax_init()
187 (*ctx->bctx)->mac(ctx->bctx, st->st[i], tmp, sizeof tmp); in br_eax_capture()
396 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, in br_eax_run()
412 (*ctx->bctx)->encrypt(ctx->bctx, ctx->ctr, ctx->cbcmac, in br_eax_run()
415 (*ctx->bctx)->decrypt(ctx->bctx, ctx->ctr, ctx->cbcmac, in br_eax_run()
[all …]
H A Dgcm.c55 br_gcm_init(br_gcm_context *ctx, const br_block_ctr_class **bctx, br_ghash gh) in br_gcm_init() argument
60 ctx->bctx = bctx; in br_gcm_init()
71 (*bctx)->run(bctx, iv, 0, ctx->h, sizeof ctx->h); in br_gcm_init()
205 ctx->jc = (*ctx->bctx)->run(ctx->bctx, ctx->j0_1, ctx->jc, buf, dlen); in br_gcm_run()
220 ctx->jc = (*ctx->bctx)->run(ctx->bctx, ctx->j0_1, in br_gcm_run()
263 (*ctx->bctx)->run(ctx->bctx, ctx->j0_1, ctx->j0_2, tag, 16); in br_gcm_get_tag()
/src/crypto/openssl/providers/implementations/ciphers/
H A Dcipher_chacha20_poly1305_hw.c15 static int chacha_poly1305_tls_init(PROV_CIPHER_CTX *bctx, in chacha_poly1305_tls_init() argument
19 PROV_CHACHA20_POLY1305_CTX *ctx = (PROV_CHACHA20_POLY1305_CTX *)bctx; in chacha_poly1305_tls_init()
27 if (!bctx->enc) { in chacha_poly1305_tls_init()
45 static int chacha_poly1305_tls_iv_set_fixed(PROV_CIPHER_CTX *bctx, in chacha_poly1305_tls_iv_set_fixed() argument
48 PROV_CHACHA20_POLY1305_CTX *ctx = (PROV_CHACHA20_POLY1305_CTX *)bctx; in chacha_poly1305_tls_iv_set_fixed()
58 static int chacha20_poly1305_initkey(PROV_CIPHER_CTX *bctx, in chacha20_poly1305_initkey() argument
61 PROV_CHACHA20_POLY1305_CTX *ctx = (PROV_CHACHA20_POLY1305_CTX *)bctx; in chacha20_poly1305_initkey()
69 if (bctx->enc) in chacha20_poly1305_initkey()
75 static int chacha20_poly1305_initiv(PROV_CIPHER_CTX *bctx) in chacha20_poly1305_initiv() argument
77 PROV_CHACHA20_POLY1305_CTX *ctx = (PROV_CHACHA20_POLY1305_CTX *)bctx; in chacha20_poly1305_initiv()
[all …]
H A Dcipher_chacha20_hw.c14 static int chacha20_initkey(PROV_CIPHER_CTX *bctx, const uint8_t *key, in chacha20_initkey() argument
17 PROV_CHACHA20_CTX *ctx = (PROV_CHACHA20_CTX *)bctx; in chacha20_initkey()
28 static int chacha20_initiv(PROV_CIPHER_CTX *bctx) in chacha20_initiv() argument
30 PROV_CHACHA20_CTX *ctx = (PROV_CHACHA20_CTX *)bctx; in chacha20_initiv()
33 if (bctx->iv_set) { in chacha20_initiv()
35 ctx->counter[i / 4] = CHACHA_U8TOU32(bctx->oiv + i); in chacha20_initiv()
41 static int chacha20_cipher(PROV_CIPHER_CTX *bctx, unsigned char *out, in chacha20_cipher() argument
44 PROV_CHACHA20_CTX *ctx = (PROV_CHACHA20_CTX *)bctx; in chacha20_cipher()
H A Dcipher_rc4_hmac_md5_hw.c35 static int cipher_hw_rc4_hmac_md5_initkey(PROV_CIPHER_CTX *bctx, in cipher_hw_rc4_hmac_md5_initkey() argument
38 PROV_RC4_HMAC_MD5_CTX *ctx = (PROV_RC4_HMAC_MD5_CTX *)bctx; in cipher_hw_rc4_hmac_md5_initkey()
45 bctx->removetlsfixed = MD5_DIGEST_LENGTH; in cipher_hw_rc4_hmac_md5_initkey()
49 static int cipher_hw_rc4_hmac_md5_cipher(PROV_CIPHER_CTX *bctx, in cipher_hw_rc4_hmac_md5_cipher() argument
53 PROV_RC4_HMAC_MD5_CTX *ctx = (PROV_RC4_HMAC_MD5_CTX *)bctx; in cipher_hw_rc4_hmac_md5_cipher()
165 static int cipher_hw_rc4_hmac_md5_tls_init(PROV_CIPHER_CTX *bctx, in cipher_hw_rc4_hmac_md5_tls_init() argument
168 PROV_RC4_HMAC_MD5_CTX *ctx = (PROV_RC4_HMAC_MD5_CTX *)bctx; in cipher_hw_rc4_hmac_md5_tls_init()
176 if (!bctx->enc) { in cipher_hw_rc4_hmac_md5_tls_init()
190 static void cipher_hw_rc4_hmac_md5_init_mackey(PROV_CIPHER_CTX *bctx, in cipher_hw_rc4_hmac_md5_init_mackey() argument
194 PROV_RC4_HMAC_MD5_CTX *ctx = (PROV_RC4_HMAC_MD5_CTX *)bctx; in cipher_hw_rc4_hmac_md5_init_mackey()
H A Dcipher_blowfish_hw.c21 PROV_BLOWFISH_CTX *bctx = (PROV_BLOWFISH_CTX *)ctx; in cipher_hw_blowfish_initkey() local
23 BF_set_key(&bctx->ks.ks, keylen, key); in cipher_hw_blowfish_initkey()
H A Dcipher_cast5_hw.c21 PROV_CAST_CTX *bctx = (PROV_CAST_CTX *)ctx; in cipher_hw_cast5_initkey() local
23 CAST_set_key(&(bctx->ks.ks), keylen, key); in cipher_hw_cast5_initkey()
/src/sys/crypto/blake2/
H A Dblake2_cryptodev.c256 } bctx; in blake2_cipher_process() local
275 rc = blake2b_init_key(&bctx.sb, ses->mlen, key, klen); in blake2_cipher_process()
277 rc = blake2b_init(&bctx.sb, ses->mlen); in blake2_cipher_process()
283 crp->crp_payload_length, blake2b_applicator, &bctx.sb); in blake2_cipher_process()
286 rc = blake2b_final(&bctx.sb, res, ses->mlen); in blake2_cipher_process()
292 rc = blake2s_init_key(&bctx.ss, ses->mlen, key, klen); in blake2_cipher_process()
294 rc = blake2s_init(&bctx.ss, ses->mlen); in blake2_cipher_process()
300 crp->crp_payload_length, blake2s_applicator, &bctx.ss); in blake2_cipher_process()
303 rc = blake2s_final(&bctx.ss, res, ses->mlen); in blake2_cipher_process()
/src/contrib/bearssl/inc/
H A Dbearssl_aead.h360 const br_block_ctr_class **bctx; member
388 const br_block_ctr_class **bctx, br_ghash gh);
583 const br_block_ctrcbc_class **bctx; member
623 void br_eax_init(br_eax_context *ctx, const br_block_ctrcbc_class **bctx);
898 const br_block_ctrcbc_class **bctx; member
922 void br_ccm_init(br_ccm_context *ctx, const br_block_ctrcbc_class **bctx);
/src/contrib/ntp/ntpd/
H A Dntp_crypto.c2161 BN_CTX *bctx; /* BIGNUM context */ in crypto_alice() local
2189 bctx = BN_CTX_new(); in crypto_alice()
2190 BN_mod(peer->iffval, peer->iffval, q, bctx); in crypto_alice()
2191 BN_CTX_free(bctx); in crypto_alice()
2236 BN_CTX *bctx; /* BIGNUM context */ in crypto_bob() local
2277 bctx = BN_CTX_new(); bk = BN_new(); bn = BN_new(); in crypto_bob()
2280 BN_mod_mul(bn, priv_key, r, q, bctx); /* b r mod q */ in crypto_bob()
2282 BN_mod(bn, bn, q, bctx); /* k + b r mod q */ in crypto_bob()
2283 BN_mod_exp(bk, g, bk, p, bctx); /* g^k mod p */ in crypto_bob()
2286 BN_CTX_free(bctx); in crypto_bob()
[all …]
/src/usr.sbin/bhyve/
H A Dpci_ahci.c138 struct blockif_ctxt *bctx; member
498 error = blockif_cancel(p->bctx, &aior->io_req); in ahci_port_stop()
538 if (!pr->bctx) { in ahci_port_reset()
575 if (sc->port[i].bctx) in ahci_reset()
647 extra = todo % blockif_sectsz(p->bctx); in ahci_build_iov()
720 lba *= blockif_sectsz(p->bctx); in ahci_handle_rw()
721 len *= blockif_sectsz(p->bctx); in ahci_handle_rw()
747 err = blockif_read(p->bctx, breq); in ahci_handle_rw()
749 err = blockif_write(p->bctx, breq); in ahci_handle_rw()
783 err = blockif_flush(p->bctx, breq); in ahci_handle_flush()
[all …]