-
Notifications
You must be signed in to change notification settings - Fork 71
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
Unifying Capsule and ReconstructedCapsule into a single Capsule class. #38
Merged
Merged
Changes from 24 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
418f7be
Test for single capsule, not ReconstructedCapsule.
jMyles 6c0f260
Comparing newly reconstructed Capsule (which is just a Capsule) to or…
jMyles a11ea36
We can get a Capsule from either original or reconstructed bytes.
jMyles c3346ca
Point.from_bytes is now a classmethod.
jMyles da71b5c
We're not using default_backend at the moment.
jMyles 50f416d
Some PEP8 cleanup.
jMyles 0d2a697
New Capsule.__init__ allows instantiation from either component set.
jMyles cb32627
Methods from instantiating from bytes of either original or reconstru…
jMyles 9dee6dc
Making byte attributes private.
jMyles 22007a2
More fine-tuning of names.
jMyles 2e2362e
Using method to get points.
jMyles 33e655a
We don't know for sure that we'll have the original data to check - m…
jMyles 6a18e5f
Method to get components for comparison.
jMyles f792fdf
PRE is no longer injected.
jMyles cc7649f
Removing methods for Point addition.
jMyles a0530ec
Private component names.
jMyles 84b4f07
A quick sketch of logic for handling cases where we have a Capsule bu…
jMyles feb967d
Prviate reconstruct method.
jMyles c0782a2
Single from_bytes method. See https://github.com/nucypher/pyUmbral/p…
jMyles 0eef0c2
Touching up TODOs.
jMyles d943ba2
Moving _reconstructed_bytes into to_bytes.
jMyles 0240b0c
Removing logic branch for the case where we don't have original capsu…
jMyles 211a920
Test for invalid capsule raising an exception.
jMyles 68c9c27
Custom exception & raising it in proper place. Closes #39.
jMyles 3311bb6
Removed random from test imports. Also some linting.
jMyles 5e66579
Made decapsulate_reencrypted public.
jMyles b4744d8
pre.decrypt_reencryted moved to capsule.get_contents
jMyles f3be38b
Removing Capsule.open()
jMyles 007ef5d
Test now uses decrypt() instead of get_contents().
jMyles b6624bc
Hanging contents() that was no longer used.
jMyles f375e99
Capsule.get_contents() is now Capsule.decrypt() and Capsule._get_cont…
jMyles 5d9696a
Typo pointed out by @cygnusv.
jMyles 3fb70db
Better test for equality for original capsule.
jMyles 0df84c4
Test for compatibility from reconstructed bytes.
jMyles d95beda
Methods for establishing equality.
jMyles 40d3bdc
A test for the unequal cases.
jMyles 54acbf3
New, longer representation of a reconstructed (activated?) Capsule.
jMyles 7b29302
Better names for some things.
jMyles 218f33a
Reintroducing... PRE.decrypt!
jMyles cd64f1d
No more "is_reconstructed" needed.
jMyles 422ae94
Moving opening and decrypting logic over to PRE.
jMyles File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you not using random anywhere? Can't seem to find it used here in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, yeah - at first I had forgotten that
gen_rand
existed onPoint
andBigNum
so I was going to whip together one of my own. Good catch.