xemu/crypto
Alejandro Zeise e3c07527f3 crypto/hash: Implement and use new hash API
Changes the public hash API implementation to support accumulative hashing.

Implementations for the public functions are added to call the new
driver functions that implement context creation, updating,
finalization, and destruction.

Additionally changes the "shortcut" functions to use these 4 new core
functions.

Signed-off-by: Alejandro Zeise <alejandro.zeise@seagate.com>
[ clg: - Reworked qcrypto_hash_bytesv() error handling
       - Used hash->driver int qcrypto_hash_new(), qcrypto_hash_free()
         qcrypto_hash_updatev()
       - Introduced qcrypto_hash_supports() check in
         qcrypto_hash_new()
       - Introduced g_autofree variables in qcrypto_hash_finalize_digest()
         and qcrypto_hash_finalize_base64()
       - Re-arrranged code in qcrypto_hash_digestv() and
         qcrypto_hash_digest()
       - Checkpatch fixes ]
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-10-10 12:33:40 +01:00
..
aes.c target/riscv: Use existing lookup tables for MixColumns 2023-09-11 11:45:54 +10:00
afalg.c qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo 2024-09-10 14:03:30 +02:00
afalgpriv.h qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo 2024-09-10 14:03:30 +02:00
afsplit.c qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix 2024-09-10 14:02:16 +02:00
akcipher-gcrypt.c.inc qapi/crypto: Rename QCryptoRSAPaddingAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
akcipher-nettle.c.inc qapi/crypto: Rename QCryptoRSAPaddingAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
akcipher.c qapi/crypto: Rename QCryptoAkCipherAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
akcipherpriv.h qapi/crypto: Rename QCryptoAkCipherAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
block-luks-priv.h crypto: Clean up includes 2023-02-08 07:16:23 +01:00
block-luks.c qapi/crypto: Rename QCryptoIVGenAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
block-luks.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
block-qcow.c qapi/crypto: Rename QCryptoIVGenAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
block-qcow.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
block.c qapi/crypto: Rename QCryptoCipherAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
blockpriv.h qapi/crypto: Rename QCryptoCipherAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
cipher-afalg.c qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo 2024-09-10 14:03:30 +02:00
cipher-builtin.c.inc qapi/crypto: Rename QCryptoCipherAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
cipher-gcrypt.c.inc qapi/crypto: Rename QCryptoCipherAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
cipher-gnutls.c.inc qapi/crypto: Rename QCryptoCipherAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
cipher-nettle.c.inc qapi/crypto: Rename QCryptoCipherAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
cipher.c qapi/crypto: Rename QCryptoCipherAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
cipherpriv.h qapi/crypto: Rename QCryptoCipherAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
clmul.c crypto: Add generic 64-bit carry-less multiply routine 2023-09-15 13:57:00 +00:00
der.c misc/other: spelling fixes 2023-09-08 13:08:52 +03:00
der.h misc/other: spelling fixes 2023-09-08 13:08:52 +03:00
hash-afalg.c crypto/hash-afalg: Implement new hash API 2024-10-10 12:33:35 +01:00
hash-gcrypt.c crypto/hash-gcrypt: Implement new hash API 2024-10-10 12:33:14 +01:00
hash-glib.c crypto/hash-glib: Implement new hash API 2024-10-10 12:33:08 +01:00
hash-gnutls.c crypto/hash-gnutls: Implement new hash API 2024-10-10 12:33:21 +01:00
hash-nettle.c crypto/hash-nettle: Implement new hash API 2024-10-10 12:33:26 +01:00
hash.c crypto/hash: Implement and use new hash API 2024-10-10 12:33:40 +01:00
hashpriv.h crypto: accumulative hashing API 2024-10-10 12:32:59 +01:00
hmac-gcrypt.c qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix 2024-09-10 14:02:16 +02:00
hmac-glib.c qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix 2024-09-10 14:02:16 +02:00
hmac-gnutls.c qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix 2024-09-10 14:02:16 +02:00
hmac-nettle.c qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix 2024-09-10 14:02:16 +02:00
hmac.c qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix 2024-09-10 14:02:16 +02:00
hmacpriv.h qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo 2024-09-10 14:03:30 +02:00
init.c crypto: drop gnutls debug logging support 2024-07-24 10:39:10 +01:00
ivgen-essiv.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
ivgen-essiv.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
ivgen-plain.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
ivgen-plain.h Clean up ill-advised or unusual header guards 2022-05-11 16:50:01 +02:00
ivgen-plain64.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
ivgen-plain64.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
ivgen.c qapi/crypto: Rename QCryptoIVGenAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
ivgenpriv.h qapi/crypto: Rename QCryptoIVGenAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
meson.build crypto: Introduce x509 utils 2024-09-09 15:13:38 +01:00
pbkdf-gcrypt.c qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix 2024-09-10 14:02:16 +02:00
pbkdf-gnutls.c qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix 2024-09-10 14:02:16 +02:00
pbkdf-nettle.c qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix 2024-09-10 14:02:16 +02:00
pbkdf-stub.c qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix 2024-09-10 14:02:16 +02:00
pbkdf.c qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix 2024-09-10 14:02:16 +02:00
random-gcrypt.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
random-gnutls.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
random-none.c crypto: add "none" random provider 2020-06-15 11:33:50 +01:00
random-platform.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
rsakey-builtin.c.inc qapi/crypto: Drop unwanted 'prefix' 2024-09-10 13:22:47 +02:00
rsakey-nettle.c.inc qapi/crypto: Drop unwanted 'prefix' 2024-09-10 13:22:47 +02:00
rsakey.c crypto: Support export akcipher to pkcs8 2022-11-02 06:56:32 -04:00
rsakey.h crypto: Support export akcipher to pkcs8 2022-11-02 06:56:32 -04:00
secret.c crypto: Move USER_CREATABLE to secret_common base class 2021-01-29 17:07:53 +00:00
secret_common.c qapi/crypto: Rename QCryptoCipherAlgorithm to *Algo, and drop prefix 2024-09-10 14:03:30 +02:00
secret_keyring.c crypto: Move USER_CREATABLE to secret_common base class 2021-01-29 17:07:53 +00:00
sm4.c crypto: Add SM4 constant parameter CK 2023-09-11 11:45:55 +10:00
tls-cipher-suites.c crypto: remove shadowed 'ret' variable 2023-09-29 10:07:20 +02:00
tlscreds.c crypto/tlscreds: Introduce qcrypto_tls_creds_check_endpoint() helper 2021-06-29 18:29:43 +01:00
tlscredsanon.c crypto: make loaded property read-only 2022-05-14 12:33:44 +02:00
tlscredspriv.h crypto: Make QCryptoTLSCreds* structures private 2021-06-29 18:30:24 +01:00
tlscredspsk.c crypto/tlscredspsk: Free username on finalize 2024-08-20 00:49:14 +02:00
tlscredsx509.c crypto: make loaded property read-only 2022-05-14 12:33:44 +02:00
tlssession.c crypto: propagate errors from TLS session I/O callbacks 2024-07-24 10:39:10 +01:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
x509-utils.c qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix 2024-09-10 14:02:16 +02:00
xts.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00