mirror of
https://github.com/vacp2p/research.git
synced 2025-02-23 11:48:22 +00:00
4.0 KiB
4.0 KiB
- Abstract
- RLN System Model
- The design requirements
- Building blocks
- Security Guarantees
- Security concerns
Abstract
The following is the summary of how RLN works. This writeup combines the Semaphore paper and the RLN doc (some parts were missing in RLN doc that are borrowed from Semaphore). The system consists of a set of peers and a smart contract. The local operations of each party for each phase as well as the exact data flows are described.
RLN System Model
1. SetUp
A membership contract on the blockchain with the following state variables
- a Merkle Tree (
MT
) of the registered users - a list of submitted nullifiers as
nullifier_map
- a list of submitted signals as
signal_map
Peer (user)
- to generate a secret key
a_0
as its identity
2. Registration
Peer
- to submit the commitment of
a_0
i.e.,h(a_0)
together with a deposit to the membership contract and to obtain the insertion pathauth_path
Membership Contract
- to insert
h(a_0)
toMT
3. Signalling per epoch
Peer
-
Inputs: (
signal
,a_0
,auth_path
,epoch
) -
To create a polynomial of degree 1 with the following coefficients
A_epoch(x)= a_0 + a_1 x
a_1= h (a_0, epoch)
-
Given the peer's
signal
, the followings are submitted to the contractsignal
external_nullifier= epoch
internal_nullifier = h(a_1)
share_x = h(signal)
share_y = A_epoch(share_x)
proof
(proof
is generated using ZKSNARKs for some given circuit)
Contract
- Verify the
proof
using theMT.root
- Check the presence of the
internal_nullifier
in thenullifier_map
, if a duplicate is found forinternal_nullifier
, perform slashing, otherwise, add thesignal
to thesignal_map
, andinternal_nullifier
to thenullifier_map
.
The design requirements
- To verify proofs, the membership tree
MT.root
must be known by the verifier - To spot a double singling, the
nullifier_map
must also be known - A smart contract on the blockchain is required to enforce a global consistent view of the registration tree
MT
andnullifier_map
- To preserve anonymity, peers need to keep their
auth_proof
always updated with the latest tree root (this requirement is still under discussion with the RLN group)
Building blocks
- Peer: KeyGen()--> a_0
- Peer: PolyGen(a_0,epoch) --> the description of the line A(x) (Not really a building block but needed)
- Peer: ZKProofGen(secret: (a_0, auth_path), public: (epoch, signal, A(x)) ) --> proof
- Verifier: ZKProofVerify(MT.root, signal, external_nullifier, internal_nullifier, share_x, share_y, proof )-->True / False
- Verifier: contains(nullifier_map, internal_nullifier) --> True (together with the information about the duplicate i.e., share_x, share_y) / False
- Verifier Slash(share1_x, share1_y , share2_x , share2_y) --> a_0
Security Guarantees
- Per each peer with a secret registered in the registration tree, there will be no more than one signal at each epoch unless the secret gets revealed and the peers gets slashed
Security concerns
- Each peer can register multiple times and use her cumulative quotas for signalling. The deposit required per account may disincentivize multiple registration but does not eliminate it entirely. As the result, the system will be still subject to spam and spammers with enough wealth.
- Inline with item 1, there is no registration policy in place, everyone can join
- Forward secrecy does not hold; that is as soon as a user attempts double signalling, her prior signals attached to the same secret can be identified and linked.