/openbmc/qemu/tests/unit/ |
H A D | test-crypto-ivgen.c | 35 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 D | test-crypto-cipher.c | 656 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 D | ivgen-plain64.c | 34 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 D | ivgen-plain.c | 34 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 D | ivgen-essiv.c | 73 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 D | block.c | 375 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 D | cipher-gcrypt.c.inc | 172 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 D | cipher-afalg.c | 120 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 D | blockpriv.h | 48 size_t niv; member 103 size_t niv, 112 size_t niv,
|
H A D | ivgen.c | 69 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 D | cipher.c | 199 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 D | cipher-builtin.c.inc | 54 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 D | ivgenpriv.h | 34 uint8_t *iv, size_t niv,
|
H A D | cipherpriv.h | 34 const uint8_t *iv, size_t niv,
|
H A D | cipher-gnutls.c.inc | 208 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 D | block-qcow.c | 65 block->niv = qcrypto_cipher_get_iv_len(QCRYPTO_CIPHER_ALG_AES_128, in qcrypto_block_qcow_init()
|
H A D | block-luks.c | 826 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 D | cipher-nettle.c.inc | 58 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 D | benchmark-crypto-cipher.c | 27 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 D | ivgen.h | 158 uint8_t *iv, size_t niv,
|
H A D | cipher.h | 235 const uint8_t *iv, size_t niv,
|
/openbmc/linux/drivers/crypto/allwinner/sun8i-ss/ |
H A D | sun8i-ss.h | 192 int niv; member
|
H A D | sun8i-ss-cipher.c | 168 rctx->niv = i; in sun8i_ss_setup_ivs() 309 for (i = 0; i < rctx->niv; i++) { in sun8i_ss_cipher()
|