Commit Graph

332 Commits (master)

Author SHA1 Message Date
Bogdan Opanchuk 42293f9ed8 Rename secret_key_by_label()/secret_factory_by_label() -> make_key()/make_factory() 2021-09-14 22:56:59 -07:00
Bogdan Opanchuk edb9130d97 Rename `num_kfrags` to `shares`
to keep up with the terminology change in `nucypher`
2021-09-12 14:52:30 -07:00
Bogdan Opanchuk a63b1ece58 Add `SecretKeyFactory.from_secure_randomness()` and `.seed_size()` 2021-07-19 15:08:30 -07:00
Bogdan Opanchuk a9050f4678 Add `SecretKeyFactory.secret_key_factory_by_label()` 2021-07-19 15:08:30 -07:00
Bogdan Opanchuk 7e75ecb2aa Add `VerifiedCapsuleFrag.from_verified_bytes()` 2021-07-19 15:08:30 -07:00
Bogdan Opanchuk 2e046fd181 Remove `SecretKey.__eq__()` 2021-07-19 15:08:30 -07:00
Bogdan Opanchuk 7abd5c09d0 Make SecretKey and SecretKeyFactory serializable via `to_secret_bytes()` instead of `bytes()` 2021-07-19 15:08:29 -07:00
Bogdan Opanchuk 104d1a4c20 Replace PublicKey.from_secret_key() with SecretKey.public_key() 2021-06-13 13:28:14 -07:00
Bogdan Opanchuk 42b287705d Get rid of GenericError
In all cases where it is used it is just ValueError
2021-06-06 22:51:07 -07:00
Bogdan Opanchuk 76e6b85f1a Add a compatibility test for serialized sizes 2021-06-03 14:34:37 -07:00
Bogdan Opanchuk 32a612c99d Split Serializable into (De)Serializable 2021-06-03 14:34:37 -07:00
Bogdan Opanchuk b8175a3247 Expose serialized sizes of objects and overhaul Serializable accordingly
We assume here that all our objects have constant serialized size.
2021-06-03 11:29:55 -07:00
Bogdan Opanchuk 16def46564 Fix key names in encrypt/decrypt_original/decrypt_reencrypted 2021-06-02 19:06:32 -07:00
Bogdan Opanchuk 6a1bc0ce14 Remove metadata support from reencrypt() 2021-06-01 23:55:48 -07:00
Bogdan Opanchuk f57c4ba5a4 Add VerifiedKeyFrag.from_verified_bytes() for the purposes of Nucypher's datastore 2021-06-01 23:55:48 -07:00
Bogdan Opanchuk 0a972aa0a8 Add a check to cover Signature.__eq__ 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk d5b9d7c3a1 Add a unit test for a part of SecretKey API 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk 4e0b6a54fe Remove Point.from_affine(), add a check for calling to_affine() on the identity point 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk 9744906506 Move generate_kfrags() to the pre module 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk 84883b85da Enforce CapsuleFrag verification before decryption 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk 65d32fd63e Enforce KeyFrag verification before reencryption 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk 89e6ea1063 Leave only secp256k1 as a supported curve 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk 54b9ee088b Change the order of parameters in CapsuleFrag.verify() to match that of KeyFrag.verify() 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk 81868848c9 Use signer instead of signer_sk in generate_kfrags() and rename signing_pk to verifying_pk 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk a2d4bfd363 Resolve circular dependency keys-signing-hashing
Have to regenerate the vectors because kfrag signature is now created with a different DST
2021-05-26 22:13:43 -07:00
Bogdan Opanchuk 6545eacca2 Move SecretKey signing capabilities to a Signer class 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk 768ac3ae9e keys: adjust error type 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk c4626fa071 Extract signing code into a separate module 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk dd76047a42 test/keys: fix a test name 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk a08a552708 Replace `dem.ErrorInvalidTag` and `Capsule.NotValid` with `GenericError`. 2021-03-28 12:51:46 -07:00
Bogdan Opanchuk fe6e32be9d Update vector generating script and regenerate vectors 2021-03-28 12:51:45 -07:00
Bogdan Opanchuk c401c52e92 Add tests 2021-03-28 12:51:45 -07:00
Bogdan Opanchuk d65969761c Skip rust-umbral tests if the library is not available
Will help CI for the time being
2021-03-28 12:51:45 -07:00
Bogdan Opanchuk 9e87006a9b Add back performance tests 2021-03-28 12:51:45 -07:00
Bogdan Opanchuk bbf168e08b Clean slate 2021-03-18 11:53:52 -07:00
damon 731fd09aa5 add vectors and test for kdf function 2019-10-17 17:55:21 +02:00
jMyles b89decb8c1 Facility for clearing CFrags. 2019-08-09 23:17:31 +02:00
David Núñez f2598db27a Add additional tests suggested by @michwill 2019-04-15 13:09:28 +02:00
David Núñez 5f668f08e8 Refining umbral keys tests 2019-03-27 16:31:39 +01:00
David Núñez 2c3620249b UmbralPublicKeys allow hex serialization 2019-03-27 16:31:39 +01:00
David Núñez 7568fff780 Raise UmbralDecryptionError instead of cryptography.exception.InvalidTag 2019-03-27 16:31:39 +01:00
David Núñez 8bea9a7795 Chimney fixtures 2019-03-27 16:31:39 +01:00
David Núñez af0fb2d028 Remove copyright notice from individual files 2019-02-22 11:07:19 +01:00
David Núñez 71b1e54f06 Allow signing and verification of prehashed messages. Test signatures. 2019-02-15 12:49:36 +01:00
David Núñez cec416fee9 Improved key wrapping for Umbral keys. Fixes #122 2018-11-16 11:16:12 +01:00
David Núñez a6cb2a0450 Removes protected attribute scope in some umbral classes 2018-11-16 11:16:12 +01:00
David Núñez 977bee01a0 Divide umbral.fragments into umbral.kfrags and umbral.cfrags 2018-11-16 11:16:12 +01:00
David Núñez 62a0392b58 New umbral.random_oracles module to gather all hash and KDF functions 2018-11-16 11:07:01 +01:00
David Núñez 4f13c7a4e1 Updated test vectors reflecting new API and KFrags 2018-10-16 11:04:48 +02:00
David Núñez 6df0d835e2 PEP8'ing the test vector scripts and tests 2018-10-16 11:04:42 +02:00