Ianleeclark / Paseto

An Elixir implementation of Paseto (Platform-Agnostic Security Tokens)
Other
95 stars 8 forks source link

OTP24 deprecated some :crypto functions that used by paseto #50

Closed mkurkov closed 2 years ago

mkurkov commented 2 years ago

Full list is here https://erlang.org/documentation/doc-12.0-rc2/doc/general_info/removed.html#functions-removed-in-otp-24

Warnings on OTP24:

==> paseto
Compiling 7 files (.ex)
warning: :crypto.hmac/3 is undefined or private, use crypto:mac/4 instead
  lib/paseto/utils/crypto.ex:73: Paseto.Utils.Crypto.hmac_sha384/2

warning: :crypto.hmac/4 is undefined or private, use crypto:macN/5 instead
  lib/paseto/utils/crypto.ex:81: Paseto.Utils.Crypto.hmac_sha384/3

warning: :crypto.stream_decrypt/2 is undefined or private, use crypto:crypto_update/2 instead
  lib/paseto/utils/crypto.ex:25: Paseto.Utils.Crypto.aes_256_ctr_decrypt/3

warning: :crypto.stream_encrypt/2 is undefined or private, use crypto:crypto_update/2 instead
  lib/paseto/utils/crypto.ex:13: Paseto.Utils.Crypto.aes_256_ctr_encrypt/3

warning: :crypto.stream_init/3 is undefined or private, use crypto:crypto_init/3 + crypto:crypto_update/2 + crypto:crypto_final/1 or crypto:crypto_one_time/4 instead
Found at 2 locations:
  lib/paseto/utils/crypto.ex:12: Paseto.Utils.Crypto.aes_256_ctr_encrypt/3
  lib/paseto/utils/crypto.ex:24: Paseto.Utils.Crypto.aes_256_ctr_decrypt/3

It seems that only V1 is affected by this.

Ianleeclark commented 2 years ago

Thank you for reporting! I'll try and find some time to resolve this, but PRs are welcome

Ianleeclark commented 2 years ago

https://github.com/jschneider1207/hkdf/pull/3 I'll fork the hkdf package next weekend if the original owner doesn't respond

jared-mackey commented 2 years ago

@Ianleeclark looks like the changes to hkdf have been published to version 0.2.0. Is there any other blockers?

Ianleeclark commented 2 years ago

Technically no, but I'm just having trouble finding time. Happy to accept a PR

Ianleeclark commented 2 years ago

Available in 1.4.0