ktanev
Library for ed25519 signatures
I have used until now this library for ed25519 signing and verifying - Ed25519 — Ed25519 v1.5.1. However, I am not pleased with the library at all. The signing time is 100-120ms and the validating of a signature 150-190ms, which I think could be better. Moreover, I am unable to extract the hash (sha512) used for the signature, which I would really like to have separately.
Do you have any recommendations on a better library for ed25519?
Most Liked
hauleth
What is output of info_lib/0? Because if you have compiled with OpenSSL 1.0 then it will not have Edward’s curves as these are implemented in OpenSSL 1.1 and later. In my case:
iex> :crypto.info_lib()
[{"OpenSSL", 269488207, "OpenSSL 1.1.1d 10 Sep 2019"}]
iex> :ed25519 in :crypto.ec_curves()
true
So there is support for such.
EDIT:
Also if you check edwards_curve_dh/0 type then you will see that you need to use :x25519 instead of :ed25519 as a curve name.
hauleth
Yes, now this fails, because when signing you need to use :ed25519 (don’t ask me why this works this way). You need to check documentation of crypto:sign/4.
I haven’t used libsalty, but if NaCL is what you need, or you just want to get crypto right without all that hassle, then it is good choice.
ktanev
In :crypto.generate_key(:ecdh, :ed25519) ecdh refers to all kinds of eliptic curves and then we use x25519. While in :crypto.sign(:eddsa, :sha256, msg, [priv_key, :ed25519]) we have special function for Edwards curves, in which we use ed25519.
I hope it makes a bit more sense.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








