In order to be compatible with the original Haskell Constellation, we used Sodium crypto library (libsodium) to provide the encryption primitives.
To use this, you will first need to install libsodium on your machine.
Download the latest stable version of libsodium tarball and then execute:
./configure
make && make check
sudo make install
You can install using homebrew:
brew install libsodium
For more information on how to install libsodium on your system check the libsodium installation docs.
Why was lib sodium used for the cryptographic primitives (and not bouncy castle)?
The primary reason it was chosen was to provide compatibility with Constellation. Constellation uses the primitives provided by lib sodium, in particular the elliptic curve X25519, the XSalsa20 stream cipher, and Poly1305 MAC
While bouncycastle does provide an implementation of the curve (X25519), it does so in the short-Weierstrass form, requiring point conversions to interoperate with the lib sodium implementation.
Additionally lib sodium is used to provide an implementation of the Argon2 password hashing function used to secure the private keys used with Orion.