Commit Graph

434 Commits (fca002632eb06aeb9428f3b476e4356ad0bd9d87)

Author SHA1 Message Date
David Nuñez ba2a93e9bf Remove the try-except-pass pattern using more specific exceptions 2018-01-31 16:46:35 +01:00
David Nuñez 84036b99f6 Extended previous test with another exception subtype 2018-01-31 16:46:35 +01:00
David Nuñez 1c300992eb Test for catching more specific exception wrt to invalid EC points 2018-01-31 16:46:35 +01:00
Tux 8764004e92
Merge branch 'master' into master 2018-01-31 01:40:21 -07:00
David Nuñez 78bc6fffad Renamed hash_to_fn to unsafe_hash_to_bn
Just in case someone tries to use it with secret data
2018-01-31 09:30:12 +01:00
David Nuñez 2f5f473c10 Fixing conflicts 2018-01-31 09:24:37 +01:00
David Nuñez e81718140f Fixing conflicts 2018-01-31 09:22:55 +01:00
Tux 6bd90f424b
Merge pull request #38 from jMyles/unifiedCapsule2
Unifying Capsule and ReconstructedCapsule into a single Capsule class.
2018-01-31 01:06:15 -07:00
jMyles 422ae94294 Moving opening and decrypting logic over to PRE. 2018-01-30 23:21:02 -08:00
jMyles cd64f1d89b No more "is_reconstructed" needed. 2018-01-30 23:19:49 -08:00
jMyles 218f33a690 Reintroducing... PRE.decrypt! 2018-01-30 23:19:22 -08:00
jMyles 7b29302f10 Better names for some things. 2018-01-30 23:18:43 -08:00
jMyles 54acbf3fcf New, longer representation of a reconstructed (activated?) Capsule. 2018-01-30 22:39:54 -08:00
David Nuñez cd22679c44 Corrected error message 2018-01-30 13:08:30 +01:00
David Nuñez f9cf9ddbf3 Deterministic generation of parameters h and g
h and u are now deterministically generated as hashes of g plus a
per-param label, using the Utils.hash_to_point method
2018-01-30 13:03:41 +01:00
David Nuñez 18e596abda Cleaned old prints 2018-01-30 12:51:06 +01:00
David Nuñez 201a40132f Test to check compliance of SECP256k1 generator wrt to SEC standard 2018-01-30 12:23:58 +01:00
David Nuñez b7bd6e8d85 Added hash_to_point function 2018-01-30 12:21:33 +01:00
jMyles 40d3bdca06 A test for the unequal cases. 2018-01-29 07:51:26 -08:00
jMyles d95bedaef2 Methods for establishing equality. 2018-01-29 07:51:26 -08:00
jMyles 0df84c4104 Test for compatibility from reconstructed bytes. 2018-01-29 07:51:26 -08:00
jMyles 3fb70db054 Better test for equality for original capsule. 2018-01-29 07:51:26 -08:00
jMyles 5d9696a29b Typo pointed out by @cygnusv. 2018-01-29 07:36:42 -08:00
jMyles f375e99b32 Capsule.get_contents() is now Capsule.decrypt() and Capsule._get_contents(). 2018-01-28 21:07:48 -08:00
jMyles b6624bc688 Hanging contents() that was no longer used. 2018-01-28 21:07:30 -08:00
jMyles 007ef5d626 Test now uses decrypt() instead of get_contents(). 2018-01-28 21:07:14 -08:00
jMyles f3be38b634 Removing Capsule.open() 2018-01-28 18:08:01 -08:00
jMyles b4744d8731 pre.decrypt_reencryted moved to capsule.get_contents 2018-01-28 18:02:44 -08:00
jMyles 5e66579d4d Made decapsulate_reencrypted public. 2018-01-28 17:50:49 -08:00
jMyles 3311bb6b8e Removed random from test imports. Also some linting. 2018-01-28 10:28:31 -08:00
jMyles 68c9c27bbb Custom exception & raising it in proper place. Closes #39. 2018-01-27 18:27:50 -08:00
jMyles 211a920cbe Test for invalid capsule raising an exception. 2018-01-27 18:27:37 -08:00
jMyles 0240b0c1b2 Removing logic branch for the case where we don't have original capsule data. Closes #37. 2018-01-27 18:11:39 -08:00
jMyles d943ba297a Moving _reconstructed_bytes into to_bytes. 2018-01-26 21:53:24 -08:00
jMyles 0eef0c289c Touching up TODOs. 2018-01-26 21:48:00 -08:00
jMyles c0782a2696 Single from_bytes method. See https://github.com/nucypher/pyUmbral/pull/24#discussion_r162469880 2018-01-26 21:37:01 -08:00
jMyles feb967da72 Prviate reconstruct method. 2018-01-26 21:27:29 -08:00
jMyles 84b4f07d7a A quick sketch of logic for handling cases where we have a Capsule but no original components. See #37. 2018-01-26 21:27:29 -08:00
jMyles a0530ec7b3 Private component names. 2018-01-26 21:27:29 -08:00
jMyles cc7649ff2c Removing methods for Point addition. 2018-01-26 21:27:29 -08:00
jMyles f792fdf54e PRE is no longer injected. 2018-01-26 21:27:29 -08:00
jMyles 6a18e5f420 Method to get components for comparison. 2018-01-26 21:27:29 -08:00
jMyles 33e655a403 We don't know for sure that we'll have the original data to check - maybe kick this out to a separate method? 2018-01-26 21:27:28 -08:00
jMyles 2e2362e856 Using method to get points. 2018-01-26 21:27:28 -08:00
jMyles 22007a26cc More fine-tuning of names. 2018-01-26 21:27:28 -08:00
jMyles 9dee6dcccc Making byte attributes private. 2018-01-26 21:27:28 -08:00
jMyles cb32627dec Methods from instantiating from bytes of either original or reconstructed; introducing concept of "contents." 2018-01-26 21:27:28 -08:00
jMyles 0d2a697916 New Capsule.__init__ allows instantiation from either component set. 2018-01-26 21:27:28 -08:00
jMyles 50f416d85e Some PEP8 cleanup. 2018-01-26 21:27:28 -08:00
jMyles da71b5c377 We're not using default_backend at the moment. 2018-01-26 21:27:28 -08:00