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 partial coordinates #122

Open
wants to merge 152 commits into
base: develop
Choose a base branch
from
Open

Add partial coordinates #122

wants to merge 152 commits into from

Conversation

tbrezot
Copy link
Collaborator

@tbrezot tbrezot commented Jan 16, 2024

Partial coordinates allow ciphertexts created with an access policy "D1::A" not to be invalidated upon addition or deletion of another dimension/attribute.

The number of coordinate derived from the policy ("universe") is the product of the cardinal of the dimensions, plus one:

$$\prod_{dim}(|dim| + 1)$$

Breaking changes

  1. The master keys hold the coordinates of all the subspaces.
  2. The user keys hold the coordinates of the semantic subspace of their associated access policy. A semantic subspace is defined as the envelop of the points of the conjunctions defined by the DNF of the associated policy. In other words, this is the smallest valid subspace in which the access policy can be expressed.
  3. Re-keying and pruning are performed using the semantic subspaces (so as to allow easily re-keying all coordinates associated to a leaked user key).
  4. Encapsulations are created for all the points defined by the conjunctions in the DNF of the associated access policy. This means that "D1::A && (D2::A || D2::B)" <=> "D1::A && D2::A || D1::A && D2::B" generates two coordinates and the access policy "" generates one coordinate (the 0 of the universe), which allow for an efficient broadcast.

Work in progress

  • ensure adding and deleting other dimensions or attributes does not invalidate any ciphertext/user key which associated access policy leaves in a different subspace.
  • validate the creation of user key and re-keying/prunning per semantic space

@tbrezot tbrezot requested review from Manuthor and ackRow and removed request for Manuthor January 16, 2024 18:42
@tbrezot tbrezot marked this pull request as draft January 16, 2024 18:42
@tbrezot tbrezot marked this pull request as ready for review January 26, 2024 15:54
Copy link
Contributor

@ackRow ackRow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refacto!

src/abe_policy/access_policy.rs Outdated Show resolved Hide resolved
src/abe_policy/dimension.rs Show resolved Hide resolved
Copy link
Contributor

@Manuthor Manuthor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great job!
I suppose you will complete this PR with benches and the last item of you WIP list.
Otherwise, all good to me.

src/abe_policy/access_policy.rs Show resolved Hide resolved
@tbrezot tbrezot mentioned this pull request Mar 4, 2024
tbrezot and others added 10 commits March 18, 2024 14:32
- remove benches (see `fix/benches`)
- remove `serialization` feature to fix tests that depend on it.
Simplify parsing code and correct parsing errors. Notice that now, empty
access policies can be parsed. Parsing should be more efficient too, but
we lack benchmarks for that.

The only downside is that allowing '&' or '|' inside attributes is
painful to write. I consider it an acceptable limitation to the
expressivness allowed by the parsing operation.

This is a breaking change though. All "Department::R&D" attributes have
been renamed into "Department::RD".
…124)

feat: add partial coordinates

fix: cargo test --all-features

- remove benches (see `fix/benches`)
- remove `serialization` feature to fix tests that depend on it.

fix: access policy parsing

Simplify parsing code and correct parsing errors. Notice that now, empty
access policies can be parsed. Parsing should be more efficient too, but
we lack benchmarks for that.

The only downside is that allowing '&' or '|' inside attributes is
painful to write. I consider it an acceptable limitation to the
expressivness allowed by the parsing operation.

This is a breaking change though. All "Department::R&D" attributes have
been renamed into "Department::RD".

fix: access policy parsing

rename!: rename `from_boolean_expression` into `parse`

fix: neats
Work done in `feat/partial_coordinates` breaks the current benchmarks.
Later MR will reintroduce new benchmarks compatible with the new inner workings
of the key derivation.
tbrezot and others added 3 commits March 18, 2024 15:11
wip: feat: merge msk/mpk

removing buggy benches

fix: `crypto_core` dependency link

fix: cleanup remaining mention of Curve25519 in `primitives.rs`

fix: tests encaps/decaps

fix: serialization

fix: rebase

fix: rename ElGamal encryption to masking primitives

fix: review

Rename `chronological_iter` back to `bfs`
@tbrezot tbrezot requested a review from Adamk93 March 22, 2024 08:13
Adamk93
Adamk93 previously approved these changes Mar 24, 2024
Copy link

@Adamk93 Adamk93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have real comments on this PR

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.

5 participants