Simon Josefsson <si...@josefsson.org> writes:

> However, the Salsa20 stream cipher seems to use the core function with
> uint32_t inputs, and scrypt does too.  So perhaps we should expose a
> uint32_t->uint32_t interface as well that does no endian conversion.  It
> seems scrypt doesn't little endian convert inputs but expects the output
> uint32_t to be little endian converted though...  I'll bring this up
> with Colin.

Nope, I was mistaken.

Still it seems that an uint32_t->uint32_t interface without endian
conversion may be beneficial for speed.  Then scrypt won't have to
convert from uint32_t to uint8_t just to have salsa convert from uint8_t
to uint32_t back again, do the operation and convert it from uint32_t to
uint8_t and have scrypt convert it from uint8_t to uint32_t.  I haven't
measured how much overhead endian conversion really consumes though.

Do you think a uint32_t->uint32_t interface would be acceptable?
Externally the uint32 interface could be seen as a convenience function,
although internally it would be the core and the uint8_t interface would
just do endian conversion.

/Simon
_______________________________________________
nettle-bugs mailing list
nettle-bugs@lists.lysator.liu.se
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to