You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add selective disclosure for JWT credentials (#96)
- Add SD support for FE-sized attribs
- Attributes that are larger than a field element can be hashed to fit,
then disclosed by revealing the preimage. Completes the core work for
selective disclosure. Added support for basic proof specifications
encoding a description of attribute data to disclose.
- Callers do not have to specify whether a revaled attribute is hashed or
not, we can figure that out from the config.json file.
- The Groth16 params were being saved twice, once on their own and once in
the prover params, as they can be large, we only save them once in the
prover params.
- Add "prepare" option to command line tool, as a synonym for "prove"
- Move presentation message into proof spec
- Return Result when creating show proof
- Fix JWT samples after API changes. Leaves the functionality of the samples unchanged, just updates them to
use the updated Crescent API.
-Handle presentation message: Make it a string in the public ProofSpec, convert to byte array in
ProofSpecInternal. In CLI tool, allow only one, either from command line, or proof spec file
- Add rs256-sd to github CI
- Move bls12-381 dependency to dev dependencies, currently only used for tests
- Update readme explaining selective disclosure functionality
Copy file name to clipboardExpand all lines: README.md
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,20 @@ The `--name` parameter, used in circuit setup and with the command-line tool, sp
85
85
86
86
Note that the steps have to be run in order, but once the client state is created by `prove`, the `show` and `verify` steps can be run repeatedly.
87
87
88
+
### Selective Disclosure
89
+
The demo generates proofs of fixed statements, for the `rs256` example, the domain of the email address is revealed to the verifier, and for `mdl` the statement is that the holder's age is greater than 18. By default Crescent also proves that the credential is not expired.
90
+
91
+
The `rs256-sd` example demonstrates how to disclose a subset of the attributes in a credential. The file `creds/test-vectors/rs256-sd/proof_spec.json` contains
which means that the proof will disclose those attributes to the verifier. The subset of the attributes that may be revealed in this way is limited to those in `circuit_setup/inputs/rs256-sd/config.json` that have the `reveal` or `reveal_digest` boolean set to `true`.
98
+
The `reveal_digest` option is used for values that may be larger than 31 bytes; they will get hashed first. Setting this flag changes how the circuit setup phase handles those attributes, allowing them to be optionally revealed during `show`.
99
+
100
+
As example ways to experiment with selective disclosure, try removing `aud` from the list of revealed attributes, or adding `given_name` to the list of revealed attributes in the proof specification file.
101
+
88
102
## Contributing
89
103
90
104
This project welcomes contributions and suggestions. Most contributions require you to agree to a
0 commit comments