Commit Graph

288 Commits (v0.1.2-alpha.1)

Author SHA1 Message Date
Kieran R Prasch 97cceedc30 Creates opeenssl mocked backend pytest fixture. 2018-02-10 04:49:51 -08:00
jMyles 5501a75392 Tests for default curve when no default curve is set. 2018-02-08 21:41:10 -08:00
Kieran R Prasch 1cb9aba0a9 Adds a pair of tests for Point.__mul__. 2018-02-08 18:57:59 -08:00
tuxxy efacd03e3e Add to_cryptography_pub_key method to Point and add tests
Fix naming of to_cryptography_pub_key
2018-02-08 17:06:47 -07:00
tuxxy e7d2a53277 Add to_cryptography_priv_key method and test for BigNum 2018-02-08 16:47:24 -07:00
tuxxy 4154fe1253 Add test for pubkey encryption (encryption for bob) 2018-02-08 15:46:42 -07:00
jMyles 13790d5388 Test that shows errors being raised if dumb things are attempted with config. 2018-02-08 11:29:56 -08:00
tuxxy 74b131d2ad Remove PRE class and make it a module and fix tests 2018-02-08 02:30:56 -07:00
jMyles 9adda4500d Various from_bytes now tested with default params. 2018-02-07 20:39:28 -08:00
jMyles d25aeb86c8 Tests no longer pass curve into gen_rand(). 2018-02-07 20:38:39 -08:00
jMyles 59170d4082 PRE (which is soon to be a module anyway) uses default params for testing. 2018-02-07 20:09:47 -08:00
jMyles 272185d478 Inject curve in test_gen_key. 2018-02-07 20:07:55 -08:00
jMyles 668dcf0a60 Set default curve for test suite. 2018-02-07 20:07:09 -08:00
tuxxy e0a5853ae4 Fix typo _recontruct -> _reconstruct 2018-02-07 03:13:57 -07:00
tuxxy 86cdb5ccca Add __bytes__ to UmbralPublicKey 2018-02-07 03:13:25 -07:00
jMyles cba6f007f2 The method to make an activated Capsule is now Capsule._reconstruct_shamirs_secret(). 2018-02-02 16:56:13 -08:00
jMyles aabec3f4ce We don't actually "reconstruct" a Capsule. We activate it. 2018-02-01 16:16:12 -08:00
jMyles b9c24203cf Removing "PRE" dependency injection into PRE instance. 2018-02-01 09:06:11 -08:00
tuxxy a98d18d084 Set UmbralParameters as an attribute on Umbral keys w/ test updates 2018-02-01 03:21:07 -07:00
tuxxy 73666b2154 Have tests not pass in params by default except for one 2018-02-01 01:47:59 -07: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
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 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
jMyles 40d3bdca06 A test for the unequal cases. 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 007ef5d626 Test now uses decrypt() instead of get_contents(). 2018-01-28 21:07:14 -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 211a920cbe Test for invalid capsule raising an exception. 2018-01-27 18:27:37 -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 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 a11ea36e61 We can get a Capsule from either original or reconstructed bytes. 2018-01-26 21:27:28 -08:00
jMyles 6c0f260446 Comparing newly reconstructed Capsule (which is just a Capsule) to original. 2018-01-26 21:27:28 -08:00
jMyles 418f7be540 Test for single capsule, not ReconstructedCapsule. 2018-01-26 21:27:28 -08:00
tuxxy 050b0b3bdd Use constants in tests and add comment 2018-01-25 17:06:17 -07:00
tuxxy 405a93cd35 Add tests for DEM and some fixes 2018-01-24 14:52:49 -07:00
tuxxy f7687d0f81 Name unused variables
Add more unused variables
2018-01-23 20:00:15 -07:00
tuxxy b1f04f7d54 Calculate recipient public key from recipient's private key in decrypt_reencrypted 2018-01-23 13:50:14 -07:00
tuxxy 4974686d30 Use priv/pub_key_alice in test 2018-01-23 13:46:12 -07:00
tuxxy 3eafb28897 Add tests and fix a few things 2018-01-23 04:28:51 -07:00
tuxxy 00c5089b8b Add tests for checking generated keys 2018-01-23 00:34:33 -07:00
tuxxy 9bb9168323 Add tests for UmbralPrivateKey and UmbralPublicKey 2018-01-19 06:08:39 -07:00
jMyles a3a9180dfd More description of bytestrings lengths. 2018-01-17 14:17:00 -05:00
jMyles 2145debe21 Using "kfrags" as a name for KFrags throughout test. 2018-01-17 14:17:00 -05:00
jMyles 9689817b01 Here's what my linter has to say about the tests. :-) 2018-01-17 14:16:59 -05:00
jMyles f79ca09393 A more informative way to show the proper number of bytes for a CFrag. 2018-01-17 14:15:23 -05:00
David Nuñez 599bad38b3 Include pub_a and pub_b as input to the kFrag signature to avoid
potential reuse of kFrags from other RKs (i.e., not from A to B)
2018-01-17 17:54:37 +01:00
David Nuñez 97340ec0c5 Updated variable names to include type 2018-01-17 11:37:34 +01:00
tuxxy 763a7271c7 Fix naming from KFrag.point_key to KFrag.bn_key 2018-01-16 11:08:13 -07:00
tuxxy d2f22c1438 Add test for ChallengeResponse serialization/deserialization 2018-01-15 17:11:44 -07:00
tuxxy e48ef28104 Add test for ReconstructedCapsule serialization/deserialization 2018-01-15 16:34:22 -07:00
tuxxy f133664d91 Add test for Capsule serialization/deserialization 2018-01-15 15:50:39 -07:00
tuxxy 444800a919 Add test for CapsuleFrag serialization/deserialization 2018-01-15 15:40:24 -07:00
tuxxy 9036cdc9aa Add test for KFrag serialization/deserialization 2018-01-15 15:20:18 -07:00
David Nuñez 381fe19b82 UmbralParameters are fixed before initialization of PRE 2018-01-10 16:14:00 +01:00
David Nuñez 620bec85f8 Changed check_original to Capsule method (verify).
Renamed KFrag.check_signature to verify.
2018-01-10 15:57:53 +01:00
David Nuñez 146e139409 Changed check_kFrag_signature to a KFrag method (check_signature) 2018-01-10 15:52:43 +01:00
David Nuñez ba3395728d Moved hash_to_bn to utils, and changed check_kfrag_consistency as a
KFrag method
2018-01-10 15:42:34 +01:00
David Nuñez 6d70c80541 Added cFrag list and capsule reconstruction to Capsule. Had to comment
most tests for a while because of the syntax changes
2018-01-09 11:02:53 +01:00
David Nuñez a324dec7c0 changed test_encapsulation to test_decapsulation_by_alice 2018-01-03 21:00:04 +01:00
jMyles dcd9b37d29 Changing argument order (keys first, capsule(s) second). Added type hint for ReconstructedCapsule. 2018-01-03 13:36:17 -05:00
jMyles 9b8bd2c235 Merge commit for naming changes contemporaneously made by @cygnusv. 2018-01-03 13:01:35 -05:00
jMyles cfce67f4cd Let's still use PEP8 names for frag variables (ie, kfrags, not kFrags) 2018-01-03 12:46:52 -05:00
jMyles 5c8259f026 A reconstructed capsule - a "recapsule" for short? 2018-01-03 12:26:16 -05:00
jMyles 0bf2ad8946 Calling it a "capsule" in encapsulation test. 2018-01-03 12:25:50 -05:00
David Nuñez 4b9f395f84 some renaming of internal variables, still a lot pending. 2018-01-03 01:33:39 +01:00
David Nuñez 6bbfa48d78 Adjust tests variables to current naming scheme (#7) 2018-01-03 00:54:41 +01:00
David Nuñez bae7388e7e Added test case for when Ursula sends random garbage as the result of
re-encryption
2018-01-02 11:01:24 +01:00
David Nuñez 828fcdb295 Added test case for kFrag consistency 2018-01-02 10:53:05 +01:00
David Nuñez 11bb2bc23b Added test case where Ursula tries to cheat by reusing a previous
reencryption
2018-01-02 10:43:50 +01:00
David Nuñez 3969ee3948 some name changes as per #7 2017-12-30 01:18:23 +01:00
David Nuñez 73a6169806 Test invalid points in the curve 2017-12-29 01:39:28 +01:00
David Nuñez 3673e35021 Added re-encrypt, combine, decapsulate_reencrypted, challenge, and
check_challenge
2017-12-29 01:13:16 +01:00
David Nuñez 49d501883e Testing from/to bytes in Point 2017-12-29 01:12:14 +01:00
David Nuñez 368dbe4c52 Fixed hash_to_bn 2017-12-28 15:02:53 +01:00
David Nuñez ddd0c51d76 Added superbasic test for bignum that fails. Undefined problem with
from_int and to_int
2017-12-28 12:58:34 +01:00
David Nuñez bcc593f1ab Basic stuff (encapsulate & decapsulate, hash_to_bn, etc) 2017-12-28 02:07:37 +01:00