Skip to content
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

add ConfKVS #100

Merged
merged 1 commit into from
Aug 12, 2024
Merged

add ConfKVS #100

merged 1 commit into from
Aug 12, 2024

Conversation

zeroXbrock
Copy link
Member

ConfKVS is a distillation of suave's confidential storage primitives designed to radically simplify the process of creating and retrieving confidential storage records.
It always sets decryptionCondition to 0, so that records are always immediately available, because this is the most common usage, and removing a parameter is always nice.

Using it looks like this:

1. create a ConfStore

this should generally be stored by your SUAPP contract's constructor

ConfStore cs = ConfStore(addressList, addressList, "my_app_name");

2. set var

(this value also be stored in your SUAPP contract)

ConfRecord memory cr = cs.set("secretKey", abi.encodePacked("secret value"));

3. get var

bytes memory secretKey = cr.get();
assert(keccak256(secretKey) == keccak256(abi.encodePacked("secret value")));

@zeroXbrock zeroXbrock merged commit 78d41ca into main Aug 12, 2024
4 checks passed
@zeroXbrock zeroXbrock deleted the brock/radical-kvs branch August 12, 2024 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants