RE: [PATCH v4 03/15] crypto/hash-gcrypt: Implement new hash API

2024-08-08 Thread Alejandro Zeise
> On Wed, Aug 07, 2024 at 07:51:10PM +0000, Alejandro Zeise wrote: > > Implements the new hashing API in the gcrypt hash driver. > > Supports creating/destroying a context, updating the context with > > input data and obtaining an output hash. > > > &g

RE: [PATCH v4 00/15] hw/misc/aspeed_hace: Fix SG Accumulative Hash Calculations

2024-08-07 Thread Alejandro Zeise
Hi Phil, > This message has originated from an External Source. Please use proper > judgment and caution when opening attachments, clicking links, or responding > to this email. > > > Hi Alejandro, > > On 7/8/24 21:51, Alejandro Zeise wrote: > > The goal

[PATCH v4 01/15] crypto: accumulative hashing API

2024-08-07 Thread Alejandro Zeise
Changes the hash API to support accumulative hashing. Hash objects are created with "qcrypto_hash_new", updated with data with "qcrypto_hash_update", and the hash obtained with "qcrypto_hash_finalize". These changes bring the hashing API more in line with the hmac

[PATCH v4 15/15] hw/misc/aspeed_hace: Fix SG Accumulative hashing

2024-08-07 Thread Alejandro Zeise
es/36 Signed-off-by: Alejandro Zeise --- hw/misc/aspeed_hace.c | 94 +++ include/hw/misc/aspeed_hace.h | 4 ++ 2 files changed, 54 insertions(+), 44 deletions(-) diff --git a/hw/misc/aspeed_hace.c b/hw/misc/aspeed_hace.c index c06c04ddc6..4247403d45

[PATCH v4 10/15] crypto/hash-gcrypt: Remove old hash API functions

2024-08-07 Thread Alejandro Zeise
Removes old hash implemention in the gcrypt hash driver. Signed-off-by: Alejandro Zeise --- crypto/hash-gcrypt.c | 67 1 file changed, 67 deletions(-) diff --git a/crypto/hash-gcrypt.c b/crypto/hash-gcrypt.c index e05511cafa..7779ec8446 100644 --- a

[PATCH v4 11/15] crypto/hash-gnutls: Remove old hash API functions

2024-08-07 Thread Alejandro Zeise
Removes old hash implemention in the gnutls hash driver. Signed-off-by: Alejandro Zeise --- crypto/hash-gnutls.c | 47 1 file changed, 47 deletions(-) diff --git a/crypto/hash-gnutls.c b/crypto/hash-gnutls.c index 15fc630a11..0c24b0eb66 100644 --- a

[PATCH v4 14/15] crypto/hashpriv: Remove old hash API function

2024-08-07 Thread Alejandro Zeise
Remove old hash_bytesv function, as it was replaced by the 4 new functions. Signed-off-by: Alejandro Zeise --- crypto/hashpriv.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/crypto/hashpriv.h b/crypto/hashpriv.h index 02f17ee99f..aec29b3ec3 100644 --- a/crypto/hashpriv.h +++ b

[PATCH v4 06/15] crypto/hash-afalg: Implement new hash API

2024-08-07 Thread Alejandro Zeise
send call (MSG_MORE) to notify it that more data is to be expected to calculate the hash correctly. As a result, a new function was added to the iov helper utils to allow passing a flag to the socket send call. Signed-off-by: Alejandro Zeise --- crypto/hash-afalg.c | 126

[PATCH v4 07/15] crypto/hash: Implement and use new hash API

2024-08-07 Thread Alejandro Zeise
se these 4 new core functions. Signed-off-by: Alejandro Zeise --- crypto/hash.c | 163 +++--- 1 file changed, 128 insertions(+), 35 deletions(-) diff --git a/crypto/hash.c b/crypto/hash.c index b0f8228bdc..f3c18cdd74 100644 --- a/crypto/hash.c +++ b/cry

[PATCH v4 03/15] crypto/hash-gcrypt: Implement new hash API

2024-08-07 Thread Alejandro Zeise
Implements the new hashing API in the gcrypt hash driver. Supports creating/destroying a context, updating the context with input data and obtaining an output hash. Signed-off-by: Alejandro Zeise --- crypto/hash-gcrypt.c | 79 1 file changed, 79

[PATCH v4 04/15] crypto/hash-gnutls: Implement new hash API

2024-08-07 Thread Alejandro Zeise
Implements the new hashing API in the gnutls hash driver. Supports creating/destroying a context, updating the context with input data and obtaining an output hash. Signed-off-by: Alejandro Zeise --- crypto/hash-gnutls.c | 73 1 file changed, 73

[PATCH v4 12/15] crypto/hash-nettle: Remove old hash API functions

2024-08-07 Thread Alejandro Zeise
Removes old hash implemention in the nettle hash driver. Signed-off-by: Alejandro Zeise --- crypto/hash-nettle.c | 53 1 file changed, 53 deletions(-) diff --git a/crypto/hash-nettle.c b/crypto/hash-nettle.c index 894c7b4fc3..bd489f865e 100644 --- a

[PATCH v4 05/15] crypto/hash-nettle: Implement new hash API

2024-08-07 Thread Alejandro Zeise
Implements the new hashing API in the nettle hash driver. Supports creating/destroying a context, updating the context with input data and obtaining an output hash. Signed-off-by: Alejandro Zeise --- crypto/hash-nettle.c | 77 1 file changed, 77

[PATCH v4 13/15] crypto/hash-afalg: Remove old hash API functions

2024-08-07 Thread Alejandro Zeise
Removes the old hash API functions in the afalg driver, and modifies the hmac function to use the new helper functions. Signed-off-by: Alejandro Zeise --- crypto/hash-afalg.c | 59 +++-- 1 file changed, 3 insertions(+), 56 deletions(-) diff --git a

[PATCH v4 08/15] tests/unit/test-crypto-hash: accumulative hashing

2024-08-07 Thread Alejandro Zeise
Added an accumulative hashing test. Checks for functionality of the new hash create, update, finalize and free functions. Signed-off-by: Alejandro Zeise --- tests/unit/test-crypto-hash.c | 48 +++ 1 file changed, 48 insertions(+) diff --git a/tests/unit/test

[PATCH v4 09/15] crypto/hash-glib: Remove old hash API functions

2024-08-07 Thread Alejandro Zeise
Removes old hash implemention in the GLib hash driver. Signed-off-by: Alejandro Zeise --- crypto/hash-glib.c | 53 -- 1 file changed, 53 deletions(-) diff --git a/crypto/hash-glib.c b/crypto/hash-glib.c index 9f4490762a..d1dc00547d 100644 --- a

[PATCH v4 02/15] crypto/hash-glib: Implement new hash API

2024-08-07 Thread Alejandro Zeise
Implements the new hashing API in the GLib hash driver. Supports creating/destroying a context, updating the context with input data and obtaining an output hash. Signed-off-by: Alejandro Zeise --- crypto/hash-glib.c | 77 ++ 1 file changed, 77

[PATCH v4 00/15] hw/misc/aspeed_hace: Fix SG Accumulative Hash Calculations

2024-08-07 Thread Alejandro Zeise
Fixed bug in HACE module where hash context fails to allocate, causing the HACE internal state to be incorrect and segfault. Changes in V2: * Fixed error checking bug in libgcrypt crypto backend of accumulate_bytesv Alejandro Zeise (15): crypto: accumulative hashing API crypto/hash-glib:

RE: [PATCH v3 00/12] hw/misc/aspeed_hace: Fix SG Accumulative Hash Calculations

2024-08-06 Thread Alejandro Zeise
> To allow 'make check' to succeed at every individual patch, you'll need to > re-order these, and split a couple of patches, to be more or less like this: > > crypto: accumulative hashing API (only define new driver APIs & new public > APIs here) > crypto/hash-glib: Implement new hash API >

[PATCH v3 09/12] crypto/hash-nettle: Implement new hash API

2024-08-05 Thread Alejandro Zeise
Implements the new hashing API in the nettle hash driver. Supports creating/destroying a context, updating the context with input data and obtaining an output hash. Signed-off-by: Alejandro Zeise --- crypto/hash-nettle.c | 81 1 file changed, 81

[PATCH v3 05/12] crypto/hash-gcrypt: Implement new hash API

2024-08-05 Thread Alejandro Zeise
Implements the new hashing API in the gcrypt hash driver. Supports creating/destroying a context, updating the context with input data and obtaining an output hash. Signed-off-by: Alejandro Zeise --- crypto/hash-gcrypt.c | 78 1 file changed, 78

[PATCH v3 11/12] tests/unit/test-crypto-hash: accumulative hashing

2024-08-05 Thread Alejandro Zeise
Added an accumulative hashing test. Checks for functionality of the new hash create, update, finalize and free functions. Signed-off-by: Alejandro Zeise --- tests/unit/test-crypto-hash.c | 50 +++ 1 file changed, 50 insertions(+) diff --git a/tests/unit/test

[PATCH v3 12/12] hw/misc/aspeed_hace: Fix SG Accumulative hashing

2024-08-05 Thread Alejandro Zeise
es/36 Signed-off-by: Alejandro Zeise --- hw/misc/aspeed_hace.c | 92 ++- include/hw/misc/aspeed_hace.h | 4 ++ 2 files changed, 52 insertions(+), 44 deletions(-) diff --git a/hw/misc/aspeed_hace.c b/hw/misc/aspeed_hace.c index c06c04ddc6..5077204ee6

[PATCH v3 01/12] crypto: accumulative hashing API

2024-08-05 Thread Alejandro Zeise
Changes the hash API to support accumulative hashing. Hash objects are created with "qcrypto_hash_new", updated with data with "qcrypto_hash_update", and the hash obtained with "qcrypto_hash_finalize". These changes bring the hashing API more in line with the hmac

[PATCH v3 06/12] crypto/hash-gnutls: Remove old hash API

2024-08-05 Thread Alejandro Zeise
Removes old implemention in the gnutls hash driver. Will be replaced with a new implementation in accordance with the accumulative hashing changes in the patch series. Signed-off-by: Alejandro Zeise --- crypto/hash-gnutls.c | 46 +--- 1 file changed, 1

[PATCH v3 10/12] crypto/hash-afalg: Update to new API

2024-08-05 Thread Alejandro Zeise
Updates the AFAlg hash driver to support the new accumulative hashing changes as part of the patch series. Implements opening/closing of contexts, updating hash data and finalizing the hash digest. Signed-off-by: Alejandro Zeise --- crypto/hash-afalg.c | 154

[PATCH v3 07/12] crypto/hash-gnutls: Implement new hash API

2024-08-05 Thread Alejandro Zeise
Implements the new hashing API in the gnutls hash driver. Supports creating/destroying a context, updating the context with input data and obtaining an output hash. Signed-off-by: Alejandro Zeise --- crypto/hash-gnutls.c | 76 1 file changed, 76

[PATCH v3 08/12] crypto/hash-nettle: Remove old hash API

2024-08-05 Thread Alejandro Zeise
Removes old implemention in the nettle hash driver. Will be replaced with a new implementation in accordance with the accumulative hashing changes in the patch series. Signed-off-by: Alejandro Zeise --- crypto/hash-nettle.c | 52 +--- 1 file changed, 1

[PATCH v3 00/12] hw/misc/aspeed_hace: Fix SG Accumulative Hash Calculations

2024-08-05 Thread Alejandro Zeise
ixed error checking bug in libgcrypt crypto backend of accumulate_bytesv Alejandro Zeise (12): crypto: accumulative hashing API crypto/hash-glib: Remove old hash API implementation crypto/hash-glib: Implement new hash API crypto/hash-gcrypt: Remove old hash API implementation crypto/h

[PATCH v3 03/12] crypto/hash-glib: Implement new hash API

2024-08-05 Thread Alejandro Zeise
Implements the new hashing API in the GLib hash driver. Supports creating/destroying a context, updating the context with input data and obtaining an output hash. Signed-off-by: Alejandro Zeise --- crypto/hash-glib.c | 77 +- 1 file changed, 76

[PATCH v3 04/12] crypto/hash-gcrypt: Remove old hash API implementation

2024-08-05 Thread Alejandro Zeise
Removes old implemention in the gcrypt hash driver. Will be replaced with a new implementation in accordance with the accumulative hashing changes in the patch series. Signed-off-by: Alejandro Zeise --- crypto/hash-gcrypt.c | 66 +--- 1 file changed, 1

[PATCH v3 02/12] crypto/hash-glib: Remove old hash API implementation

2024-08-05 Thread Alejandro Zeise
Removes old implemention in the GLib hash driver. Will be replaced with a new implementation in accordance with the accumulative hashing changes in the patch series. Signed-off-by: Alejandro Zeise --- crypto/hash-glib.c | 53 ++ 1 file changed, 2

RE: [PATCH v2 2/2] hw/misc/aspeed_hace: Fix SG Accumulative hashing

2024-07-30 Thread Alejandro Zeise
Hello Cédric, > -Original Message- > From: Cédric Le Goater > Sent: Tuesday, July 30, 2024 5:55 AM > To: Alejandro Zeise ; qemu-...@nongnu.org > Cc: qemu-devel@nongnu.org; peter.mayd...@linaro.org; berra...@redhat.com > Subject: Re: [PATCH v2 2/2] hw/misc/a

[PATCH v2 2/2] hw/misc/aspeed_hace: Fix SG Accumulative hashing

2024-07-29 Thread Alejandro Zeise
es/36 Signed-off-by: Alejandro Zeise --- hw/misc/aspeed_hace.c | 91 ++- include/hw/misc/aspeed_hace.h | 4 ++ 2 files changed, 51 insertions(+), 44 deletions(-) diff --git a/hw/misc/aspeed_hace.c b/hw/misc/aspeed_hace.c index c06c04ddc6..8306d8986a

[PATCH v2 1/2] crypto: add support for accumulative hashing

2024-07-29 Thread Alejandro Zeise
Signed-off-by: Alejandro Zeise --- crypto/hash-gcrypt.c | 105 ++ crypto/hash-glib.c| 89 +++ crypto/hash-gnutls.c | 82 + crypto/hash-nettle.c | 93 +++

[PATCH v2 0/2] hw/misc/aspeed_hace: Fix SG Accumulative Hash Calculations

2024-07-29 Thread Alejandro Zeise
cumulative hashing functions All the crypto library backends (nettle, gnutls, etc.) support accumulative hashing, so it was trivial to create wrappers for those functions. Changes in V2: * Fixed error checking bug in libgcrypt crypto backend of accumulate_bytesv Alejandro Zeise (2): crypto: add s

[PATCH 1/2] crypto: add support for accumulative hashing

2024-07-22 Thread Alejandro Zeise
) are unable to perform such operations correctly when the guest requires it. The creation and freeing of each library's context is abstracted by the qcrypto_hash_accumulate_new_ctx and qcrypto_hash_accumulate_free_ctx functions. Signed-off-by: Alejandro Zeise --- crypto/hash-gcryp

[PATCH 0/2] hw/misc/aspeed_hace: Fix SG Accumulative Hash Calculations

2024-07-22 Thread Alejandro Zeise
cumulative hashing functions All the crypto library backends (nettle, gnutls, etc.) support accumulative hashing, so it was trivial to create wrappers for those functions. Alejandro Zeise (2): crypto: add support for accumulative hashing hw/misc/aspeed_hace: Fix SG Accumulative hashing c

[PATCH 2/2] hw/misc/aspeed_hace: Fix SG Accumulative hashing

2024-07-22 Thread Alejandro Zeise
es/36 Signed-off-by: Alejandro Zeise --- hw/misc/aspeed_hace.c | 91 ++- include/hw/misc/aspeed_hace.h | 4 ++ 2 files changed, 51 insertions(+), 44 deletions(-) diff --git a/hw/misc/aspeed_hace.c b/hw/misc/aspeed_hace.c index c06c04ddc6..8306d8986a