Skip to content

AuthorizedKeyFrag and assorted fixes#2745

Merged
KPrasch merged 5 commits intonucypher:mainfrom
fjarri:chili-aftertaste
Aug 17, 2021
Merged

AuthorizedKeyFrag and assorted fixes#2745
KPrasch merged 5 commits intonucypher:mainfrom
fjarri:chili-aftertaste

Conversation

@fjarri
Copy link
Contributor

@fjarri fjarri commented Jul 12, 2021

Type of PR:

  • Other

Required reviews:

  • 2

What this does:

  • moves deserialization out of Bob.retrieve() and into the respective interface
  • renames remaining "alices" that should be "publishers" according to the new terminology
  • wraps authorized kfrag logic into an AuthorizedKeyFrag class

See #2752 regarding the renaming.

One thing not changed in this PR (should it be?) is that the grant interface returns only one verifying key (still named alice_verifying_key). Technically it should return both Alice's and publisher's key, but using web interface implies that Alice is the publisher, so perhaps it's ok?

fjarri added a commit to fjarri/nucypher that referenced this pull request Jul 12, 2021
@fjarri fjarri force-pushed the chili-aftertaste branch from a027fa1 to 764aab8 Compare July 12, 2021 23:36
@fjarri fjarri requested review from KPrasch and derekpierre July 12, 2021 23:39
Copy link
Member

@KPrasch KPrasch left a comment

Choose a reason for hiding this comment

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

Approved with comments and one renaming RFC.

Copy link
Member

@derekpierre derekpierre left a comment

Choose a reason for hiding this comment

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

Any reason for the empty newsfragment file?

response_data = {'treasure_map': new_policy.treasure_map,
'policy_encrypting_key': new_policy.public_key,
'alice_verifying_key': new_policy.alice_verifying_key}
# TODO: technically we should return both Alice's and Publisher's keys here.
Copy link
Member

Choose a reason for hiding this comment

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

If not being addressed in the PR, does this need a follow-up issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am actually not sure now if the interface warrants it. Can a policy with Provider and Publisher being different characters be even created at the moment, in any way?

Copy link
Member

Choose a reason for hiding this comment

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

that's a question for @KPrasch I guess...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After some thought, I think it's justified to return only the Alice's key - currently for this interface there's no way to have a separate publisher. When this capability is added, we can extend the return value.

@fjarri
Copy link
Contributor Author

fjarri commented Aug 9, 2021

Any reason for the empty newsfragment file?

Initially it only contained internal changes, but I guess now the Alice/publisher stuff has leaked into the public API. I'll add one.

fjarri added a commit to fjarri/nucypher that referenced this pull request Aug 9, 2021
@fjarri fjarri force-pushed the chili-aftertaste branch from b47b2a8 to 5786c59 Compare August 9, 2021 21:32
fjarri added a commit to fjarri/nucypher that referenced this pull request Aug 11, 2021
@fjarri fjarri force-pushed the chili-aftertaste branch 2 times, most recently from 61fda47 to 2ffcfd8 Compare August 11, 2021 22:42
@fjarri fjarri mentioned this pull request Aug 13, 2021
Copy link
Member

@derekpierre derekpierre left a comment

Choose a reason for hiding this comment

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

🎸 - nice work!


try:
verified_kfrag = kfrag.verify(verifying_pk=alice.stamp.as_umbral_pubkey())
verified_kfrag = authorized_kfrag.kfrag.verify(verifying_pk=author.stamp.as_umbral_pubkey())
Copy link
Member

Choose a reason for hiding this comment

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

Nice! That reads a lot better. 🔥

@KPrasch KPrasch merged commit a8388e4 into nucypher:main Aug 17, 2021
@fjarri fjarri deleted the chili-aftertaste branch August 19, 2021 21:48
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