Description
We need to create a new README.md for this fork explaining the concept.
@maaku originally wrote describing the opportunity:
secp256k1 is defined using arithmetic over the prime field of order p.
Point addition is a group operation with order n, where n is also
prime and nearly but not exactly equal to p. With bulletproofs we are
able to make and check in zero knowledge assertions about integer
arithmetic modulo the order of the curve n, of values inside a
Pedersen commitment (vG+rH). As an intuition pump, you can see how
this arises as adding two Pedersen commitments is the same as adding
the underlying committed values and blinding factors modulo the group
size: c1+c2=(v1+v2 mod n)G+(r1+r2 mod n)H.However what if we want to check curve operations in zero knowledge?
E.g. proving in zero knowledge that you have a signature for a given
message and public key, or the pre-image of a given Pedersen hash.
Such curve operations are over the field Fp, so this proof is of
arithmetic "mod p" not "mod n". Bulletproofs on secp256k1 are ONLY
able to check assertions about integer assertions (technically,
arithmetic circuits) where the computation is done mod n, where n is
the order of the generator of the curve.So to do a bulletproof of a secp256k1 curve operation we would need to
use a curve whose generator has order p. As it happens, if one took
the equation and parameters for secp256k1 and merely definitionally
swap the values for n and p, you get a totally unrelated curve (no
homomorphisms between them), but for which n and p are swapped. This
curve is given the cutsy name "secq256k1" -- mind your p's and q's! --
and is sortof a "mirror" curve to secp256k1. Adding to Pedersen
commitments in secp256k1 is the same as adding the underlying values
modulo n, whereas the same operation in secq256k1 is modulo p. So
field arithmetic in secp can be represented as arithmetic over
committed values in seq, and vice versa. This allows us to now prove
things about secp curve operations -- signatures, Pedersen hashes,
etc. -- by using a bulletproof in secq.[Aside: And since the relationship is symmetrical, we can even do
recursive bulletproofs in secp, which prove the existence of a proof
in secq, of an operation that happened in secp, etc. What utility this
has, if any, remains to be seen however.][Addendum: secq proofs are not strictly speaking necessary in order to
evaluate statements mod-p instead of mod-n, as you could of course
create a mod-n circuit interpreter for mod-p statements, but we'd
expect that to be hideously inefficient by comparison to native
support. And zero knowledge proofs are already barely efficient enough
to work with natively as it is.]
Metadata
Metadata
Assignees
Labels
Type
Projects
Status