Hello, Would it be possible to export _nettle_write_be32? It is a useful function and can be used on the accelerated versions of SHA in architectures that support it (i.e. VIA cpus). I currently include a copy of it, but would be nice if it was exported from the nettle API as well.
btw. the MD_* macros were also proved to be very useful in that case.
regards, Nikos
Nikos Mavrogiannopoulos nmav@gnutls.org writes:
Would it be possible to export _nettle_write_be32?
This function is simple enough that it can be documented and made public, if people find it useful.
It is a useful function and can be used on the accelerated versions of SHA in architectures that support it (i.e. VIA cpus).
BTW, how does that acceleration work? Would it be possible/practical to write a function matching the current _nettle_sha1_compress.
btw. the MD_* macros were also proved to be very useful in that case.
These macros are really intended for internal use only. I'd prefer to not export any interfaces like that. If functionality like this should be exported at all, I'd be more comfortable with a function interface for doing these things.
Regards, /Niels
On Wed, Oct 26, 2011 at 10:16 AM, Niels Möller nisse@lysator.liu.se wrote:
It is a useful function and can be used on the accelerated versions of SHA in architectures that support it (i.e. VIA cpus).
BTW, how does that acceleration work? Would it be possible/practical to write a function matching the current _nettle_sha1_compress.
The new VIA CPUs (e.g. nano) provide the compression function, i.e. the fourth argument in MD_UPDATE. Older models (C5,C7) provide a full compression functionality. I.e. sha1(x) and you get the result, which proved not to be entirely useful.
btw. the MD_* macros were also proved to be very useful in that case.
These macros are really intended for internal use only. I'd prefer to not export any interfaces like that. If functionality like this should be exported at all, I'd be more comfortable with a function interface for doing these things.
Aren't they already exported in macros.h?
regards, Nikos
Nikos Mavrogiannopoulos nmav@gnutls.org writes:
Aren't they already exported in macros.h?
It seems you're right, in that macros.h is actually installed in $includedir/nettle (unlike, e.g., nettle-internal.h). I must have forgotten that when I put the MD_* definitions in that file... In any case, they're undocumented, and I won't promise any backwards compatibility in future versions.
Maybe the internal-use things in macros.h ought to be moved to some uninstalled *-internal.h file. The *READ_* and *WRITE_* macros should stay in macros.h, but everything else there is a bit questionable.
Regards, /Niels
On Wed, Oct 26, 2011 at 11:21 AM, Niels Möller nisse@lysator.liu.se wrote:
Aren't they already exported in macros.h?
It seems you're right, in that macros.h is actually installed in $includedir/nettle (unlike, e.g., nettle-internal.h). I must have forgotten that when I put the MD_* definitions in that file... In any case, they're undocumented, and I won't promise any backwards compatibility in future versions.
Since those are macros it wouldn't matter for binary compatibility so it would be ok. If you remove them I'll duplicate it in gnutls.
regards, Nikos
nettle-bugs@lists.lysator.liu.se