guidodipietro / solana-ed25519-secp256k1-sig-verification Goto Github PK
View Code? Open in Web Editor NEWOn-chain Ed25519 and Secp256k1 signature verification using instruction introspection
On-chain Ed25519 and Secp256k1 signature verification using instruction introspection
I’m currently trying to verify a signed message with Phantom in PHP but I haven’t found any resources. If anyone can explain me the theory of cryptography or knows a package to do this, I would be very happy!
The signature of MessageSign on the wallet adapter differs from @noble/ed25519. Would you happen to have any idea?
I am attempting to verify a signature from an NFC chip using this program. Here is an example of the signature it emits:
{
"input": {
"keyNo": 1,
"digest": "bcf83051a4d206c6e43d7eaa4c75429737ac0d5ee08ee68430443bd815e6ac05",
"message": "010203"
},
"signature": {
"raw": {
"r": "93137bc7bfeaa86e26c6a9bbd6fb8acdf73ed5fd232cc2be1a0714f583f04d2e",
"s": "7f5d7c2461daf8649587c3c510fce05a74146cbe79341427065d0d878d154a1b",
"v": 27
},
"der": "304602210093137bc7bfeaa86e26c6a9bbd6fb8acdf73ed5fd232cc2be1a0714f583f04d2e02210080a283db9e25079b6a783c3aef031fa4469a702836148c14b97551054320f726",
"ether": "0x93137bc7bfeaa86e26c6a9bbd6fb8acdf73ed5fd232cc2be1a0714f583f04d2e7f5d7c2461daf8649587c3c510fce05a74146cbe79341427065d0d878d154a1b1b"
},
"publicKey": "046ca7458b4c8c4f9a196094bda5f01ac1e588f6604bc2f7a58ba4d1fa3c3cb9102720bdb43f73972ea3dfc1c6ab8a6cb7d14114765eb76ff0fb2df34a5f7cab56",
"etherAddress": "0x1aaBF638eC3c4A5C2D5cD14fd460Fee2c364c579"
}
Thank you in advance for the help!
After read your check_ed25519_data
function, I wonder, Isn't it suffice to do verify {msg, signature, pubkey} without IX data ? To my expecience on Ethereum, we can recover public key from signature, and compare it agaist pubkey
Your Tx compose from 2 instructions, first one is sig verification IX. I think this first IX do verification also, then, why do we need to check sig again in second IX ?
Hi there, I'm trying to run and test the project but on "anchor test" receive to following error:
error: target is not supported, for more information see: https://docs.rs/getrandom/#unsupported-targets
--> src/lib.rs:267:9
|
267 | / compile_error!("\
268 | | target is not supported, for more information see: \
269 | | https://docs.rs/getrandom/#unsupported-targets\
270 | | ");
| |__________^
error[E0433]: failed to resolve: use of undeclared crate or module `imp`
--> src/lib.rs:291:5
|
291 | imp::getrandom_inner(dest)
| ^^^ use of undeclared crate or module `imp`
For more information about this error, try `rustc --explain E0433`.
error: could not compile `getrandom` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
Steps to reproduce:
Versions
Yarn: 1.22.19
Anchor: tried on 0.21.0 and 0.29.0
Node: v16.20.2
Environment:
WSL Ubuntu-20.04
Can you help me with this issue? https://solana.stackexchange.com/questions/5604/how-to-send-message-and-signature-as-vecu8-and-u8-64-to-program . The way you create instruction isn't used anymore. Tks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.