From 0eef0c289cca1a235d4b83c8c76507837fcd457c Mon Sep 17 00:00:00 2001 From: jMyles Date: Fri, 26 Jan 2018 21:48:00 -0800 Subject: [PATCH] Touching up TODOs. --- tests/test_umbral.py | 3 --- umbral/umbral.py | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/test_umbral.py b/tests/test_umbral.py index 74e70fa..100fd78 100644 --- a/tests/test_umbral.py +++ b/tests/test_umbral.py @@ -141,12 +141,10 @@ def test_capsule_serialization(): capsule_bytes = capsule.to_bytes() # A Capsule can be represented as the 98 total bytes of two Points (33 each) and a BigNum (32). - # TODO: Do we want to include the cfrags as well? See #20. assert len(capsule_bytes) == 33 + 33 + 32 == 98 new_capsule = umbral.Capsule.from_bytes(capsule_bytes, umbral.UmbralParameters().curve) - # TODO: Have method that gives us these attributes instead of needing to access them directly. assert new_capsule.original_components() == capsule.original_components() def test_reconstructed_capsule_serialization(): @@ -171,7 +169,6 @@ def test_reconstructed_capsule_serialization(): new_rec_capsule = umbral.Capsule.from_bytes( rec_capsule_bytes, umbral.UmbralParameters().curve, is_reconstructed=True) - # TODO: Have method that gives us these attributes instead of needing to access them directly. assert new_rec_capsule._point_eph_e_prime == capsule._point_eph_e_prime assert new_rec_capsule._point_eph_v_prime == capsule._point_eph_v_prime assert new_rec_capsule._point_noninteractive == capsule._point_noninteractive diff --git a/umbral/umbral.py b/umbral/umbral.py index 02ce7b5..d77f3e4 100644 --- a/umbral/umbral.py +++ b/umbral/umbral.py @@ -188,7 +188,7 @@ class Capsule(object): self.cfrags[cfrag.bn_kfrag_id] = cfrag def open(self, pub_bob, priv_bob, pub_alice, force_reopen=False, pre=None): - # TODO: Raise an error here if Bob has gathered enough cFrags. + # TODO: Raise an error here if Bob has gathered enough cFrags? See #22. if self.contents and not force_reopen: newly_opened = True else: @@ -341,7 +341,7 @@ class PRE(object): return rk_shares, vKeys def reencrypt(self, kFrag, capsule): - # TODO: Put the assert at the end, but exponentiate by a randon number when false? + # TODO: Put the assert at the end, but exponentiate by a randon number when false? See #39. assert capsule.verify(self.params), "Generic Umbral Error" e1 = kFrag.bn_key * capsule._point_eph_e v1 = kFrag.bn_key * capsule._point_eph_v