/qemu/crypto/ |
H A D | ivgen.c | 40 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 D | ivgen-essiv.c | 30 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 D | block.c | 331 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 D | ivgenpriv.h | 29 int (*init)(QCryptoIVGen *ivgen, 32 int (*calculate)(QCryptoIVGen *ivgen, 36 void (*cleanup)(QCryptoIVGen *ivgen);
|
H A D | ivgen-plain64.c | 25 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 D | ivgen-plain.c | 25 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 D | meson.build | 12 'ivgen-essiv.c', 13 'ivgen-plain.c', 14 'ivgen-plain64.c', 15 'ivgen.c',
|
H A D | blockpriv.h | 44 QCryptoIVGen *ivgen; member 104 QCryptoIVGen *ivgen, 113 QCryptoIVGen *ivgen,
|
H A D | block-qcow.c | 67 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 D | block-luks.c | 717 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 D | ivgen.h | 156 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 D | test-crypto-ivgen.c | 140 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 D | test-crypto-block.c | 251 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 D | meson.build | 93 'test-crypto-ivgen': [io],
|
/qemu/tests/qemu-iotests/ |
H A D | 149 | 37 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 D | 210.out | 20 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 D | 082.out | 63 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 D | 198.out | 41 ivgen alg: plain64 87 ivgen alg: plain64
|
H A D | 206.out | 100 …cbc", "format": "luks", "hash-alg": "sha1", "iter-time": 10, "ivgen-alg": "plain64", "ivgen-hash-a… 116 ivgen alg: plain64
|
H A D | 149.out | 63 …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 D | crypto.json | 211 # @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 D | qemu-block-drivers.rst.inc | 109 .. option:: encrypt.ivgen-alg 114 .. option:: encrypt.ivgen-hash-alg 267 .. option:: ivgen-alg 272 .. option:: ivgen-hash-alg
|