miniBill/elm-salsa20/1.0.0

elm-salsa20 Build Status

elm-salsa20 is a pure Elm implementation of the Salsa20 encryption algorithm. It can be used both for encryption/decryption (using the Salsa20 module) and cryptographically secure random number generation.

It is mostly meant to be used in lamdera, on the backend, for cryptographically secure random number generation.

If you need cryptographically secure random numbers on the frontend you should use window.crypto.getRandomValues(), possibly via billstclair/elm-dev-random.

If you need encryption and decryption, you should libsodium, possibly using libsodium.js. Using encryption and decryption primitives directly is a recipe for insecurity. See, e.g., https://stackoverflow.com/a/58360477.