qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/crypto: add Allwinner sun4i-ss crypto device


From: Daniel P . Berrangé
Subject: Re: [PATCH] hw/crypto: add Allwinner sun4i-ss crypto device
Date: Mon, 25 Apr 2022 15:29:32 +0100
User-agent: Mutt/2.1.5 (2021-12-30)

On Mon, Apr 25, 2022 at 03:03:11PM +0200, LABBE Corentin wrote:
> diff --git a/crypto/hash-nettle.c b/crypto/hash-nettle.c
> index 1ca1a41062..b9342b4fe1 100644
> --- a/crypto/hash-nettle.c
> +++ b/crypto/hash-nettle.c
> @@ -26,10 +26,22 @@
>  #include <nettle/sha.h>
>  #include <nettle/ripemd160.h>
>  
> +#ifndef nettle_sha256_compress
> +#define nettle_sha256_compress _nettle_sha256_compress
> +void _nettle_sha256_compress(uint32_t *state, const uint8_t *input, const 
> uint32_t *k);
> +#endif
> +
> +#ifndef nettle_sha512_compress
> +#define nettle_sha512_compress _nettle_sha512_compress
> +void _nettle_sha512_compress(uint32_t *state, const uint8_t *input, const 
> uint32_t *k);
> +#endif

The 'nettle_sha256_compress' function doesn't exist in any header file
from nettle that I've looked at.

The '_nettle_sha256_compress' function exists as a symbol in the .so
library, but it is clearly not intended for public usage:

$ nm -a -D /usr/lib64/libnettle.so | grep sha256_compress
0000000000027730 T _nettle_sha256_compress@@NETTLE_INTERNAL_8_4

So this #define magic is definitely not something we can do.

IOW, unless I'm missing something, I don't think we can even
use nettle for your desired goal, which leaves us no impl at
all.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]