forked from hyperledger/fabric-private-chaincode
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge Secret Keeper Application #2
Merged
chenchanglew
merged 3 commits into
thesis/rollback-protection-zac
from
thesis/secret-keeper
Jun 22, 2023
Merged
Merge Secret Keeper Application #2
chenchanglew
merged 3 commits into
thesis/rollback-protection-zac
from
thesis/secret-keeper
Jun 22, 2023
Conversation
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
chenchanglew
added a commit
that referenced
this pull request
Jun 22, 2023
Secret Keeper has 5 functions. InitSecretKeeper: - This function will initialize the key "AUTH_LIST_KEY" with value ["Alice", "Bob"] and key "SECRET_KEY" with value "DefaultSecret". - This function should only be called once when the application started. - Of course a malicious user can call this function to reset the value, but this we will assume this is not what an attacker would want to achieve. RevealSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to reveal the value of secret stored under key "SECRET_KEY". LockSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to store a new value of secret under key "SECRET_KEY". - The old value will be replaced. AddUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add a new user to the Authlist. - Then the new user can now perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) RemoveUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add remove an existing user off the Authlist. - Then the removed user can no longer able to perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) Example using fpc-simple-client: ./fpcclient invoke initSecretKeeper ./fpcclient query revealSecret Alice ./fpcclient invoke lockSecret Bob NewSecret ./fpcclient query revealSecret Alice ./fpcclient invoke removeUser Alice Bob ./fpcclient query revealSecret Alice ./fpcclient query revealSecret Bob // (will failed) ./fpcclient invoke addUser Alice Bob ./fpcclient query revealSecret Bob // (will success) -------- * implement secret keeper demo * debug * create unit test mock rollback attack --------- Co-authored-by: Chen Chang Lew <[email protected]> Co-authored-by: tester <tester@fpc>
chenchanglew
added a commit
that referenced
this pull request
Jun 22, 2023
Secret Keeper has 5 functions. InitSecretKeeper: - This function will initialize the key "AUTH_LIST_KEY" with value ["Alice", "Bob"] and key "SECRET_KEY" with value "DefaultSecret". - This function should only be called once when the application started. - Of course a malicious user can call this function to reset the value, but this we will assume this is not what an attacker would want to achieve. RevealSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to reveal the value of secret stored under key "SECRET_KEY". LockSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to store a new value of secret under key "SECRET_KEY". - The old value will be replaced. AddUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add a new user to the Authlist. - Then the new user can now perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) RemoveUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add remove an existing user off the Authlist. - Then the removed user can no longer able to perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) Example using fpc-simple-client: ./fpcclient invoke initSecretKeeper ./fpcclient query revealSecret Alice ./fpcclient invoke lockSecret Bob NewSecret ./fpcclient query revealSecret Alice ./fpcclient invoke removeUser Alice Bob ./fpcclient query revealSecret Alice ./fpcclient query revealSecret Bob // (will failed) ./fpcclient invoke addUser Alice Bob ./fpcclient query revealSecret Bob // (will success) -------- * implement secret keeper demo * debug * create unit test mock rollback attack --------- Co-authored-by: Chen Chang Lew <[email protected]> Co-authored-by: tester <tester@fpc>
chenchanglew
added a commit
that referenced
this pull request
Aug 27, 2023
Secret Keeper has 5 functions. InitSecretKeeper: - This function will initialize the key "AUTH_LIST_KEY" with value ["Alice", "Bob"] and key "SECRET_KEY" with value "DefaultSecret". - This function should only be called once when the application started. - Of course a malicious user can call this function to reset the value, but this we will assume this is not what an attacker would want to achieve. RevealSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to reveal the value of secret stored under key "SECRET_KEY". LockSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to store a new value of secret under key "SECRET_KEY". - The old value will be replaced. AddUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add a new user to the Authlist. - Then the new user can now perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) RemoveUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add remove an existing user off the Authlist. - Then the removed user can no longer able to perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) Example using fpc-simple-client: ./fpcclient invoke initSecretKeeper ./fpcclient query revealSecret Alice ./fpcclient invoke lockSecret Bob NewSecret ./fpcclient query revealSecret Alice ./fpcclient invoke removeUser Alice Bob ./fpcclient query revealSecret Alice ./fpcclient query revealSecret Bob // (will failed) ./fpcclient invoke addUser Alice Bob ./fpcclient query revealSecret Bob // (will success) -------- * implement secret keeper demo * debug * create unit test mock rollback attack --------- Co-authored-by: Chen Chang Lew <[email protected]> Co-authored-by: tester <tester@fpc> Signed-off-by: chenchanglew <[email protected]>
chenchanglew
added a commit
that referenced
this pull request
Aug 27, 2023
Secret Keeper has 5 functions. InitSecretKeeper: - This function will initialize the key "AUTH_LIST_KEY" with value ["Alice", "Bob"] and key "SECRET_KEY" with value "DefaultSecret". - This function should only be called once when the application started. - Of course a malicious user can call this function to reset the value, but this we will assume this is not what an attacker would want to achieve. RevealSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to reveal the value of secret stored under key "SECRET_KEY". LockSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to store a new value of secret under key "SECRET_KEY". - The old value will be replaced. AddUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add a new user to the Authlist. - Then the new user can now perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) RemoveUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add remove an existing user off the Authlist. - Then the removed user can no longer able to perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) Example using fpc-simple-client: ./fpcclient invoke initSecretKeeper ./fpcclient query revealSecret Alice ./fpcclient invoke lockSecret Bob NewSecret ./fpcclient query revealSecret Alice ./fpcclient invoke removeUser Alice Bob ./fpcclient query revealSecret Alice ./fpcclient query revealSecret Bob // (will failed) ./fpcclient invoke addUser Alice Bob ./fpcclient query revealSecret Bob // (will success) -------- * implement secret keeper demo * debug * create unit test mock rollback attack --------- Co-authored-by: Chen Chang Lew <[email protected]> Co-authored-by: tester <tester@fpc> Signed-off-by: chenchanglew <[email protected]>
chenchanglew
added a commit
that referenced
this pull request
Oct 10, 2023
Secret Keeper has 5 functions. InitSecretKeeper: - This function will initialize the key "AUTH_LIST_KEY" with value ["Alice", "Bob"] and key "SECRET_KEY" with value "DefaultSecret". - This function should only be called once when the application started. - Of course a malicious user can call this function to reset the value, but this we will assume this is not what an attacker would want to achieve. RevealSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to reveal the value of secret stored under key "SECRET_KEY". LockSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to store a new value of secret under key "SECRET_KEY". - The old value will be replaced. AddUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add a new user to the Authlist. - Then the new user can now perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) RemoveUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add remove an existing user off the Authlist. - Then the removed user can no longer able to perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) Example using fpc-simple-client: ./fpcclient invoke initSecretKeeper ./fpcclient query revealSecret Alice ./fpcclient invoke lockSecret Bob NewSecret ./fpcclient query revealSecret Alice ./fpcclient invoke removeUser Alice Bob ./fpcclient query revealSecret Alice ./fpcclient query revealSecret Bob // (will failed) ./fpcclient invoke addUser Alice Bob ./fpcclient query revealSecret Bob // (will success) -------- * implement secret keeper demo * debug * create unit test mock rollback attack --------- Co-authored-by: Chen Chang Lew <[email protected]> Co-authored-by: tester <tester@fpc> Signed-off-by: chenchanglew <[email protected]> Signed-off-by: chenchanglew <[email protected]>
chenchanglew
added a commit
that referenced
this pull request
Oct 10, 2023
Secret Keeper has 5 functions. InitSecretKeeper: - This function will initialize the key "AUTH_LIST_KEY" with value ["Alice", "Bob"] and key "SECRET_KEY" with value "DefaultSecret". - This function should only be called once when the application started. - Of course a malicious user can call this function to reset the value, but this we will assume this is not what an attacker would want to achieve. RevealSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to reveal the value of secret stored under key "SECRET_KEY". LockSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to store a new value of secret under key "SECRET_KEY". - The old value will be replaced. AddUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add a new user to the Authlist. - Then the new user can now perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) RemoveUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add remove an existing user off the Authlist. - Then the removed user can no longer able to perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) Example using fpc-simple-client: ./fpcclient invoke initSecretKeeper ./fpcclient query revealSecret Alice ./fpcclient invoke lockSecret Bob NewSecret ./fpcclient query revealSecret Alice ./fpcclient invoke removeUser Alice Bob ./fpcclient query revealSecret Alice ./fpcclient query revealSecret Bob // (will failed) ./fpcclient invoke addUser Alice Bob ./fpcclient query revealSecret Bob // (will success) -------- * implement secret keeper demo * debug * create unit test mock rollback attack --------- Co-authored-by: Chen Chang Lew <[email protected]> Co-authored-by: tester <tester@fpc> Signed-off-by: chenchanglew <[email protected]> Signed-off-by: chenchanglew <[email protected]>
chenchanglew
added a commit
that referenced
this pull request
Nov 21, 2023
Secret Keeper has 5 functions. InitSecretKeeper: - This function will initialize the key "AUTH_LIST_KEY" with value ["Alice", "Bob"] and key "SECRET_KEY" with value "DefaultSecret". - This function should only be called once when the application started. - Of course a malicious user can call this function to reset the value, but this we will assume this is not what an attacker would want to achieve. RevealSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to reveal the value of secret stored under key "SECRET_KEY". LockSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to store a new value of secret under key "SECRET_KEY". - The old value will be replaced. AddUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add a new user to the Authlist. - Then the new user can now perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) RemoveUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add remove an existing user off the Authlist. - Then the removed user can no longer able to perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) Example using fpc-simple-client: ./fpcclient invoke initSecretKeeper ./fpcclient query revealSecret Alice ./fpcclient invoke lockSecret Bob NewSecret ./fpcclient query revealSecret Alice ./fpcclient invoke removeUser Alice Bob ./fpcclient query revealSecret Alice ./fpcclient query revealSecret Bob // (will failed) ./fpcclient invoke addUser Alice Bob ./fpcclient query revealSecret Bob // (will success) -------- * implement secret keeper demo * debug * create unit test mock rollback attack --------- Co-authored-by: Chen Chang Lew <[email protected]> Co-authored-by: tester <tester@fpc> Signed-off-by: chenchanglew <[email protected]> Signed-off-by: chenchanglew <[email protected]>
chenchanglew
added a commit
that referenced
this pull request
Nov 21, 2023
Secret Keeper has 5 functions. InitSecretKeeper: - This function will initialize the key "AUTH_LIST_KEY" with value ["Alice", "Bob"] and key "SECRET_KEY" with value "DefaultSecret". - This function should only be called once when the application started. - Of course a malicious user can call this function to reset the value, but this we will assume this is not what an attacker would want to achieve. RevealSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to reveal the value of secret stored under key "SECRET_KEY". LockSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to store a new value of secret under key "SECRET_KEY". - The old value will be replaced. AddUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add a new user to the Authlist. - Then the new user can now perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) RemoveUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add remove an existing user off the Authlist. - Then the removed user can no longer able to perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) Example using fpc-simple-client: ./fpcclient invoke initSecretKeeper ./fpcclient query revealSecret Alice ./fpcclient invoke lockSecret Bob NewSecret ./fpcclient query revealSecret Alice ./fpcclient invoke removeUser Alice Bob ./fpcclient query revealSecret Alice ./fpcclient query revealSecret Bob // (will failed) ./fpcclient invoke addUser Alice Bob ./fpcclient query revealSecret Bob // (will success) -------- * implement secret keeper demo * debug * create unit test mock rollback attack --------- Co-authored-by: Chen Chang Lew <[email protected]> Co-authored-by: tester <tester@fpc> Signed-off-by: chenchanglew <[email protected]> Signed-off-by: chenchanglew <[email protected]>
chenchanglew
added a commit
that referenced
this pull request
Jan 30, 2024
Secret Keeper has 5 functions. InitSecretKeeper: - This function will initialize the key "AUTH_LIST_KEY" with value ["Alice", "Bob"] and key "SECRET_KEY" with value "DefaultSecret". - This function should only be called once when the application started. - Of course a malicious user can call this function to reset the value, but this we will assume this is not what an attacker would want to achieve. RevealSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to reveal the value of secret stored under key "SECRET_KEY". LockSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to store a new value of secret under key "SECRET_KEY". - The old value will be replaced. AddUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add a new user to the Authlist. - Then the new user can now perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) RemoveUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add remove an existing user off the Authlist. - Then the removed user can no longer able to perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) Example using fpc-simple-client: ./fpcclient invoke initSecretKeeper ./fpcclient query revealSecret Alice ./fpcclient invoke lockSecret Bob NewSecret ./fpcclient query revealSecret Alice ./fpcclient invoke removeUser Alice Bob ./fpcclient query revealSecret Alice ./fpcclient query revealSecret Bob // (will failed) ./fpcclient invoke addUser Alice Bob ./fpcclient query revealSecret Bob // (will success) -------- * implement secret keeper demo * debug * create unit test mock rollback attack --------- Co-authored-by: Chen Chang Lew <[email protected]> Co-authored-by: tester <tester@fpc> Signed-off-by: chenchanglew <[email protected]> Signed-off-by: chenchanglew <[email protected]>
chenchanglew
added a commit
that referenced
this pull request
Jan 30, 2024
Secret Keeper has 5 functions. InitSecretKeeper: - This function will initialize the key "AUTH_LIST_KEY" with value ["Alice", "Bob"] and key "SECRET_KEY" with value "DefaultSecret". - This function should only be called once when the application started. - Of course a malicious user can call this function to reset the value, but this we will assume this is not what an attacker would want to achieve. RevealSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to reveal the value of secret stored under key "SECRET_KEY". LockSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to store a new value of secret under key "SECRET_KEY". - The old value will be replaced. AddUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add a new user to the Authlist. - Then the new user can now perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) RemoveUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add remove an existing user off the Authlist. - Then the removed user can no longer able to perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) Example using fpc-simple-client: ./fpcclient invoke initSecretKeeper ./fpcclient query revealSecret Alice ./fpcclient invoke lockSecret Bob NewSecret ./fpcclient query revealSecret Alice ./fpcclient invoke removeUser Alice Bob ./fpcclient query revealSecret Alice ./fpcclient query revealSecret Bob // (will failed) ./fpcclient invoke addUser Alice Bob ./fpcclient query revealSecret Bob // (will success) -------- * implement secret keeper demo * debug * create unit test mock rollback attack --------- Co-authored-by: Chen Chang Lew <[email protected]> Co-authored-by: tester <tester@fpc> Signed-off-by: chenchanglew <[email protected]> Signed-off-by: chenchanglew <[email protected]>
chenchanglew
added a commit
that referenced
this pull request
Jan 30, 2024
Secret Keeper has 5 functions. InitSecretKeeper: - This function will initialize the key "AUTH_LIST_KEY" with value ["Alice", "Bob"] and key "SECRET_KEY" with value "DefaultSecret". - This function should only be called once when the application started. - Of course a malicious user can call this function to reset the value, but this we will assume this is not what an attacker would want to achieve. RevealSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to reveal the value of secret stored under key "SECRET_KEY". LockSecret: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to store a new value of secret under key "SECRET_KEY". - The old value will be replaced. AddUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add a new user to the Authlist. - Then the new user can now perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) RemoveUser: - This function allow users that in the Authlist ("AUTH_LIST_KEY") able to add remove an existing user off the Authlist. - Then the removed user can no longer able to perform the following four functions (RevealSecret, LockSecret, AddUser, RemoveUser) Example using fpc-simple-client: ./fpcclient invoke initSecretKeeper ./fpcclient query revealSecret Alice ./fpcclient invoke lockSecret Bob NewSecret ./fpcclient query revealSecret Alice ./fpcclient invoke removeUser Alice Bob ./fpcclient query revealSecret Alice ./fpcclient query revealSecret Bob // (will failed) ./fpcclient invoke addUser Alice Bob ./fpcclient query revealSecret Bob // (will success) -------- * implement secret keeper demo * debug * create unit test mock rollback attack --------- Co-authored-by: Chen Chang Lew <[email protected]> Co-authored-by: tester <tester@fpc> Signed-off-by: chenchanglew <[email protected]> Signed-off-by: chenchanglew <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Create a new application for rollback attack scenario, namely Secret Keeper
Special notes for your reviewer:
Secret Keeper has 5 functions.
Example using fpc-simple-client: