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

Breaks on OTP Release 24 #43

Open
CamelCafeRider opened this issue Nov 2, 2021 · 17 comments
Open

Breaks on OTP Release 24 #43

CamelCafeRider opened this issue Nov 2, 2021 · 17 comments

Comments

@CamelCafeRider
Copy link

iex(4)> System.otp_release()
"24"
iex(5)> clear_text = "my-clear-text"
"my-clear-text"
iex(6)> auth_data = "my-auth-data"
"my-auth-data"
iex(7)> {:ok, aes_256_key} = ExCrypto.generate_aes_key(:aes_256, :bytes)
{:ok,
<<16, 212, 156, 208, 202, 106, 240, 39, 18, 138, 213, 17, 35, 15, 50, 53, 156,
60, 141, 243, 97, 61, 145, 27, 178, 31, 106, 172, 167, 224, 213, 119>>}
iex(8)> {:ok, {ad, {init_vec, cipher_text, cipher_tag}}} = ExCrypto.encrypt(aes_256_key, auth_data, clear_text)
** (UndefinedFunctionError) function :crypto.block_encrypt/4 is undefined or private, use crypto:crypto_one_time/5, crypto:crypto_one_time_aead/6,7 or crypto:crypto
(dyn_iv)?init + crypto:crypto(dyn_iv)?_update + crypto:crypto_final instead
(crypto 5.0.2) :crypto.block_encrypt(:aes_gcm, <<16, 212, 156, 208, 202, 106, 240, 39, 18, 138, 213, 17, 35, 15, 50, 53, 156, 60, 141, 243, 97, 61, 145, 27, 178, 31, 106, 172, 167, 224, 213, 119>>, <<75, 167, 47, 63, 228, 39, 177, 233, 98, 107, 47, 119, 119, 193, 82, 54>>, {"my-auth-data", "my-clear-text"})
(ex_crypto 0.10.0) lib/ex_crypto.ex:317: ExCrypto._encrypt/4

@dynamite-ready
Copy link

dynamite-ready commented Nov 3, 2021

I suspect I'm running into this same issue. For sure, I'm also using ExCrypto.encrypt/3 and my app breaks when calling it with the correct arguments.

I'm running Elixir v1.12.2, on OTP v24 (Ubuntu Xenial).
Might be an idea to try and install ExCrypto from the master branch, to get hold of the OTP 24 specific changes.

Update: I can confirm that running from the master branch works ({:ex_crypto, git: "https://github.com/ntrepid8/ex_crypto.git"}). but it would be ideal if the update was tagged and pushed to Hex. I'd have thought it's quite an important module.

@ntrepid8
Copy link
Owner

ntrepid8 commented Nov 4, 2021

Yes, I'm planning to push the updates. Sorry for the delay.

@CamelCafeRider
Copy link
Author

Thank you @ntrepid8

@pbm
Copy link

pbm commented Jan 26, 2022

I just tried to update to OTP 24 and hit this issue. Seems Hex.pm is still listing 0.10.0 as the latest. If I use the master branch, things seem to work. Is there an update planned for Hex.pm to fix it for OTP 24?

@jonericcook
Copy link

This project is awesome! @ntrepid8 any news on releasing an updated version to hex.pm?

@barttenbrinke
Copy link
Contributor

I came here to ask the exact same thing as @jonericcook - Awesome project 🥳

@jonericcook
Copy link

would it be appropriate / inappropriate for one of use to fork and release the updated version onto hex under a new name?

@kdawgwilk
Copy link

This library uses an MIT license so there shouldn't be any legal issues but not sure what open source etiquette would say. I know a very similar thing was done with https://github.com/ninenines/gun when a fork was published to support gRPC e.g. {:gun, "~> 2.0.0", hex: :grpc_gun} so there is a precedent set

@bogmir
Copy link

bogmir commented Mar 15, 2022

I see that the library incorporates changes for OTP 24 now. Just a kind reminder that people are waiting for it to be released on hex.pm. Thanks very much!

@wpr101
Copy link

wpr101 commented Mar 16, 2022

Is there anybody who can take over this repo or publish it to hex.pm? Would be greatly appreciated.

@kdawgwilk
Copy link

kdawgwilk commented Mar 17, 2022

Just found a copy of the lib someone else published back in august https://hex.pm/packages/ex_crypto_copy not sure if it includes the otp 24 fixes yet though

EDIT: Looks like it might because the OTP fixes were merged in May

@doublej74
Copy link

Is the maintainer still up and running? maybe he should transfer the project? so we can continue developments. else the lib will die :-(

@ntrepid8
Copy link
Owner

I'm happy to add more maintainers who can help admin the project. If anyone wants to volunteer I'm interested :)

@Sinc63
Copy link

Sinc63 commented Jun 28, 2022

I just converted my mix.exs to {:ex_crypto, github: "ntrepid8/ex_crypto"} since the content to fix the warnings is there, @ntrepid8 just hasn't had the time to release it.

There's one warning left about a duplicate doc on lib/ex_crypto.ex:306 from line 277. Other than that this is good.

@zraul123
Copy link

@ntrepid8 Can you add me as an admin? I'll help you maintain the project. Thanks!

@zraul123
Copy link

zraul123 commented Feb 9, 2024

@ntrepid8 Is it ok to continue the repo under another community?

@barttenbrinke
Copy link
Contributor

@zraul123 If you do, please invite all people in this thread als colabs

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