> 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
> 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
>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 +++
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
) 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
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
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
39 matches
Mail list logo