Skip to content

Commit 23b7832

Browse files
authored
Update README.md
1 parent 3cb112c commit 23b7832

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

README.md

+24-9
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ Inputs:
8686
EPOCH_LIMIT_SECRET: Browser's private epoch-limit key
8787
Intermediate:
8888
EPOCH_LIMIT_PUBLIC: Public epoch-limit key generated from EPOCH_LIMIT_SECRET
89-
EPOCH_LIMIT_PROOF: A bytestring representing a zero-knowledge proof of knowledge of EPOCH_LIMIT_SECRET.
89+
EPOCH_LIMIT_PROOF: A bytestring representing a zero-knowledge proof of
90+
knowledge of EPOCH_LIMIT_SECRET.
9091
Output:
9192
REQUEST: Bytestring containing EPOCH_LIMIT_PUBLIC and EPOCH_LIMIT_PROOF
9293
```
@@ -116,7 +117,8 @@ Inputs:
116117
SITE_PUBLIC: Public key generated from SITE_SECRET
117118
TOKEN: Bytestring containing VALUE and SIG
118119
Output:
119-
VALID: Boolean indicating whether TOKEN was issued using EPOCH_LIMIT_SECRET and SITE_PUBLIC.
120+
VALID: Boolean indicating whether TOKEN was issued using EPOCH_LIMIT_SECRET
121+
and SITE_PUBLIC.
120122
```
121123

122124
#### Proof Generation Algorithm
@@ -129,14 +131,21 @@ Inputs:
129131
SITE_PUBLIC: Public key generated from SITE_SECRET
130132
TOKEN: Bytestring containing VALUE and SIG
131133
BOUND: Integer which we want to prove VALUE is less than or equal to
132-
EPOCH_LENGTH: Integer in seconds representing the length of a given epoch for rate limiting purposes.
133-
EPOCH_LIMIT: Integer between 0 and 2^17 exclusive representing the maximum tokens possible to issue in a given epoch.
134+
EPOCH_LENGTH: Integer in seconds representing the length of a given epoch
135+
for rate limiting purposes.
136+
EPOCH_LIMIT: Integer between 0 and 2^17 exclusive representing the maximum
137+
tokens possible to issue in a given epoch.
134138
COUNTER: Amount of proofs issued in current epoch (excluding this one).
135139
PROOF_ID: String used to trace this specific proof generation request.
136140
Intermediates:
137141
EPOCH: The current epoch according to EPOCH_LENGTH and the current time.
138-
EPOCH_LIMIT_RANDOM: Output of a VRF seeded by EPOCH_LIMIT_SECRET and applied to EPOCH and COUNTER.
139-
T_PROOF: Non-Interactive Zero-Knowledge Proof that TOKEN was issued using EPOCH_LIMIT_SECRET and SITE_PUBLIC, that VALUE <= BOUND, that EPOCH_LIMIT_RANDOM was properly calculated, that COUNTER < EPOCH_LIMIT, that the current time is within EPOCH, and of PROOF_ID's value.
142+
EPOCH_LIMIT_RANDOM: Output of a VRF seeded by EPOCH_LIMIT_SECRET and applied
143+
to EPOCH and COUNTER.
144+
T_PROOF: Non-Interactive Zero-Knowledge Proof that TOKEN was issued using
145+
EPOCH_LIMIT_SECRET and SITE_PUBLIC, that VALUE <= BOUND, that
146+
EPOCH_LIMIT_RANDOM was properly calculated, that COUNTER <
147+
EPOCH_LIMIT, that the current time is within EPOCH, and of
148+
PROOF_ID's value.
140149
Output:
141150
PROOF: Bytestring containing EPOCH_LIMIT_RANDOM and T_PROOF.
142151
```
@@ -150,13 +159,19 @@ Inputs:
150159
SITE_SECRET: Server's private key
151160
PROOF: Bytestring containing EPOCH_LIMIT_RANDOM and T_PROOF.
152161
BOUND': Integer which we want to prove VALUE is less than or equal to
153-
EPOCH_LENGTH: Integer in seconds representing the length of a given epoch for rate limiting purposes.
154-
EPOCH_LIMIT: Integer between 0 and 2^17 exclusive representing the maximum tokens possible to issue in a given epoch.
162+
EPOCH_LENGTH: Integer in seconds representing the length of a given epoch
163+
for rate limiting purposes.
164+
EPOCH_LIMIT: Integer between 0 and 2^17 exclusive representing the maximum
165+
tokens possible to issue in a given epoch.
155166
PROOF_ID: String used in generating PROOF to demonstrate provenance.
156167
Intermediates:
157-
EPOCH: The current epoch according to EPOCH_LENGTH and the current time. The server may decide to try multiple EPOCHs (for example, the ones immediately before or after) to prevent issues around EPOCH boundaries.
168+
EPOCH: The current epoch according to EPOCH_LENGTH and the current time. The
169+
server may decide to try multiple EPOCHs (for example, the ones
170+
immediately before or after) to prevent issues around EPOCH
171+
boundaries.
158172
Output:
159173
VALID: Boolean indicating whether or not PROOF is valid.
174+
160175
```
161176

162177
### Site Public Key and Epoch Limit Distribution

0 commit comments

Comments
 (0)