Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using anything but aes_256 as the key fails #22

Open
zacksiri opened this issue Mar 2, 2018 · 3 comments
Open

using anything but aes_256 as the key fails #22

zacksiri opened this issue Mar 2, 2018 · 3 comments

Comments

@zacksiri
Copy link

zacksiri commented Mar 2, 2018

I'm trying to do basic AES encryption on some text

{:ok, aes_128_key} = ExCrypto.generate_aes_key(:aes_128, :bytes)
{:ok, {_iv, cipher_text}} = ExCrypto.encrypt(aes_128_key, "hi")

and I'm getting this error

** (MatchError) no match of right hand side value: %ErlangError{original: :notsup}
    (ex_crypto) lib/ex_crypto.ex:28: ExCrypto.normalize_error/3

If I use aes_256 everything works.

@milica-nerlovic
Copy link

I've encountered the same problem recently. Have you had any luck in figuring out the cause, @zacksiri?

@ntrepid8
Copy link
Owner

I think that's an error that bubbled up from the underlying crypto library. What sort of environment are you running in?

@milica-nerlovic
Copy link

Yes, 👍 I also found some note about this in the Erlang crypto docs.

Ubuntu 14.04.5 LTS
OpenSSL 1.1.1
Erlang/OTP 21
Elixir 1.7.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants