Quantcast
Channel: Recent Questions - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 7969

How to verify an ETH signature on Solana?

$
0
0

I am hoping to write a very simple program that accepts an ETH signature, ETH public key, and message --> determines if the signature is valid.

I found the following repo that looks to do what I want it to do, but I don't understand how it works... https://github.com/GuidoDipietro/solana-ed25519-secp256k1-sig-verification/tree/master

I am getting the ETH signature in the following format

{"input": {"keyNo": 1,"digest": "bcf83051a4d206c6e43d7eaa4c75429737ac0d5ee08ee68430443bd815e6ac05","message": "010203"  },"signature": {"raw": {"r": "93137bc7bfeaa86e26c6a9bbd6fb8acdf73ed5fd232cc2be1a0714f583f04d2e","s": "7f5d7c2461daf8649587c3c510fce05a74146cbe79341427065d0d878d154a1b","v": 27    },"der": "304602210093137bc7bfeaa86e26c6a9bbd6fb8acdf73ed5fd232cc2be1a0714f583f04d2e02210080a283db9e25079b6a783c3aef031fa4469a702836148c14b97551054320f726","ether": "0x93137bc7bfeaa86e26c6a9bbd6fb8acdf73ed5fd232cc2be1a0714f583f04d2e7f5d7c2461daf8649587c3c510fce05a74146cbe79341427065d0d878d154a1b1b"  },"publicKey": "046ca7458b4c8c4f9a196094bda5f01ac1e588f6604bc2f7a58ba4d1fa3c3cb9102720bdb43f73972ea3dfc1c6ab8a6cb7d14114765eb76ff0fb2df34a5f7cab56","etherAddress": "0x1aaBF638eC3c4A5C2D5cD14fd460Fee2c364c579"}

and will pass some or all of these values to the program.

I found these two native program which could be helpful, but I don't understand how to use them:https://docs.solana.com/developing/runtime-facilities/programs#ed25519-programhttps://docs.solana.com/developing/runtime-facilities/programs#secp256k1-program

Any and all guidance will be hugely appreciated.


Viewing all articles
Browse latest Browse all 7969

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>