Commit Graph

1011 Commits (32a612c99d8d9b1986d21e4c9b7dfcf783283c2d)

Author SHA1 Message Date
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 c7292fe92c Remove unused dev dependencies 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 2ad8223b68
Merge pull request #267 from fjarri/interfacing-2
Interfacing with Rust, part 2
2021-05-26 23:04:58 -07:00
Bogdan Opanchuk edbf95315c Add myself to the list of authors 2021-05-26 22:59:58 -07:00
Bogdan Opanchuk 96251cf19b Fix CI build 2021-05-26 22:54:36 -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 48c3441344 Style fixes + pylint config 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk 9570035582 Move backend-related parts of signing to the openssl module 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 023e8134dd Remove excess default exports 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 b03c83eb93 Don't use DST when hashing for signing
Have to rebuild vectors again.
2021-05-26 22:13:43 -07:00
Bogdan Opanchuk f31a3ad1c2 Add a comment about normalizing s in signatures 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 c46fdf6cdb Add a TODO in CapsuleFrag.verify() and bail early if the signature is not correct 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk cae54575e5 Update TODO in CurveScalar.from_digest() 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 4f6f1741b7 keys: correct phrasing in error messages 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 7b7fdfa285
Merge pull request #263 from fjarri/interfacing
Interfacing with Rust
2021-05-26 22:12:20 -07:00
Bogdan Opanchuk 503a1c6a18 Always set constant time operations for OpenSSL bignums
set_consttime_flag was always True anyway
2021-04-12 22:00:40 -07:00
Bogdan Opanchuk fd9e1d44e5 Remove a TODO
rust-umbral#43 is closed
2021-04-12 21:56:22 -07:00
Bogdan Opanchuk a7f4a7a634 Fix logic in bn_from_bytes(..., apply_modulus=True) 2021-04-12 21:55:26 -07:00
Bogdan Opanchuk 7d0f2fe3e2 Cache public key in the secret key to speed up `generate_kfrags()` 2021-03-28 12:51:46 -07:00
Bogdan Opanchuk a08a552708 Replace `dem.ErrorInvalidTag` and `Capsule.NotValid` with `GenericError`. 2021-03-28 12:51:46 -07:00
Bogdan Opanchuk ee7d31bda0 RFC for docs 2021-03-28 12:51:45 -07:00
Bogdan Opanchuk fe6e32be9d Update vector generating script and regenerate vectors 2021-03-28 12:51:45 -07:00
Bogdan Opanchuk 0f82580c7e Add some API docs 2021-03-28 12:51:45 -07:00
Bogdan Opanchuk bcb0071f9e Update docs 2021-03-28 12:51:45 -07:00
Bogdan Opanchuk c401c52e92 Add tests 2021-03-28 12:51:45 -07:00
Bogdan Opanchuk f58a2580dc curve_scalar: don't check range in __init__, only in publicly used constructors 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 6af41b09d9 Remove repeated casting to bytes from hashing calls 2021-03-28 12:51:45 -07:00
Bogdan Opanchuk c419705245 Add SecretKeyFactory 2021-03-28 12:51:45 -07:00
Bogdan Opanchuk d532ef1383 Move all OpenSSL stuff into one module, move around some low-level details 2021-03-28 12:51:45 -07:00
Bogdan Opanchuk b96888cafb Add reencryption functionality 2021-03-28 12:51:45 -07:00
Bogdan Opanchuk d6626ba1a6 Add generate_kfrags() 2021-03-28 12:51:45 -07:00