Commit Graph

329 Commits (59c0b6bc2deccec87c86b5d3511934fe9503580e)

Author SHA1 Message Date
tuxxy 53858cd600 Use BytestringSplitter in Capusle deserialization 2018-05-23 04:49:29 -06:00
tuxxy 12bcfe610e Have Capsule.get_size return an non-activated capsule size by default 2018-05-23 04:49:04 -06:00
tuxxy 4efbe3ddc7 Add get_size method on Capsule 2018-05-23 04:15:56 -06:00
tuxxy c9e92586cc Fix serialization bugs and make BytestringSplitter code pretty 2018-05-23 04:07:07 -06:00
tuxxy 4c4d0cb4f0 Add bytestring_splitter to fragments 2018-05-21 08:28:13 -06:00
David Núñez d768cf4a38 Change signatures input from lists to tuples 2018-05-09 01:57:52 +02:00
David Núñez 0dbb86e6f1 Enter KFrag._point_xcoord: an ephemeral pk used during reconstruction instead of Alice's pk 2018-05-09 00:19:23 +02:00
David Núñez c25229efd1 Getting byte size from get_size() by CurveBN and Point 2018-05-09 00:19:02 +02:00
David Núñez 0dd3d4b991 Change KFrag.bn_id to a random byte sequence (Solves #123) 2018-05-09 00:18:45 +02:00
jMyles df4bfa3f1b Proof and verification logic are now wraped to keep all "whitepaper" representations in pre and _pre. 2018-05-06 14:36:19 -07:00
jMyles 0b1064f6f8 Moving cfrag proof and verification logic to _pre 2018-05-06 14:33:04 -07:00
jMyles 31a55eed93 Moving kfrag verification logic to _pre. 2018-05-06 14:32:42 -07:00
jMyles 9cd3c9c2a3 point_bob, point_alice -=> pubkey_b_point, pubkey_a_point 2018-05-05 22:28:04 -07:00
jMyles 48aab73ef1 Making `signature_input` a little more straightforward. 2018-05-05 19:03:53 -07:00
jMyles 6d41a45a62 Removing pre._verify_correctness. 2018-05-05 19:03:21 -07:00
jMyles ee2f9fd0e1 Reworking `_prove_correctness` to match the flow of `_verify_correctness` 2018-05-05 19:03:21 -07:00
jMyles af9d8b251d Updating caller logic to use new `CapsuleFrag._verify_correctness` 2018-05-05 19:03:21 -07:00
jMyles ef9635d3bb Rewriting `_verify_correctness` as a method on `CapsuleFrag`. 2018-05-05 19:03:16 -07:00
David Núñez e81d44498a
Merge pull request #138 from cygnusv/constant_time_hash_to_bn
Remove loop in CurveBN.hash()
2018-05-05 11:23:11 +02:00
jMyles c5fbcc3a1c Moving exception inside if block; testing it. 2018-05-05 11:15:40 +02:00
David Nuñez 38d632c166 Deterministic version of CurveBN.hash() 2018-05-05 00:58:04 +02:00
Justin Holmes 5e0394cbc1
Merge pull request #131 from cygnusv/constant_time_hash_to_bn
Constant time `hash_to_bn` (and some minor cleaning)
2018-05-02 14:45:37 -07:00
tuxxy 3a5daa3e76 Unnest context manager 2018-05-01 18:22:38 -06:00
tuxxy a6c4b669a2 Merge branch 'consttime-ops' of github.com:tuxxy/pyUmbral into consttime-ops 2018-05-01 18:15:01 -06:00
tuxxy d3919ecdf6 Move try/finally outside of with; is_consttime -> set_consttime_flag; Make docstrings more clear 2018-05-01 18:14:25 -06:00
Tux 44c15e5bfb
Merge branch 'master' into consttime-ops 2018-05-01 18:04:55 -06:00
tuxxy b16ea6f303 Make _tmp_bn_mont_ctx only return a BN_MONT_CTX 2018-05-01 17:58:17 -06:00
tuxxy b926f7ccc8 Add docstrings for constant time operations 2018-05-01 17:58:17 -06:00
tuxxy e7fe202a92 Add consttime flag when creating new BNs 2018-05-01 17:58:17 -06:00
tuxxy 96d6b553a1 Make openssl _bn_is_on_curve vars more clear; check if randomly generated bn is on curve; update CurveBN docstring 2018-05-01 17:58:17 -06:00
tuxxy 024944627e Improve docstrings a bit 2018-05-01 17:58:17 -06:00
tuxxy b2182c5f2c Include y-byte in Point.get_size 2018-05-01 17:58:17 -06:00
tuxxy 5b41cd65bf Use better method for determining keysize in bytes (thanks @cygnusv) 2018-05-01 17:58:17 -06:00
tuxxy b39a8a57f0 Remove __hash__ on CurveBN and make Capsule._attached_cfrags a list
Remove unused Capsule._contents
2018-05-01 17:58:17 -06:00
tuxxy 32c5f542e6 Add get_size classmethods for CurveBN, Point, fragments, and
CorrectnessProof.

Fix syntax error
2018-05-01 17:58:17 -06:00
tuxxy fd1ab49655 Cache pubkey on UmbralPrivateKey for #121 2018-05-01 17:58:17 -06:00
tuxxy dc2bfbb48a Rename BigNum -> CurveBN
Change all references from BigNum to CurveBN
2018-05-01 17:58:17 -06:00
tuxxy 0b8c6ca936 Implement OpenSSL module in BigNum, Point, and key classes 2018-05-01 17:58:17 -06:00
tuxxy 861a1a2be2 Create openssl module and add OpenSSL helper utilities
Use BN_cmp instead of BN_is_zero since it's not exposed

Add EC_POINT operations to openssl module
2018-05-01 17:58:17 -06:00
David Nuñez aeb8ad3298 Fix calls to CurveBN.hash() 2018-05-02 01:25:42 +02:00
David Nuñez d0eecfb9c5 Improved version of CurveBN.hash_to_bn(), now called CurveBN.hash() 2018-05-02 01:25:42 +02:00
David Nuñez a73ad4a37b Raise ValueError in CurveBN constructor if the bignum is not in the curve 2018-05-02 01:25:42 +02:00
David Nuñez 0b2e69749c Use Blake2b instead of SHA256 in unsafe_hash_to_point 2018-04-30 03:45:23 +02:00
David Nuñez 4036cdc8b0 Use cls instead of class name in class methods 2018-04-30 03:41:34 +02:00
David Nuñez e57cb01c23 Removed Point.get_order_from_curve 2018-04-30 03:33:56 +02:00
David Nuñez 197f08908b Remove params.CURVE_MINVAL_HASH constant 2018-04-30 03:30:42 +02:00
David Nuñez 08a9a41aad Constant-time version `CurveBN.hash_to_bn` 2018-04-30 02:56:26 +02:00
David Nuñez ce3caf9dfb Remove unused import hmac 2018-04-30 00:19:35 +02:00
tuxxy 8261399a76 Make openssl _bn_is_on_curve vars more clear; check if randomly generated bn is on curve; update CurveBN docstring 2018-04-25 14:03:01 -06:00
tuxxy 7eec2a0c75 Improve docstrings a bit 2018-04-24 17:02:23 -06:00