Closed Juanchen1190 closed 6 years ago
The gem doesn't support it as-is.
I think the only thing you need to modify is to change 20
to 8
(or 12
) in this line: https://github.com/dubek/salsa20-ruby/blob/master/ext/salsa20_ext/salsa20.c#L106 and rebuild the gem locally (simply run rake
from the project root directory).
But I can't easily find any test vectors for Salsa20/8 or Salsa20/12, so I'm not sure if that change is indeed the correct one.
It works, thank you very much.
For some reason, I would like to use the 8-round variant of Salsa20, but I didn't know how to do this with this gem.