Home
last modified time | relevance | path

Searched refs:niv (Results 1 – 23 of 23) sorted by relevance

/openbmc/qemu/tests/unit/
H A Dtest-crypto-ivgen.c35 size_t niv; member
44 .niv = 16,
53 .niv = 16,
62 .niv = 16,
71 .niv = 16,
80 .niv = 16,
89 .niv = 16,
103 .niv = 16,
117 .niv = 16,
131 .niv = 16,
[all …]
H A Dtest-crypto-cipher.c656 size_t nkey, niv = 0, nciphertext = 0, nplaintext = 0; in test_cipher() local
663 niv = unhex_string(data->iv, &iv); in test_cipher()
697 g_assert_cmpint(ivsize, ==, niv); in test_cipher()
698 if (niv) { in test_cipher()
699 g_assert_cmpint(blocksize, ==, niv); in test_cipher()
704 iv, niv, in test_cipher()
721 iv, niv, in test_cipher()
/openbmc/qemu/crypto/
H A Divgen-plain64.c34 uint8_t *iv, size_t niv, in qcrypto_ivgen_plain_calculate() argument
40 if (ivprefix > niv) { in qcrypto_ivgen_plain_calculate()
41 ivprefix = niv; in qcrypto_ivgen_plain_calculate()
44 if (ivprefix < niv) { in qcrypto_ivgen_plain_calculate()
45 memset(iv + ivprefix, 0, niv - ivprefix); in qcrypto_ivgen_plain_calculate()
H A Divgen-plain.c34 uint8_t *iv, size_t niv, in qcrypto_ivgen_plain_calculate() argument
40 if (ivprefix > niv) { in qcrypto_ivgen_plain_calculate()
41 ivprefix = niv; in qcrypto_ivgen_plain_calculate()
44 if (ivprefix < niv) { in qcrypto_ivgen_plain_calculate()
45 memset(iv + ivprefix, 0, niv - ivprefix); in qcrypto_ivgen_plain_calculate()
H A Divgen-essiv.c73 uint8_t *iv, size_t niv, in qcrypto_ivgen_essiv_calculate() argument
95 if (ndata > niv) { in qcrypto_ivgen_essiv_calculate()
96 ndata = niv; in qcrypto_ivgen_essiv_calculate()
99 if (ndata < niv) { in qcrypto_ivgen_essiv_calculate()
100 memset(iv + ndata, 0, niv - ndata); in qcrypto_ivgen_essiv_calculate()
H A Dblock.c375 size_t niv, in do_qcrypto_block_cipher_encdec() argument
385 g_autofree uint8_t *iv = niv ? g_new0(uint8_t, niv) : NULL; in do_qcrypto_block_cipher_encdec()
394 if (niv) { in do_qcrypto_block_cipher_encdec()
398 ret = qcrypto_ivgen_calculate(ivgen, startsector, iv, niv, errp); in do_qcrypto_block_cipher_encdec()
408 iv, niv, in do_qcrypto_block_cipher_encdec()
429 size_t niv, in qcrypto_block_cipher_decrypt_helper() argument
437 return do_qcrypto_block_cipher_encdec(cipher, niv, ivgen, NULL, sectorsize, in qcrypto_block_cipher_decrypt_helper()
444 size_t niv, in qcrypto_block_cipher_encrypt_helper() argument
452 return do_qcrypto_block_cipher_encdec(cipher, niv, ivgen, NULL, sectorsize, in qcrypto_block_cipher_encrypt_helper()
470 ret = do_qcrypto_block_cipher_encdec(cipher, block->niv, block->ivgen, in qcrypto_block_decrypt_helper()
[all …]
H A Dcipher-gcrypt.c.inc172 const uint8_t *iv, size_t niv,
178 if (niv != ctx->blocksize) {
180 ctx->blocksize, niv);
185 err = gcry_cipher_setiv(ctx->handle, iv, niv);
195 const uint8_t *iv, size_t niv,
201 if (niv != ctx->blocksize) {
203 ctx->blocksize, niv);
207 err = gcry_cipher_setctr(ctx->handle, iv, niv);
H A Dcipher-afalg.c120 size_t niv, Error **errp) in qcrypto_afalg_cipher_setiv() argument
127 if (niv != expect_niv) { in qcrypto_afalg_cipher_setiv()
129 niv, expect_niv); in qcrypto_afalg_cipher_setiv()
139 alg_iv->ivlen = niv; in qcrypto_afalg_cipher_setiv()
140 memcpy(alg_iv->iv, iv, niv); in qcrypto_afalg_cipher_setiv()
H A Dblockpriv.h48 size_t niv; member
103 size_t niv,
112 size_t niv,
H A Divgen.c69 uint8_t *iv, size_t niv, in qcrypto_ivgen_calculate() argument
72 return ivgen->driver->calculate(ivgen, sector, iv, niv, errp); in qcrypto_ivgen_calculate()
H A Dcipher.c199 const uint8_t *iv, size_t niv, in qcrypto_cipher_setiv() argument
203 return drv->cipher_setiv(cipher, iv, niv, errp); in qcrypto_cipher_setiv()
H A Dcipher-builtin.c.inc54 const uint8_t *iv, size_t niv,
195 size_t niv, Error **errp)
200 if (niv != AES_BLOCK_SIZE) {
202 AES_BLOCK_SIZE, niv);
H A Divgenpriv.h34 uint8_t *iv, size_t niv,
H A Dcipherpriv.h34 const uint8_t *iv, size_t niv,
H A Dcipher-gnutls.c.inc208 const uint8_t *iv, size_t niv,
213 if (niv != ctx->blocksize) {
215 ctx->blocksize, niv);
219 gnutls_cipher_set_iv(ctx->handle, (unsigned char *)iv, niv);
H A Dblock-qcow.c65 block->niv = qcrypto_cipher_get_iv_len(QCRYPTO_CIPHER_ALG_AES_128, in qcrypto_block_qcow_init()
H A Dblock-luks.c826 if (qcrypto_block_cipher_encrypt_helper(cipher, block->niv, ivgen, in qcrypto_block_luks_store_key()
892 size_t niv; in qcrypto_block_luks_load_key() local
948 niv = qcrypto_cipher_get_iv_len(luks->cipher_alg, in qcrypto_block_luks_load_key()
970 niv, in qcrypto_block_luks_load_key()
1247 block->niv = qcrypto_cipher_get_iv_len(luks->cipher_alg, in qcrypto_block_luks_open()
1463 block->niv = qcrypto_cipher_get_iv_len(luks_opts.cipher_alg, in qcrypto_block_luks_create()
H A Dcipher-nettle.c.inc58 const uint8_t *iv, size_t niv,
68 size_t niv, Error **errp) \
71 if (niv != BLEN) { \
72 error_setg(errp, "Expected IV size %d not %zu", BLEN, niv); \
75 memcpy(ctx->iv, iv, niv); \
/openbmc/qemu/tests/bench/
H A Dbenchmark-crypto-cipher.c27 size_t niv; in test_cipher_speed() local
36 niv = qcrypto_cipher_get_iv_len(alg, mode); in test_cipher_speed()
44 iv = g_new0(uint8_t, niv); in test_cipher_speed()
45 memset(iv, g_test_rand_int(), niv); in test_cipher_speed()
58 iv, niv, in test_cipher_speed()
/openbmc/qemu/include/crypto/
H A Divgen.h158 uint8_t *iv, size_t niv,
H A Dcipher.h235 const uint8_t *iv, size_t niv,
/openbmc/linux/drivers/crypto/allwinner/sun8i-ss/
H A Dsun8i-ss.h192 int niv; member
H A Dsun8i-ss-cipher.c168 rctx->niv = i; in sun8i_ss_setup_ivs()
309 for (i = 0; i < rctx->niv; i++) { in sun8i_ss_cipher()