RooSoft
Been tinkering with nostr lately. It’s a new open protocol being built in the wild. It has a possibility to disrupt centralized social networks such as Twitter. It’s been recently funded by Jack Dorsey, which is the Twitter founder himself. He’s actually using it and he said that it’s much like the very early Twittr days, with better potential. Ok, enough about Dorsey…
What’s interesting here, is that it’s possible to create all sorts of things that can communicate on this network without having to ask permission. I’d personally like to create bots. Even so, clients meant for people are very rudimentary and I have a good feeling this thing could be greatly improved with realtime Phoenix LiveView apps, for instance.
Problem is… to send anything on this network, messages have to be signed with Schnorr Signatures and I can’t find any lib that can natively do it either for Elixir or Erlang. By the way, this signature scheme is also enabling the new Bitcoin taproot addresses.
So, this is a call to elixir cryptographists and math wizards… is there anyone here willing to collaborate or create such a lib? I’m willing to do my part and would most probably make good use of it.
Trending in Discussions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
al2o3cr
There are parts that could be tricky in pure Erlang / Elixir, for instance anything that requires constant-time arithmetic.
One way to avoid that would be to wrap an existing Rust library like
k256with Rustler. I’m neither a cryptographer nor much of a Rust dev, but this example seems like it wouldn’t be too much hassle to hook up.linusdm
Just a side question: why do you think LiveView is a good fit? Because of its real-timeness? Or because it’s also websocket based?
RooSoft
Both. The real-timeness is possible thanks to websockets.
RooSoft
Havent tried to embed a rust lib in elixir yet… guess it might be time to learn a thing or two about Rustler.
I was hoping for a full native implementation to limit dependencies, such as a rust compiler. I wonder how much complexity this would add to a lib.
RooSoft
Looks like with the help of rustler_precompiled, it’s possible to embed rust code in a lib and not require all dependent projects to have the whole rust toolkit installed…
haile
I would guess the least complex and most straight forward way would be wrap an elixir front end to a well-maintained rust or c++ library, if you do end up going the rust wrapper route I would love to contribute in some way I have dabbled with ideas around this kind of thing but no real killer ideas, I’m in no way a cryptography expert so you’d probably want to find someone who really knows their way around this stuff however I am learning tonnes and happy to pitch in when/how I can.
RooSoft
Well, actually trying somehow wrap this in a nice elixir library that’s also rustler_precompiled… if successful, that would do it. Goal is to embed rust without requiring its compiler in apps depending on the said lib.
Right now, I’m learning rust basics so I have a slight idea of how rustler works as explained here.
At that point, any help would be greatly appreciated. The endgame is to make elixir usable on nostr.
haile
Here’s a library I’ve found that wraps secp256k1 as a NIF library doing a quick search, perhaps this could help point you in the right direction as Schnorr is an extension on ECDSA. Sadly it hasn’t been maintained for several years, I would suppose some good examples of rust NIFs in the community today are:
There are others but these are just the ones I have personally taken a look under the hood of. The rustler documentation has some detailed examples that can get you pretty far. In general this is a common problem, cryptographic primitives as applied to the blockchain often don’t have good library support in elixir
RooSoft
Guess there’s a void waiting to be filled here…
davidarmstronglewis
Hey all, not sure how much help I can be, but I’ve dabbled some in Rust and Rustler and think I might be able to help a bit. Looks like folks the Schnorr signatures implementation inside the
k256crate. Curious how you want to go about this, do you want to wrap the entirety ofrust-ellipticand only implemented the wrapper fork256(exposing more as you need later), or do you want to only wrap thek256portion?Note that I’m not a cryptography person, just happen to have some Rust and Elixir experience and have played some with Rustler. With that in mind, what can I do that would be helpful for you all?