Silicon is another wrapper of Elixir/Erlang crypto packages.
The package can be installed by adding silicon to your list of dependencies in mix.exs:
def deps do
[
{:silicon, "~> 0.1.0"}
]
endThe docs can be found at https://hexdocs.pm/silicon.
We wrapped the packages below:
{:libdecaf, "~> 1.0"}for Ed25519 and SHA3{:keccakf1600, "~> 2.0", hex: :keccakf1600_orig}for Keccak Origin{:libsecp256k1, "~> 0.1.10"}for Secp256k1{:blake2_elixir, git: "https://github.com/riverrun/blake2_elixir.git"}for Blake2b:cryptofor others
We added lots of extra test vectors to test against the methods exposed by silicon
- AES-CBC:
https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/block-ciphers#AES - AES-CBC-PKCS7:
https://raw.githubusercontent.com/google/wycheproof/master/testvectors/aes_cbc_pkcs5_test.json - AES-GCM:
https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/CAVP-TESTING-BLOCK-CIPHER-MODES#GCMVS - AES-CTR: Got from
https://github.com/pyca/cryptography, which is the test vectors from RFC 3686
- SHA3:
https://csrc.nist.gov/Projects/cryptographic-algorithm-validation-program/Secure-Hashing - Keccak origin:
https://keccak.team/archives.htmlKnown-answer and Monte Carlo test results part - Blake2b:
https://github.com/jedisct1/crypto-test-vectorsandhttps://pynacl.readthedocs.io/en/latest/vectors/blake2_vectors/ - MD5/SHA2:
https://cryptii.com - HASH160:
https://bitcoinprices.org/public-key-to-hash/ - RIPEMD160:
https://www.browserling.com/tools/ripemd160-hash
- HMAC_SHA256/SHA512:
https://cryptii.com
https://ed25519.cr.yp.to/python/sign.input
https://github.com/btccom/secp256k1-gohttps://github.com/google/wycheproof/tree/master/testvectors
For wycheproof test vectors, We only test against ecdh vectors. For ecdsa tests, some cases might fail because that the Bitcoin-Secp256k1 seems more strict. See an example here. We don't have a good way to distinguish those cases now.