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

Encryption support: string-of-string paths, Areas, and utilities #9

Merged
merged 7 commits into from
Feb 6, 2024

Conversation

sgwilym
Copy link
Contributor

@sgwilym sgwilym commented Feb 6, 2024

Updates the codebase for string-of-string paths, 3D products are replaced by areas, and some new utilities for encrypting and decrypting paths are added.

Paths used to just be bytestrings. Making them string-of-strings means that we can better preserve their ordering when they are encrypted. It also changes how entries are queried, how entries would be deleted with prefix pruning. The classes implementing PrefixIterator were simplified (and in KeyHopTree's case, removed entirely).

Areas replace (the more complex) 3dProducts. Areas are only concerned with path prefixes, not path ranges, making it possible to ask for an area with an encrypted path prefix. Stores are now queried with Areas. Fingerprints are now generated (via Storage.summarise) using Area.

New encryptPath and decryptPath utilities have been added. Their use with the webcrypto API is demonstrated in their accompanying test file.

Entry used to have two properties: identifier and record. These have removed and the properties they each had pulled up into the Entry type itself.

This commit also adopts the use of the willow_utils module. This let us drop the outdated Entry encoding utilities this module used to have, and a few other random utilities.

KV drivers' list method now lets you skip specifying a lower and upper bound and let you just specify a prefix to fetch with instead.

Paths used to just be bytestrings.
This changes how entries are queried, and how entries would be deleted
with prefix pruning.
The classes implementing PrefixIterator were simplified (and in
KeyHopTree's case, removed entirely).

Areas replace (the more complex) 3dProducts.
Stores are now queried with Areas.
Fingerprints are now generated (via Storage.summarise) using Area.

Entry used to have two properties: identifier and record. These have
removed and the properties they each had pulled up into the Entry type
itself.

This commit also adopts the use of the willow_utils module.
This let us drop the outdated Entry encoding utilities this module used
to have, and a few other random utilities.

KV drivers' list method now lets you skip specifying a lower and upper
bound and let you just specify a prefix to fetch with instead.
Expected fingerprints were being ordered differently than they should
have due to not using a proper encoding.
@sgwilym sgwilym merged commit 3b5ece7 into main Feb 6, 2024
1 check passed
@sgwilym sgwilym deleted the encryption-support branch February 6, 2024 13:53
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.

1 participant