LegitStack

LegitStack

Verifying Blockchain crypto signature Elixir/erlang

There are a few questions about this but not specific to blockchain. I have a Ravencoin wallet (bitcoin fork) written in python that I want to talk to my Elixir server. The wallet has a pubkey and an address (derived from the pubkey) and the ability to sign things. The server needs the ability to verify the signature.

I’ve tried to consult these resources but am unable to get it to work
Right way to use :crypto.verify(...)
GitHub - ntrepid8/ex_crypto: Wrapper around the Erlang crypto module for Elixir.
Web3x.Wallet — web3x v0.6.3 eth
How to calculate Bitcoin address in Elixir | by Kamil Lelonek | Kamil Lelonek - Software Engineer
Curvy — Curvy v0.3.0

Has anyone had to do this specifically with blockchain signatures?

:crypto.verify(
    :ecdsa,
    :sha256,
    "message",
    signature,
    [public_key, :secp256k1]
)

Most Liked

hst337

hst337

Can you provide any additional information?
For example, the signature and the key.

Because, the call looks correct, so the problem is with padding or something like this

LegitStack

LegitStack

I appreciate the help you’ve offered me so far. I have to move on to another part of the system, but if anyone sees this, who can solve the issue, we made a bounty out of it:

hst337

hst337

The problem is that this ravencoin and satori use non-standard encoding

For example, ravencoin prepends some data to the signature, it signs the hash of the message and the public key is also prefixed by some magic bytes

hst337

hst337

And the ravencoin code is some spaghetti I’ve never seen with login in object constructor. sheeeesh

Where Next?

Popular in Questions Top

lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
gonzofish
I’m currently trying to understand how to join three tables using Ecto. All the examples I’ve seen use 2, so maybe I’m just missing somet...
New
jc00ke
Expanding on this topic: https://forum.elixirforum.net/t/map-typespec-question/19217 Let’s say I have a map with required and optional k...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

Other popular topics Top

Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New

We're in Beta

About us Mission Statement