summaryrefslogtreecommitdiff
path: root/src/leap/soledad/crypto.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/soledad/crypto.py')
-rw-r--r--src/leap/soledad/crypto.py39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/leap/soledad/crypto.py b/src/leap/soledad/crypto.py
index c956f602..9d2227bd 100644
--- a/src/leap/soledad/crypto.py
+++ b/src/leap/soledad/crypto.py
@@ -49,20 +49,6 @@ class SoledadCrypto(object):
self._pgp = openpgp.OpenPGPScheme(self._soledad)
self._symkey = None
- def encrypt_asym(self, data, key):
- """
- Encrypt data.
-
- @param data: the data to be encrypted
- @type data: str
- @param key: the key to be used for encryption
- @type key: str
-
- @return: the encrypted data
- @rtype: str
- """
- return openpgp.encrypt_asym(data, key)
-
def encrypt_sym(self, data, passphrase):
"""
Encrypt C{data} using a {password}.
@@ -77,21 +63,6 @@ class SoledadCrypto(object):
"""
return openpgp.encrypt_sym(data, passphrase)
- def decrypt_asym(self, data):
- """
- Decrypt data.
-
- @param data: the data to be decrypted
- @type data: str
- @param passphrase: the passphrase to be used for decryption
- @type passphrase: str
-
- @return: the decrypted data
- @rtype: str
- """
- key = self._pgp.get_key(self._soledad.address, private=True)
- return openpgp.decrypt_asym(data, key)
-
def decrypt_sym(self, data, passphrase):
"""
Decrypt data using symmetric secret.
@@ -127,16 +98,6 @@ class SoledadCrypto(object):
"""
return openpgp.is_encrypted_sym(data)
- def is_encrypted_asym(self, data):
- """
- Test whether some chunk of data was encrypted to an OpenPGP private
- key.
-
- @return: whether data is encrypted to an OpenPGP private key
- @rtype: bool
- """
- return openpgp.is_encrypted_asym(data)
-
def passphrase_hash(self, suffix):
"""
Generate a passphrase for symmetric encryption.