I’ve been experimenting with again, this time i wanted to prove wallet ownership inside the zkvm itself, no oracles, no apis, just pure cryptography.
Heres how I did it:
1- Logic inside Pico zkVM (Rust)
#![no_main]
use pico_sdk::{io, entrypoint};
use secp256k1_pico::verify_ecdsa; // built-in precompile
entrypoint!(main);
pub fn main() {
let msg: [u8;32] = io::read_as(); // message hash
let sig: [u8;64] = io::read_as(); // r||s
let pk: [u8;33] = io::read_as(); // public key
let ok = verify_ecdsa(msg, sig, pk);
io::commit(&ok);
}
- This stage uses the function-level coprocessor to verify ECDSA fully inside the zkVM.
2- Prove it
cargo pico build
cargo pico prove --groth16
3- Verify on-chain
require(verifier.verify(proof, publicValues));
require(publicValues.ok, "invalid signer");
And boom, wallet ownership proven mathematically, no trust layer needed.
Thats the power of Brevis, making verification native to computation itself.
See you in the next mini tutorial, were just getting started.