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

>> +void
>> +salsa20_core (uint8_t *dst,
>> +          const uint8_t *src,
>> +          unsigned rounds)
>
> is not ideal -- the reason is that the Salsa20 core is not defined with
> a parametrised number of rounds, so the interface is somewhat of a
> bastardisation.

Naming is difficult, it's awkward to use the prefix "salsa20" for a
function which is "salsa20, but not really 20"... In sed syntax it would
be salsa20_sx20xrx ;-)

> In my work space, I have used the namespace 'salsa20r_core' instead.
> This opens up for later addition of a true 'salsa20_core' function which
> would use the official 20 rounds.
>
> What do you think?

I have no better suggestions for naming. But if we think of
salsa20r_core as mostly for internal use, maybe we don't need it?

If I understood you correctly, your primary use case is scrypt, which
you intend to implement in Nettle? Then maybe you would be better off
without an extra wrapper function around _salsa20_core? If nothing else,
you could then make sure you have proper alignment so you don't need an
extra memcpy.

I hesitate a bit to add, document and support a new "obscure" function
until there's a clear external use case.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
_______________________________________________
nettle-bugs mailing list
nettle-bugs@lists.lysator.liu.se
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to