Tux
ef2ff044d8
Merge pull request #192 from cygnusv/curvebn-ops
...
Minor improvements to CurveBN
2018-07-17 11:02:25 -06:00
David Núñez
014c46cad8
Rename Point.__inverse__ as __neg__ according to the additive notation
2018-07-16 16:18:16 +02:00
David Núñez
d645d75b2b
Fix previous bug in Point.from_affine and Point.from_bytes
2018-07-16 16:13:35 +02:00
David Núñez
f018079251
Some refinement in lambda_coeff and poly_eval, from umbral.utils
2018-07-13 02:26:04 +02:00
David Núñez
f17b2419c4
Some type annotations for CurveBN
2018-07-13 02:26:04 +02:00
David Núñez
b5b3513707
Support for int arguments in CurveBN.__add__ and __sub__
2018-07-13 02:26:04 +02:00
David Núñez
3eb66de507
Fix memleak in CurveBN.truediv
2018-07-13 02:26:04 +02:00
David Núñez
d5bc44d01a
Modular opposite for CurveBN
...
"I'm the opposite of every guy you've ever met"
2018-07-13 02:26:04 +02:00
David Núñez
2075082ef6
Update 'NuCypherKMS' to 'NuCypher'
2018-07-13 02:26:04 +02:00
David Núñez
d7c31475b8
Remove forward references to 'CurveBN'
2018-07-13 02:26:04 +02:00
David Núñez
66c5078ed0
Refactor get_field_order_size_in_bytes as a Curve method
2018-07-13 02:26:04 +02:00
jMyles
c46785ca17
Constant time comparison for KFrag.
2018-07-12 02:35:16 -07:00
jMyles
1aaaf7866c
Using _id for KFrag __hash__ instead of full bytes. Also test for the same. Also lots of cleanup.
2018-07-12 02:34:01 -07:00
jMyles
aeab6e93af
expected_bytes_length can now take is_compressed. test for casting UmbralPublicKey.to_bytes() with is_compressed.
2018-07-12 02:27:05 -07:00
jMyles
9f7a0e10f8
Adds is_compressed to UmbralPublicKey.to_bytes()
2018-07-12 02:22:31 -07:00
Kieran Prasch
19b1991de6
Hand-picked type data to follow-up monkeytype
2018-07-09 12:26:32 -06:00
Kieran Prasch
befb0c30d7
skip openssl type checks; update mypy ini config.
2018-07-09 12:13:40 -06:00
Kieran Prasch
2fe18c7144
Initial bulk application of type hints to pyUmbral
2018-07-09 12:11:43 -06:00
tuxxy
4a20ef0692
Add __repr__ for Curve object
2018-07-07 13:56:07 -06:00
tuxxy
a717a87384
Use singleton model for curves; allow users to import instances
2018-07-07 13:56:07 -06:00
tuxxy
e2d1352abf
Refactor openssl, point, etc to use a single curve object -- fixes memory leak
2018-07-07 13:56:07 -06:00
tuxxy
4d1ae51478
Make simple_api tests pass
2018-07-07 13:56:07 -06:00
tuxxy
ac0e65b5e3
Make test_capsule_correctness work
2018-07-07 13:56:07 -06:00
tuxxy
5a4984fd4e
Fix test_config
2018-07-07 13:56:07 -06:00
tuxxy
41cb180fe1
Make the tests run in a failing state, but runnable
2018-07-07 13:56:06 -06:00
tuxxy
e65669e6c1
Add generator to Curve
2018-07-07 13:56:06 -06:00
tuxxy
e5924f79be
Add simple __eq__ method for comparing two Curve objects
2018-07-07 13:56:06 -06:00
tuxxy
f80f128927
Create supported_curves property and check values in test
2018-07-07 13:56:06 -06:00
tuxxy
e8c5c1b449
Raise ValueError if Curve is instantiated with unsupported nid
2018-07-07 13:56:06 -06:00
tuxxy
10bd7a9614
Add whitelist Curve objects
2018-07-07 13:56:06 -06:00
tuxxy
2a73f7804f
Add basic Curve object structure and CURVE_WHITELIST dict
2018-07-07 13:56:06 -06:00
David Núñez
0d206cb279
Add check for 0<M<=N in pre.split_rekey. Tests for that.
2018-06-25 13:55:55 -07:00
David Núñez
38eff317c4
Fixes deserialization problems for non-default curves
...
* Passes the curve to BystringSplitter
2018-06-06 11:31:33 +02:00
David Núñez
41a3c9bdcf
Fix Signature to account for the order of the curve
...
* Uses CurveBNs instead of ints
* Signature.from_bytes takes an additional argument 'curve'
2018-06-06 11:31:28 +02:00
David Núñez
fa4375d9dc
Adapt verify_kfrag to simplified API (I missed this in the main commit)
2018-06-05 03:51:30 +02:00
David Núñez
d34fd6e3e7
Fix __bytes__ definition in CorrectnessProof
2018-06-05 03:49:53 +02:00
David Núñez
d70d21dfe0
Fix some functions definition according to PEP8
2018-06-05 03:49:22 +02:00
David Núñez
9e126bde29
Fixes bug in Capsule.attach_cfrag that allowed to attach incorrect CFrag
2018-06-05 02:52:23 +02:00
David Núñez
5618b25292
Simplified public API for umbral.pre
...
* Functions in `pre` now only take Umbral keys as arguments, rather than primitive types (Point, CurveBN)
* Remove unnecessary arguments from public facing and internal methods when they can be extracted from a Capsule, UmbralPublicKey or UmbralPrivateKey
* Adds a getter in Capsule for correctness keys
* Adapts the test suite to new simplified API
2018-06-05 02:52:16 +02:00
David Núñez
c736370bcc
Remove params as an argument when possible
...
* Instead, takes params from Capsules or UmbralPublicKeys
* Makes params required in some places (Capsule.init, Capsule.from_bytes, etc)
* Removes pre.CHACHA20_KEY_SIZE constant and use dem.DEM_KEYSIZE instead
2018-06-05 02:11:32 +02:00
David Núñez
c98f723eec
Check that params match when setting correctness keys
2018-06-05 02:11:32 +02:00
David Núñez
03b4138229
Add params when deserializing Capsule
2018-06-05 02:11:32 +02:00
David Núñez
9170b70135
Add __eq__ method to UmbralParameters
2018-06-05 02:11:32 +02:00
jMyles
e04a44c239
Capsule length now reflects number of attached CFrags.
2018-06-01 23:50:20 -07:00
David Núñez
bea29a3550
Fix missing params in public key generation in UmbralPrivateKey
2018-05-31 14:26:50 +02:00
David Núñez
e14636a2a9
Checks that _set_cfrag_correctness_key is only used in allowed keypairs
2018-05-31 12:47:48 +02:00
David Núñez
6a4c1237e5
Renaming keypairs (encrypting --> receiving)
...
* Fixes some weird test patterns, where split_rekey is used from Alice to Alice
2018-05-31 12:46:43 +02:00
jMyles
a9e431a152
params now injected into Capsule one - in __init__
2018-05-30 18:28:54 -07:00
jMyles
e6dafb956e
Modifications in responses to various discussions and comments throughout the day.
2018-05-30 15:51:33 -07:00
jMyles
9e05cf436c
set_keys instead of set_three_keys; using it in test_simple_api.
2018-05-30 13:12:48 -07:00