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
jMyles
e04a44c239
Capsule length now reflects number of attached CFrags.
2018-06-01 23:50:20 -07: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
jMyles
d8f5d53884
Remoing get-or-create flow in favor of simple setting.
2018-05-30 12:44:07 -07:00
jMyles
71db482fc5
More complete tests for cfrag attachment.
2018-05-29 23:33:14 -07:00
jMyles
cb7bbcdbed
We need the verifying key also.
2018-05-29 22:03:09 -07:00
jMyles
bf6a375d57
Functions for getting or setting keys on Capsule, and taking them in __init__.
2018-05-29 18:51:49 -07:00
jMyles
3177696f30
Some more code and naming touchups.
2018-05-28 10:54:50 -07:00
jMyles
6038dff98d
Using expected_bytes_length for various crypto entities.
2018-05-26 12:12:33 -07:00
jMyles
a7d203aa44
Tests that were using old fixture now work with new one.
2018-05-25 15:43:19 -07:00
jMyles
8394cf6e44
Message for validating KFrag is now bytes of constituents instead of a BigNum. Fixes #148 .
2018-05-25 14:41:13 -07:00
jMyles
e4792b40ba
Using ECDSA for kfrag signature and verification.
2018-05-24 18:32:54 -07:00
jMyles
0632a53d0e
Signing and verifying using ECDSA instead of Schnorr signature.
2018-05-24 18:07:13 -07:00
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
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
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
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
David Nuñez
aeb8ad3298
Fix calls to CurveBN.hash()
2018-05-02 01:25:42 +02:00
David Nuñez
ce3caf9dfb
Remove unused import hmac
2018-04-30 00:19:35 +02:00
tuxxy
6c2dd86522
Remove __hash__ on CurveBN and make Capsule._attached_cfrags a list
...
Remove unused Capsule._contents
2018-04-24 16:39:20 -06:00
tuxxy
150714fb00
Add get_size classmethods for CurveBN, Point, fragments, and
...
CorrectnessProof.
Fix syntax error
2018-04-24 16:28:01 -06:00
tuxxy
923ad2944f
Rename BigNum -> CurveBN
...
Change all references from BigNum to CurveBN
2018-04-24 12:41:40 -06:00
David Nuñez
63f63b4235
Big renaming
2018-04-24 10:42:10 -07:00
David Nuñez
02ea0aaf3b
Added `check_proof` parameter to pre.decrypt
2018-04-24 10:21:43 +02:00
David Nuñez
4304a7da40
Improve readability of valid_kfrag_signature check
2018-04-24 01:18:26 +02:00
David Nuñez
7d9bc19fc4
Fix call to hash_to_bn
2018-04-23 23:13:11 +02:00
David Nuñez
f1a847d219
Merge remote-tracking branch 'nucypher/master' into cfrags-with-correctness-proof
...
# Conflicts:
# umbral/pre.py
2018-04-23 22:58:52 +02:00
David Nuñez
cb326488c9
Correctness proofs are now optional, although default setting is True
2018-04-22 23:43:39 +02:00
David Nuñez
f646fdc241
More informative names in _verify_correctness()
2018-04-22 23:34:13 +02:00
David Nuñez
b714f47d10
Some renaming
2018-04-19 13:14:33 +02:00
David Nuñez
b725a5e9ac
pre._verify_correctness_proof() --> pre._verify_correctness()
2018-04-19 13:00:19 +02:00
David Nuñez
fca002632e
Enter UmbralCorrectnessError
2018-04-18 22:59:27 +02:00
David Nuñez
88961b35d3
Reformat
2018-04-18 22:40:05 +02:00
David Nuñez
0e064c4046
Now re-encryption correctness is always verified during decryption
2018-04-18 15:14:10 +02:00
David Nuñez
094b8c9e0c
Remove metadata as parameter of pre.verify_correctness_proof()
2018-04-18 12:00:09 +02:00