Table of contents
Open Table of contents
What it is
In a Ring Signature protocol a signer can produce a valid signature while hiding it among “fake” signatures generated by other group participants.
Doing so allows for a certain level of anonymity given that the verifier can’t determine which group member generated the valid signature.
How it works
The Ring Signature scheme we’ll explore here is based on Schnorr Signatures combined with the OR-Proof Technique.
Familiarity with the Schnorr Signature protocol is required to follow along.
In our example we’ll use an Elliptic Curve that has a generator and is of order . All calculations are done if not stated otherwise.
There will be a set of users, one of which will generate a valid signature that is subsequently verified by the verifier.
At first, we need to decide which user will generate the signature.
The group of users who collaborate but don’t produce a valid signature will all generate their secret and it’s corresponding public value as usual.
Next, rather than proceeding with the regular Schnorr Signature protocol in which a random nonce is sampled, the set of users deviate from the protocol and choose a value for as well as a random value for .
Doing so allows each individual to compute which, when checked by the verifier later on via will be valid because:
With that done, the “real” signer will now generate their secret randomly and compute the public value . Next, the nonce will be sampled randomly and the value wil be computed as .
The signer gathers all the and values to compute as the hash of the concatenation of those values with the message that will be signed:
To compute their own value, all values of the other participants are XORed with a final XOR of the value :
The signer’s value is now calculated as .
Finally, all , (including ) and values of all participants are sent to the verifier.
The verifier computes as the hash of the concatenation of the and values alongside the message :
Next up, all individual values (including ) are XORed with each other to check if the result is equal to .
Due to XOR’s properties, a value XORed with itself cancels out. Given that which is XORed with we’ll end up with a remaining which validates the equality check:
As a final step, the verifier checks for every protocol participant if with their respective , and value.
Why it works
Given that the participants determine the value of and , they can produce a value for so that the check done by the verifier results in a truthy value because:
A value XORed with itself results in the zero value when values are represented as binary. This property of “cancelling out” is leveraged when the signer creates the value for by XORing all the participants values in addition to the value that was generated via the hash:
The verifier XORs all values (including ) to check if it’s equal to , which it will be due to the aforementioned property that a value XORed with itself “cancels out”:
With all the different values for , and from all participants of the protocol, it’s impossible to distinguish any specific value from the others which therefore allows the signer to remain anonymous among the group of participants.
References
The following resources have been invaluable for me to learn the concepts discussed in this article.
You should definitely give them a read if you want to dive deeper into the topic.