-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb13f7f
commit 3b20fa3
Showing
19 changed files
with
72 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"Alice":{"keyring":{"bbs":"EIRxtRfx2zDcSEogGyVJ29yj4wHwncuNQMrCpLnfknA="}}} | ||
{"Alice":{"keyring":{"bbs":"EIRxtRfx2zDcSEogGyVJ29yj4wHwncuNQMrCpLnfknA=","bbs_shake":"ZER4PU8gSQvJxrjoJGC+dKm+CMunGFYojP12F0EXoJU="}}} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"Alice":{"bbs_public_key":"i33+cqmLXaneXsvmCv9EE+4GU1+cxO8uZYV+wTLjU0UL7uXbsBW2D0Pd34j5I2E6BFxcFdaVfACQutLX3kQ1TaO0V9Iz1KTn03/OHzyNKhWBkXEYolZ6mdc75DZQDy1k"}} | ||
{"Alice":{"bbs_public_key":"i33+cqmLXaneXsvmCv9EE+4GU1+cxO8uZYV+wTLjU0UL7uXbsBW2D0Pd34j5I2E6BFxcFdaVfACQutLX3kQ1TaO0V9Iz1KTn03/OHzyNKhWBkXEYolZ6mdc75DZQDy1k","bbs_shake_public_key":"tFWMqWLpE1Hq/vJ6mpBzDhjY6yYaj9xvXlZLMe1MX0AmyKHCRIl76lWjTffpbPzqA99k5ASIwRqdzLrgCASvNpVO9FToL86QxL0WJtVbHrDLiFmNH+QrF+n6xSVPUejA"}} |
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,19 @@ | ||
Scenario bbs | ||
# Given I have a 'bbs public key' inside 'The Authority' | ||
# Given I have a 'bbs credential' | ||
Given I have a 'string array' named 'bbs messages' | ||
Given I have a 'number array' named 'bbs disclosed indexes' | ||
When I create the bbs shake key | ||
and I create the bbs shake public key | ||
When I create the random object of '256' bits | ||
When I rename the 'random_object' to 'bbs presentation header' | ||
When I create the bbs shake signature of 'bbs messages' | ||
and I rename 'bbs shake signature' to 'bbs shake credential' | ||
When I create the bbs disclosed messages | ||
When I create the bbs shake proof | ||
Then print the 'bbs shake proof' | ||
Then print the 'bbs shake public key' | ||
Then print the 'bbs disclosed messages' | ||
Then print the 'bbs disclosed indexes' | ||
Then print the 'bbs presentation header' | ||
Then print the 'bbs shake credential' |
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"bbs_credential":"mM+sPY0BNTri66IFR/G9HgSvJuzhf1fz36twKO4RnQXQyKYv2afPYa0J7fKpGC2KSdUb4M9lC59iLXS5n6Cutgc8pE21NRyvaV/Pp3mOnOxSw8ScbPbpuQuPVqUkPK16V+hlWMKRVc7+njxQZUt1oA==","bbs_disclosed_indexes":[1,3],"bbs_disclosed_messages":["above 18","professor"],"bbs_presentation_header":"XdjAYj+RY95+uyYMI8fR3+fmP5LyQaN54vyTTVKxZyA=","bbs_proof":"txtzTP3STsaGXlm/VtIChwy8EsnAGvpgV2sNVHm0Muiml0aUOZU6Exh1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KMaBcN0tTySjJCESBUXi8M050WIdBiYg6pxd87UQeBVgfNKK39OGNlnZM2GNZFfE=","bbs_disclosed_indexes":[1,3],"bbs_disclosed_messages":["above 18","professor"],"bbs_presentation_header":"XdjAYj+RY95+uyYMI8fR3+fmP5LyQaN54vyTTVKxZyA=","bbs_proof":"saqQpmcF/SGQNoRVW3PkgqOl7R2Mqm+w0hQ1OAOi+Xss8IKM+QxINTzATD3ZG03eoMd3zJtRq4fOWD96p0GAH4oPn/iUuciLNrEkHuQqNEyo+IxQLDribteE9ojfehH0izxn7h/TaWqECtYpgGBApvQtWRCYJNBhxuzo6cH3IAzmlHgyU6NOOiY05TvL0hgKAvbuBPCOYLtKadve9OvVcwdhAMPbPu8fSeeJP8CU4VYoTcwgv2pUVg1gT21MxxhvDXDOO+bSF/kecImTCz0Nih9fshjUIu/0tdMDTkprqfMvw9fafUfxpHYdTa9LGk+zGswzrM2HH/RcYhUxp6ots+zysukuwEXRLfurJKSKjrZig3SOg2pJ1gkpr/Nh5Rc5juc04BkX2/9HIP3Ukl6Qtg==","bbs_proof_verbose":"jeg56H2xpF77nV4+hCAsKQ/lfQg/G2yfkktrNtgSRWfh/UsJy32NDIb9cPBUZnaHjxCeAiWUaUcjXWcTsJIl553qZY5XP2FIfVKENcAUK9Uk+ONYSn+WJn53hcJ+H46NmBKvOrskrN3dXMmRl/JnTTDKnJJGF2DMtS4MgO5LmrLVGd8UXkcgYHYxMmYhnKtkVd8aWqSSpbwop03W6X86Y0+rXB6NUA1EcuLyOQ/CLy9Y7WjBI8Ik7xCQO9eN1cxUcVi6bewNsDTM8YnGHWJzF0X1VRgKOQ90a+MIdYzivzRLeNDDHJa3awDrbd3dT4WiS1mUFh7BCT3oaIsk0Am7ViJpmgu+fxIfDy3ZjwudC4tZOVqpwYmwtO9ukaVyPuC1lgehOAqVV1y50mVTnMN+Og==","bbs_public_key":"i33+cqmLXaneXsvmCv9EE+4GU1+cxO8uZYV+wTLjU0UL7uXbsBW2D0Pd34j5I2E6BFxcFdaVfACQutLX3kQ1TaO0V9Iz1KTn03/OHzyNKhWBkXEYolZ6mdc75DZQDy1k"} |
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 |
---|---|---|
@@ -1,14 +1,13 @@ | ||
{ | ||
"The_Authority": { | ||
"bbs_public_key": "o+JuJ0zDfbRzXkXsgBZ9t2YvM+OGOFWqByaQeYxplqUU/2SNEYTcP5QQh1mSN9xxDyNW/s6Lm/fR8D6c7kfbdRwSPcx+xb0iemsNxhwFtVqo/KrAtpsOaBugtUh8P0xY", | ||
"bbs_public_key": "i33+cqmLXaneXsvmCv9EE+4GU1+cxO8uZYV+wTLjU0UL7uXbsBW2D0Pd34j5I2E6BFxcFdaVfACQutLX3kQ1TaO0V9Iz1KTn03/OHzyNKhWBkXEYolZ6mdc75DZQDy1k", | ||
"keyring": { | ||
"bbs": "MXuDMAavZ9URy0VSwIxQwl9gCTXL1ePQfyWpHQCL9Wk=" | ||
"bbs": "EIRxtRfx2zDcSEogGyVJ29yj4wHwncuNQMrCpLnfknA=" | ||
} | ||
}, | ||
"bbs_messages": [ | ||
"above 18", | ||
"italian", | ||
"professor" | ||
], | ||
"hash_name": "sha256" | ||
] | ||
} |
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 |
---|---|---|
@@ -1,10 +1,6 @@ | ||
Scenario 'bbs': authority generates its keys | ||
|
||
Given I am 'The Authority' | ||
|
||
When I create the bbs key | ||
When I create the bbs public key | ||
|
||
Then print my 'bbs public key' | ||
Then print my 'keyring' | ||
|
2 changes: 1 addition & 1 deletion
2
docs/examples/zencode_cookbook/bbs/issuer_keys_output_docs.json
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"The_Authority":{"bbs_public_key":"qZAXFyd/GWAv9WQllN9t+w+6AlMAfjrb4RXhmYP0wGRzUpR1VBQwTzwdr2UvdxTvFBjxVb6TF7ZPK1B6qji08gLlioiMLO/0cBBRZrnsTRhynsDXlB6Yp6brQ758zqFj","keyring":{"bbs":"U+KhGohqd4/Cs1dA/6HBj3wOM8vSgEQ++1wVcTaKFZ0="}}} | ||
{"The_Authority":{"bbs_public_key":"i33+cqmLXaneXsvmCv9EE+4GU1+cxO8uZYV+wTLjU0UL7uXbsBW2D0Pd34j5I2E6BFxcFdaVfACQutLX3kQ1TaO0V9Iz1KTn03/OHzyNKhWBkXEYolZ6mdc75DZQDy1k","keyring":{"bbs":"EIRxtRfx2zDcSEogGyVJ29yj4wHwncuNQMrCpLnfknA="}}} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"bbs_credential":"mM+sPY0BNTri66IFR/G9HgSvJuzhf1fz36twKO4RnQXQyKYv2afPYa0J7fKpGC2KSdUb4M9lC59iLXS5n6Cutgc8pE21NRyvaV/Pp3mOnOxSw8ScbPbpuQuPVqUkPK16V+hlWMKRVc7+njxQZUt1oA==","bbs_messages":["above 18","italian","professor"],"hash_name":"sha256"} | ||
{"bbs_credential":"hQjtvfh/fYpygqCd89OJSckcMDjHoy+8kAMaTzHqfZ4djSE557kk9jW3ERriL+DyCJvMenJqEQIvrEy1kC9mqjx75Xkg+NdWni7WpvEH+l4=","bbs_messages":["above 18","italian","professor"]} |
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
17 changes: 0 additions & 17 deletions
17
docs/examples/zencode_cookbook/bbs/proved_signature_docs.json
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"myMessage":"Dear Bob, your name is too short, goodbye - Alice.","myMessage.signature":"ra8Lk5YxznEuw1YLjzR/jZyeYudnDgzDQSwXfW12RcjJ5uKzv0iGOtjsQGDuAlRMHWN/rRyylugoMx4kcJXFxF061Gsc+IyXFl12TLNM068=","myMessage.signature.sha":"ra8Lk5YxznEuw1YLjzR/jZyeYudnDgzDQSwXfW12RcjJ5uKzv0iGOtjsQGDuAlRMHWN/rRyylugoMx4kcJXFxF061Gsc+IyXFl12TLNM068=","myStringArray":["Hello World! This is my string array, element [0]","Hello World! This is my string array, element [1]","Hello World! This is my string array, element [2]"],"myStringArray.signature":"t+Ewwf9T5uWcijQC6ji9GLdNyQUsznOcSsJy2V2iHJGVlV3aRK/853F6KA9yLvMBLExj15X09eL6v82L81Qwb7guE4XAcH1UTyvRzYgT+h4=","myStringArray.signature.sha":"t+Ewwf9T5uWcijQC6ji9GLdNyQUsznOcSsJy2V2iHJGVlV3aRK/853F6KA9yLvMBLExj15X09eL6v82L81Qwb7guE4XAcH1UTyvRzYgT+h4="} | ||
{"myMessage":"Dear Bob, your name is too short, goodbye - Alice.","myMessage.signature":"ra8Lk5YxznEuw1YLjzR/jZyeYudnDgzDQSwXfW12RcjJ5uKzv0iGOtjsQGDuAlRMHWN/rRyylugoMx4kcJXFxF061Gsc+IyXFl12TLNM068=","myMessage.signature.shake":"sw/lIzhk9+JfCNKcJQBeuKbbYE7GNsd4PlL44umCK6jj2YgdWcsB+mtcw/h8uMvAStVyA6MtNc/o4098eHPQzHndLpc1CUzbZ5IhRstnhvo=","myStringArray":["Hello World! This is my string array, element [0]","Hello World! This is my string array, element [1]","Hello World! This is my string array, element [2]"],"myStringArray.signature":"t+Ewwf9T5uWcijQC6ji9GLdNyQUsznOcSsJy2V2iHJGVlV3aRK/853F6KA9yLvMBLExj15X09eL6v82L81Qwb7guE4XAcH1UTyvRzYgT+h4=","myStringArray.signature.shake":"ge+/5zGSrYUeZjU1qIAqshDfKIUgV2pTYXGvRDOr2XFpw1HxpE8Eo/NPnatoeOFyHUsoiP5wQJHZT/UScg4TDsLV53bXU3EFppbSCvuxKAw="} |
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
Scenario bbs: verify a bbs proof | ||
|
||
# We load al the necessary objects one at a time | ||
Given I have a 'bbs public key' in 'The Authority' | ||
Given I have a 'bbs public key' | ||
and I have a 'bbs proof' | ||
and I have a 'base64' named 'bbs presentation header' | ||
Given I have a 'number array' named 'bbs disclosed indexes' | ||
and I have a 'string array' named 'bbs disclosed messages' | ||
|
||
# The SAME hash function must be used in BOTH the creation and the verification. | ||
When I verify the bbs proof using 'sha256' with public key 'bbs public key' presentation header 'bbs presentation header' disclosed messages 'bbs disclosed messages' and disclosed indexes 'bbs disclosed indexes' | ||
When I verify the bbs proof using 'sha256' | ||
|
||
When I verify the bbs proof with public key 'bbs public key' presentation header 'bbs presentation header' disclosed messages 'bbs disclosed messages' and disclosed indexes 'bbs disclosed indexes' | ||
When I verify the bbs proof | ||
|
||
# The print is executed only if the verification was successful | ||
Then print the string 'bbs zkp verification successful' |
Oops, something went wrong.