|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Namespaces | |
| namespace | detail |
Classes | |
| class | element |
| class | element_test_accessor |
Functions | |
| template<typename C , typename Fq , typename Fr , typename G > | |
| std::ostream & | operator<< (std::ostream &os, element< C, Fq, Fr, G > const &v) |
Special case function for performing secp256k1 ecdsa signature verification group operations
TODO: we should try to genericize this, but this method is super fiddly and we need it to be efficient!
Special-case scalar-multiplication path for the secp256r1 ECDSA verification circuit.
For an ECDSA verification we want to compute R = u₁ · G + u₂ · Q. Each side uses a different in-circuit strategy:
k · 2^(8w) · G + offset entries. No in-circuit doublings; cost is ~32 plookup reads + 31 chain-adds + a constant offset subtract. See element::secp256r1_fixed_base_mul.batch_mul.Soundness ingredients on the variable-base side:
[1] Fake GLV discussion https://ethresear.ch/t/fake-glv-you-dont-need-an-efficient-endomorphism-to-implement-glv-like-scalar-multiplication-in-snark-circuits/20394