Encryption support: string-of-string paths, Areas, and utilities #9
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.
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
anddecryptPath
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.