Home
last modified time | relevance | path

Searched refs:ivgen (Results 1 – 22 of 22) sorted by relevance

/qemu/crypto/
H A Divgen.c40 ivgen->hash = hash; in qcrypto_ivgen_new()
54 g_free(ivgen); in qcrypto_ivgen_new()
58 if (ivgen->driver->init(ivgen, key, nkey, errp) < 0) { in qcrypto_ivgen_new()
59 g_free(ivgen); in qcrypto_ivgen_new()
63 return ivgen; in qcrypto_ivgen_new()
72 return ivgen->driver->calculate(ivgen, sector, iv, niv, errp); in qcrypto_ivgen_calculate()
84 return ivgen->cipher; in qcrypto_ivgen_get_cipher()
90 return ivgen->hash; in qcrypto_ivgen_get_hash()
96 if (!ivgen) { in qcrypto_ivgen_free()
99 ivgen->driver->cleanup(ivgen); in qcrypto_ivgen_free()
[all …]
H A Divgen-essiv.c30 static int qcrypto_ivgen_essiv_init(QCryptoIVGen *ivgen, in qcrypto_ivgen_essiv_init() argument
40 nsalt = qcrypto_cipher_get_key_len(ivgen->cipher); in qcrypto_ivgen_essiv_init()
42 nhash = qcrypto_hash_digest_len(ivgen->hash); in qcrypto_ivgen_essiv_init()
46 if (qcrypto_hash_bytes(ivgen->hash, (const gchar *)key, nkey, in qcrypto_ivgen_essiv_init()
55 essiv->cipher = qcrypto_cipher_new(ivgen->cipher, in qcrypto_ivgen_essiv_init()
66 ivgen->private = essiv; in qcrypto_ivgen_essiv_init()
71 static int qcrypto_ivgen_essiv_calculate(QCryptoIVGen *ivgen, in qcrypto_ivgen_essiv_calculate() argument
76 QCryptoIVGenESSIV *essiv = ivgen->private; in qcrypto_ivgen_essiv_calculate()
77 size_t ndata = qcrypto_cipher_get_block_len(ivgen->cipher); in qcrypto_ivgen_essiv_calculate()
106 static void qcrypto_ivgen_essiv_cleanup(QCryptoIVGen *ivgen) in qcrypto_ivgen_essiv_cleanup() argument
[all …]
H A Dblock.c331 return block->ivgen; in qcrypto_block_get_ivgen()
362 qcrypto_ivgen_free(block->ivgen); in qcrypto_block_free()
376 QCryptoIVGen *ivgen, in do_qcrypto_block_cipher_encdec() argument
398 ret = qcrypto_ivgen_calculate(ivgen, startsector, iv, niv, errp); in do_qcrypto_block_cipher_encdec()
430 QCryptoIVGen *ivgen, 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()
445 QCryptoIVGen *ivgen, 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()
492 ret = do_qcrypto_block_cipher_encdec(cipher, block->niv, block->ivgen, in qcrypto_block_encrypt_helper()
H A Divgenpriv.h29 int (*init)(QCryptoIVGen *ivgen,
32 int (*calculate)(QCryptoIVGen *ivgen,
36 void (*cleanup)(QCryptoIVGen *ivgen);
H A Divgen-plain64.c25 static int qcrypto_ivgen_plain_init(QCryptoIVGen *ivgen, in qcrypto_ivgen_plain_init() argument
32 static int qcrypto_ivgen_plain_calculate(QCryptoIVGen *ivgen, in qcrypto_ivgen_plain_calculate() argument
50 static void qcrypto_ivgen_plain_cleanup(QCryptoIVGen *ivgen) in qcrypto_ivgen_plain_cleanup() argument
H A Divgen-plain.c25 static int qcrypto_ivgen_plain_init(QCryptoIVGen *ivgen, in qcrypto_ivgen_plain_init() argument
32 static int qcrypto_ivgen_plain_calculate(QCryptoIVGen *ivgen, in qcrypto_ivgen_plain_calculate() argument
50 static void qcrypto_ivgen_plain_cleanup(QCryptoIVGen *ivgen) in qcrypto_ivgen_plain_cleanup() argument
H A Dmeson.build12 'ivgen-essiv.c',
13 'ivgen-plain.c',
14 'ivgen-plain64.c',
15 'ivgen.c',
H A Dblockpriv.h44 QCryptoIVGen *ivgen; member
104 QCryptoIVGen *ivgen,
113 QCryptoIVGen *ivgen,
H A Dblock-qcow.c67 block->ivgen = qcrypto_ivgen_new(QCRYPTO_IV_GEN_ALGO_PLAIN64, in qcrypto_block_qcow_init()
69 if (!block->ivgen) { in qcrypto_block_qcow_init()
90 qcrypto_ivgen_free(block->ivgen); in qcrypto_block_qcow_init()
H A Dblock-luks.c717 g_autoptr(QCryptoIVGen) ivgen = NULL; in qcrypto_block_luks_store_key()
797 ivgen = qcrypto_ivgen_new(luks->ivgen_alg, in qcrypto_block_luks_store_key()
802 if (!ivgen) { in qcrypto_block_luks_store_key()
891 g_autoptr(QCryptoIVGen) ivgen = NULL; in qcrypto_block_luks_load_key()
951 ivgen = qcrypto_ivgen_new(luks->ivgen_alg, in qcrypto_block_luks_load_key()
957 if (!ivgen) { in qcrypto_block_luks_load_key()
971 ivgen, in qcrypto_block_luks_load_key()
1256 if (!block->ivgen) { in qcrypto_block_luks_open()
1279 qcrypto_ivgen_free(block->ivgen); in qcrypto_block_luks_open()
1471 if (!block->ivgen) { in qcrypto_block_luks_create()
[all …]
/qemu/include/crypto/
H A Divgen.h156 int qcrypto_ivgen_calculate(QCryptoIVGen *ivgen,
170 QCryptoIVGenAlgo qcrypto_ivgen_get_algorithm(QCryptoIVGen *ivgen);
182 QCryptoCipherAlgo qcrypto_ivgen_get_cipher(QCryptoIVGen *ivgen);
194 QCryptoHashAlgo qcrypto_ivgen_get_hash(QCryptoIVGen *ivgen);
204 void qcrypto_ivgen_free(QCryptoIVGen *ivgen);
/qemu/tests/unit/
H A Dtest-crypto-ivgen.c140 g_autoptr(QCryptoIVGen) ivgen = NULL; in test_ivgen()
147 ivgen = qcrypto_ivgen_new( in test_ivgen()
155 qcrypto_ivgen_calculate(ivgen, in test_ivgen()
H A Dtest-crypto-block.c251 QCryptoIVGen *ivgen; in test_block_assert_setup() local
254 ivgen = qcrypto_block_get_ivgen(blk); in test_block_assert_setup()
257 g_assert(ivgen); in test_block_assert_setup()
266 qcrypto_ivgen_get_algorithm(ivgen)); in test_block_assert_setup()
268 qcrypto_ivgen_get_hash(ivgen)); in test_block_assert_setup()
H A Dmeson.build93 'test-crypto-ivgen': [io],
/qemu/tests/qemu-iotests/
H A D14937 def __init__(self, name, cipher, keylen, mode, ivgen, argument
44 self.ivgen = ivgen
157 cipher = config.cipher + "-" + config.mode + "-" + config.ivgen
160 elif config.ivgen == "essiv":
253 "ivgen-alg=%s" % config.ivgen,
H A D210.out20 ivgen alg: plain64
63 …"TEST_DIR/PID-t.luks"}, "hash-alg": "sha1", "iter-time": 10, "ivgen-alg": "plain64", "ivgen-hash-a…
73 ivgen alg: plain64
129 ivgen alg: plain64
200 ivgen alg: plain64
H A D082.out63 encrypt.ivgen-alg=<str> - Name of IV generator algorithm
89 encrypt.ivgen-alg=<str> - Name of IV generator algorithm
115 encrypt.ivgen-alg=<str> - Name of IV generator algorithm
141 encrypt.ivgen-alg=<str> - Name of IV generator algorithm
167 encrypt.ivgen-alg=<str> - Name of IV generator algorithm
193 encrypt.ivgen-alg=<str> - Name of IV generator algorithm
219 encrypt.ivgen-alg=<str> - Name of IV generator algorithm
245 encrypt.ivgen-alg=<str> - Name of IV generator algorithm
286 encrypt.ivgen-alg=<str> - Name of IV generator algorithm
373 encrypt.ivgen-alg=<str> - Name of IV generator algorithm
[all …]
H A D198.out41 ivgen alg: plain64
87 ivgen alg: plain64
H A D206.out100 …cbc", "format": "luks", "hash-alg": "sha1", "iter-time": 10, "ivgen-alg": "plain64", "ivgen-hash-a…
116 ivgen alg: plain64
H A D149.out63 …base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain64,hash-a…
181 …64 -o key-secret=sec0,iter-time=10,cipher-alg=twofish-256,cipher-mode=xts,ivgen-alg=plain64,hash-a…
299 …64 -o key-secret=sec0,iter-time=10,cipher-alg=serpent-256,cipher-mode=xts,ivgen-alg=plain64,hash-a…
417 …se64 -o key-secret=sec0,iter-time=10,cipher-alg=cast5-128,cipher-mode=cbc,ivgen-alg=plain64,hash-a…
536 …base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=cbc,ivgen-alg=plain,hash-alg…
654 …base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=cbc,ivgen-alg=plain64,hash-a…
772 …ecret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=cbc,ivgen-alg=essiv,hash-alg=sha1,ivgen-has…
890 …ecret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=essiv,hash-alg=sha1,ivgen-has…
1601 …base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain64,hash-a…
2383 …base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=cbc,ivgen-alg=essiv,hash-alg…
[all …]
/qemu/qapi/
H A Dcrypto.json211 # @ivgen-alg: the initialization vector generator Currently defaults
214 # @ivgen-hash-alg: the initialization vector generator hash Currently
229 '*ivgen-alg': 'QCryptoIVGenAlgo',
230 '*ivgen-hash-alg': 'QCryptoHashAlgo',
305 # @ivgen-alg: the initialization vector generator
307 # @ivgen-hash-alg: the initialization vector generator hash
326 'ivgen-alg': 'QCryptoIVGenAlgo',
327 '*ivgen-hash-alg': 'QCryptoHashAlgo',
/qemu/docs/system/
H A Dqemu-block-drivers.rst.inc109 .. option:: encrypt.ivgen-alg
114 .. option:: encrypt.ivgen-hash-alg
267 .. option:: ivgen-alg
272 .. option:: ivgen-hash-alg