-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
27 changed files
with
796 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"acct": 0, | ||
"aud": "12345678-1234-abcd-1234-abcdef124567", | ||
"auth_time": 1725917899, | ||
"email": "matthew@example.com", | ||
"exp": 1759517346, | ||
"family_name": "Matthew", | ||
"given_name": "Matthewson", | ||
"iat": 1728067746, | ||
"ipaddr": "203.0.113.0", | ||
"iss": "https://login.microsoftonline.com/12345678-1234-abcd-1234-abcdef124567/v2.0", | ||
"jti": "AUJNzY3Cwon7pL_3k0-fdw", | ||
"login_hint": "O.aaaaabbbbbbbbbcccccccdddddddeeeeeeeffffffgggggggghhhhhhiiiiiiijjjjjjjkkkkkkklllllllmmmmmmnnnnnnnnnnooooooopppppppqqqqrrrrrrsssssdddd", | ||
"name": "Matthew Matthewson", | ||
"nbf": 1728067746, | ||
"oid": "12345678-1234-abcd-1234-abcdef124567", | ||
"onprem_sid": "S-1-2-34-5678901234-1234567890-1234567890-1234567", | ||
"preferred_username": "matthew@example.com", | ||
"rh": "0.aaaaabbbbbccccddddeeeffff12345gggg12345_124_aaaaaaa.", | ||
"sid": "12345678-1234-abcd-1234-abcdef124567", | ||
"sub": "aaabbbbccccddddeeeeffffgggghhhh123456789012", | ||
"tenant_ctry": "US", | ||
"tenant_region_scope": "WW", | ||
"tid": "12345678-1234-abcd-1234-abcdef124567", | ||
"upn": "matthew@example.com", | ||
"uti": "AAABBBBccccdddd1234567", | ||
"ver": "2.0", | ||
"verified_primary_email": [ | ||
"matthew@example.com" | ||
], | ||
"verified_secondary_email": [ | ||
"matthew@service.example.com" | ||
], | ||
"xms_pdl": "NAM", | ||
"xms_tpl": "en" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"alg": "RS256", | ||
"exp": { | ||
"type" : "number", | ||
"reveal" : true, | ||
"max_claim_byte_len" : 31 | ||
}, | ||
"email": { | ||
"type" : "string", | ||
"reveal" : true, | ||
"max_claim_byte_len" : 31 | ||
}, | ||
"family_name": { | ||
"type" : "string", | ||
"reveal" : true, | ||
"max_claim_byte_len" : 31 | ||
}, | ||
"given_name": { | ||
"type" : "string", | ||
"reveal" : true, | ||
"max_claim_byte_len" : 31 | ||
}, | ||
"tenant_ctry": { | ||
"type" : "string", | ||
"reveal" : true, | ||
"max_claim_byte_len" : 31 | ||
}, | ||
"tenant_region_scope": { | ||
"type" : "string", | ||
"reveal" : true, | ||
"max_claim_byte_len" : 31 | ||
}, | ||
"aud": { | ||
"type" : "string", | ||
"reveal_digest" : true, | ||
"max_claim_byte_len" : 62 | ||
}, | ||
"auth_time": { | ||
"type" : "number", | ||
"reveal_digest" : true, | ||
"max_claim_byte_len" : 31 | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"revealed" : ["family_name", "tenant_ctry", "auth_time", "aud"] | ||
} |
Oops, something went wrong.