Add placeholder for decrypt method

pull/79/head
tuxxy 2017-10-11 20:24:03 -06:00
parent ed5a1a30a8
commit 5a30ab0626
No known key found for this signature in database
GPG Key ID: 7BB971A0E89144D9
1 changed files with 19 additions and 0 deletions

View File

@ -201,6 +201,8 @@ class EncryptingPower(CryptoPowerUp):
:param M: Minimum number of kFrags needed to complete ciphertext
:param N: Total number of kFrags to generate.
:param path: Path of file to generate pathkey(s) for
:return: Tuple((enc_data, enc_eph_key), enc_data_key, reenc_frags)
"""
# Encrypt plaintext data with nacl.SecretBox (symmetric)
data_key = API.secure_random(EncryptingPower.KEYSIZE)
@ -224,3 +226,20 @@ class EncryptingPower(CryptoPowerUp):
enc_eph_key = self._encrypt_key(eph_priv_key, recp_keypair.pubkey)
return ((enc_data, enc_eph_key), enc_data_key, reenc_frags)
def decrypt(
self,
enc_data: bytes,
enc_eph_key: bytes,
key_frags: List[umbral.EncryptedKey]
) -> bytes:
"""
Decrypts data using the ECIES scheme.
:param enc_data: Encrypted data to decrypt
:param enc_eph_key: The encrypted ephemeral key
:param key_frags: Re-encryption keyfrags to combine.
:return: Decrypted data
"""
pass