RooSoft

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.

Showing Posts 1 to 10

al2o3cr

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 k256 with 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

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

RooSoft OP

Both. The real-timeness is possible thanks to websockets.

RooSoft

RooSoft OP

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

RooSoft OP

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

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

RooSoft OP

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

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

RooSoft OP

Guess there’s a void waiting to be filled here…

davidarmstronglewis

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 k256 crate. Curious how you want to go about this, do you want to wrap the entirety of rust-elliptic and only implemented the wrapper for k256 (exposing more as you need later), or do you want to only wrap the k256 portion?

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?

Where Next? Top

Trending in Discussions Top

cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
axelson
Hi there! :wave: @frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
achempion
I’ve been using Emacs as my main code editor for more than a two years. It’s a custom build version although I’ve tried doom emacs and sp...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New
jtormey
Lately I’ve been thinking about how to organize components as a LiveView application grows. One of the pain points I’ve found (for myself...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
georgeguimaraes
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews