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

Refacto: Policy & keys data structure #119

Merged
merged 38 commits into from
Jan 12, 2024
Merged

Conversation

ackRow
Copy link
Contributor

@ackRow ackRow commented Nov 16, 2023

No description provided.

src/abe_policy/access_policy.rs Show resolved Hide resolved
src/abe_policy/dimension.rs Outdated Show resolved Hide resolved
src/abe_policy/dimension.rs Outdated Show resolved Hide resolved
src/abe_policy/dimension.rs Outdated Show resolved Hide resolved
src/abe_policy/dimension.rs Outdated Show resolved Hide resolved
src/abe_policy/dimension.rs Outdated Show resolved Hide resolved
src/abe_policy/policy.rs Show resolved Hide resolved
src/abe_policy/policy.rs Show resolved Hide resolved
src/abe_policy/policy.rs Outdated Show resolved Hide resolved
src/abe_policy/policy.rs Outdated Show resolved Hide resolved
* test: demonstrate useless key creation problems due to rotation

* feat: add `VersionedMap` to be used to store MPK partitions versions

* feat: implement usual functions for `RevisionMap`

* feat: use `RevisionMap` to store `MasterPublicKey` subkeys

* feat: use `RevisionMap` to store `MasterSecretKey` subkeys

* feat: remove old `rotate` function from Policy

* feat: remove old `VersionedHashmap` data struct

* feat: add `RevisionVec` to store USK subkeys

* feat: replace `VersionedVec` with `RevisionVec` in USK implementation

* feat: rewrite usk refresh using new data structs

* feat: add back `keep_old_rights`option to usk refresh method

* feat: store MPK subkeys in regular HashMap

* refacto: begin rewriting of master keys `update` function

* refacto: rewrite master keys update using exhaustive pattern matching

* refacto: improve user subkeys encapsulation

* refacto: simplify ways to insert new chains in `RevisionVec`

* feat: add `keep_old_subkeys` parameter for rekey operation

* test: add tests and docstring for `RevisionMap` and `RevisionVec`

* test: update rekey tests

* docs: add usage warning for policy edition methods

* test: update user key refresh test

* fix: update runme example

* refacto: clean iter and map in `RevisionMap`

* feat: apply suggestions from code review

Co-authored-by: Théophile BRÉZOT <[email protected]>

* refacto: apply suggestions on `RevisionVec` and `RevisionMap`

* docs: update comments and params name

* feat: add dedicated `prune_master_keys` to remove old subkeys

* refacto: remove deadcode

* refacto: apply review suggestions

* refacto: simplify first part of usk refresh

* refacto: factor out logic from user key `refresh`

* refacto: use peekable iter `next_if` method instead of `take_while`

* refacto: remove special case for refresh with `keep_old_rights`

* refacto: clean RevisionList cursor `skip_while` function

* refacto: clean `RevisionList` cursor structure

* refacto: rename Revision Map `get_current_element` to `get_latest`

* refacto: apply suggestions to remove clone

---------

Co-authored-by: Théophile BRÉZOT <[email protected]>
@ackRow ackRow force-pushed the feat/optimize_data_struct branch from 8e9928f to 2536a50 Compare January 12, 2024 09:02
@ackRow ackRow marked this pull request as ready for review January 12, 2024 13:50
@ackRow ackRow merged commit 3725319 into develop Jan 12, 2024
8 checks passed
@ackRow ackRow deleted the feat/optimize_data_struct branch January 12, 2024 15:38
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.

3 participants