Skip to content

Commit

Permalink
encpedpop: Add decryption for a single plaintext
Browse files Browse the repository at this point in the history
  • Loading branch information
real-or-random committed Oct 18, 2024
1 parent c3e4546 commit 43237b7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions python/chilldkg_ref/encpedpop.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,20 @@ def decaps(
return pad


def decrypt(
deckey: bytes,
enckey: bytes,
pubnonce: bytes,
context: bytes,
idx: int,
sender_idx: int,
ciphertext: Scalar,
) -> Scalar:
pad = decaps(deckey, enckey, pubnonce, context, idx, sender_idx)
plaintext: Scalar = ciphertext - pad
return plaintext


def decrypt_sum(
deckey: bytes,
enckey: bytes,
Expand Down

0 comments on commit 43237b7

Please sign in to comment.