David Núñez
ea442fe702
Janitorial stuff
2018-10-06 21:31:39 +02:00
David Núñez
236ff239fe
Use constant_sorrow to handle signing mode constants in KFrag
2018-10-06 19:00:34 +02:00
David Núñez
0eb7e22dc4
New signing mode in KFrag for stating what correctness keys are signed
2018-10-06 19:00:34 +02:00
David Núñez
4e331f3010
Rename pre.split_rekey to pre.generate_kfrags. Introduce changes in args
2018-10-06 19:00:34 +02:00
David Núñez
d6ee0cc4e5
Capsule._reconstruct_shamirs is absorbed into pre._decapsulate_reencrypted
2018-10-06 19:00:34 +02:00
David Núñez
ecc166f23c
Activated capsules don't exist anymore as objects of the Capsule class
2018-10-06 19:00:34 +02:00
David Núñez
7f50bf48b8
More type checking on re-encrypt and decrypt APIs
2018-10-06 19:00:34 +02:00
David Núñez
054777eb53
KFrags now has 2 signatures (Bob and proxy) and a new point
...
* point_precursor removes need for point_xcoord and point_noninteractive
* Fixes access to protected attributes in some places
2018-10-06 19:00:34 +02:00
David Núñez
f535f926b9
New test for kfrags signed without correctness keys. Test fails
2018-10-06 19:00:26 +02:00
David Núñez
21c50eb575
Allows to set a single correctness key. Tests for correctness keys.
2018-09-21 12:51:57 +02:00
David Núñez
795325b5ad
Rename variables shadowing `id` function
2018-09-19 13:06:06 +02:00
David Núñez
5fc94b4070
Delegating and receiving pubkeys are now optional for kfrag validation
2018-09-19 13:06:06 +02:00
David Núñez
ea6f60da91
Add method UmbralPublicKey.expected_bytes_length, based on Point
2018-09-19 13:06:06 +02:00
David Núñez
9f358ccff9
Check ciphertext min length in pre.decrypt. Some reflow too
2018-08-31 17:12:32 +02:00
David Núñez
51357f24ce
Adds __repr__ to Capsule, KFrag and CFrag, and changes it in UmbralPublicKey
2018-08-31 17:12:32 +02:00
Kieran Prasch
76599ace57
Bump version: 0.1.0-alpha.3 → 0.1.0-alpha.4
2018-08-21 14:33:15 -07:00
Kieran Prasch
09e3c46b35
Bump version: 0.1.0-alpha.2 → 0.1.0-alpha.3
2018-08-21 14:21:20 -07:00
Kieran Prasch
1920266b4d
Bump version: 0.1.0-alpha.1 → 0.1.0-alpha.2
2018-08-21 13:21:08 -07:00
Kieran Prasch
a4f3a47732
Bump version: 0.1.0-alpha.0 → 0.1.0-alpha.1
2018-08-21 13:03:56 -07:00
Kieran Prasch
07cf81bac6
Add required packaging metadata: pass setup.py check
2018-08-20 15:25:24 -07:00
Kieran Prasch
c65cf525de
Update project metadata and copyright
2018-08-18 17:51:44 -07:00
Kieran Prasch
a8f7d9adb4
Add global metadata to umbral __init__
2018-08-18 17:25:58 -07:00
Kieran Prasch
2dcc2220b3
Update setup.py; Classifiers, Requirements and Extras
2018-08-18 17:25:58 -07:00
Kieran Prasch
357d5d488c
Single-source versioning with __about__; Nest __about__ in umbral; Update bumpversion file config
2018-08-18 17:25:58 -07:00
David Núñez
204f295bfb
Expected length of signature depends on its group order, not field order
2018-08-15 22:34:21 -05:00
David Núñez
08d6b9d44f
Fix incorrect type annotations in pre.Capsule and Curve
2018-08-15 22:33:54 -05:00
David Núñez
bbd3d8ec86
Remove unused call to get_affine_coords in Point.to_bytes
2018-08-06 20:29:04 -05:00
David Núñez
ff49551360
Change Point.from_bytes to rely directly in OpenSSL EC_POINT_oct2point
2018-08-06 20:29:04 -05:00
David Núñez
c394e72e7c
Change CurveBN.expected_bytes_length to use the curve group order size
2018-08-06 20:29:04 -05:00
David Núñez
b84c83ed44
Introduce curve.group_order_size_in_bytes (different from field order)
2018-08-06 20:29:04 -05:00
David Núñez
1a47ce8493
Use number of bytes returned by BN_bn2bin as ffi.buffer size
...
The problem is that ffi.buffer fills memory "justified to the left", so e.g., if the BN is 1, the buffer is 010000....00, and we want 00...000001
2018-08-06 20:29:04 -05:00
David Núñez
d0b9dc7c8d
Use OpenSSL point conversion form constants
2018-08-06 20:29:04 -05:00
David Núñez
3b145892c9
Use OpenSSL primitives in Point.to_bytes
2018-08-06 20:29:04 -05:00
David Núñez
841719c28e
Added openssl._bn_to_bytes, to transform BIGNUMs to bytes
2018-08-06 20:29:04 -05:00
David Núñez
4f63089226
Deserialize BIGNUMs with new method, instead of int.from_bytes
2018-08-06 20:29:04 -05:00
David Núñez
92034134ca
Make openssl._bytes_to_bn curve-agnostic
2018-08-06 20:29:04 -05:00
David Núñez
e1728149f7
Additional size checks in the input of openssl._bytes_to_bn
2018-08-06 20:29:04 -05:00
David Núñez
7e1565ee54
Introduce openssl._bytes_to_bn method
2018-08-06 20:29:04 -05:00
David Nuñez
9d87da3c30
Remove UmbralPublicKey.get_pubkey method
2018-08-04 11:25:58 -05:00
David Núñez
cd18086b1b
pre.reencrypt raises KFrag.NotValid when necessary
2018-08-03 22:24:21 -05:00
David Núñez
26821a9cb2
New method KFrag.verify_for_capsule. Takes correctness keys from capsule
2018-08-03 22:24:21 -05:00
David Núñez
41197fa423
Introduce KFrag.NotValid exception for invalid KFrags
2018-08-03 22:24:21 -05:00
tuxxy
d9caff48f8
Add license headers
2018-07-25 11:55:12 -06:00
David Núñez
58960c553b
Merge pull request #200 from KPrasch/master
...
Reflow curve interface
2018-07-23 11:16:54 +02:00
Kieran Prasch
3da35827ba
Increases test accuracy/coverage supported curves; Includes RFC responses.
2018-07-21 14:47:25 -07:00
Kieran Prasch
d0ba7b5567
add init-time property cache for curve field order size (in bytes); Rename method respectively.
2018-07-21 14:16:15 -07:00
Kieran Prasch
4c0fee3973
Treat field order size as cached attribute
2018-07-20 12:56:52 -07:00
Kieran Prasch
32b419af11
Revise alternate curve constructor; Immutably cache curve metadata
2018-07-20 12:56:09 -07:00
Kieran Prasch
1872647a15
Reverse supported curve whitelist k/v
2018-07-20 12:54:09 -07:00
David Núñez
6846f3bafc
Use params.curve.__eq__ method in params.__eq__
2018-07-20 09:57:09 +02:00
David Núñez
646dfb3b26
Fix potential attacks when label or data are empty byte strings
2018-07-20 09:57:09 +02:00
David Núñez
083a4fb685
unsafe_hash_to_point now can output negative points
2018-07-20 09:57:09 +02:00
David Núñez
c41eaf0549
Fix bug in unsafe_hash_to_points when label is None, by using defaults
2018-07-20 09:57:09 +02:00
Kieran Prasch
12fc13c9a3
Reflow curve interface
2018-07-19 15:41:25 -07:00
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