covertutils.crypto.keys package

Submodules

covertutils.crypto.keys.__main__ module

covertutils.crypto.keys.cyclingkey module

class covertutils.crypto.keys.cyclingkey.CyclingKey(passphrase, **kw)[source]

Bases: object

__init__(passphrase, **kw)[source]
cycle(rounds=1)[source]
getCycles()[source]
getKeyBytes(length)[source]
getKeyLength()[source]
Return type:int
Returns:Returns the key length.
getUUIDBytes(length)[source]
reset()[source]
setCycle(cycle)[source]

covertutils.crypto.keys.encryptionkey module

class covertutils.crypto.keys.encryptionkey.EncryptionKey[source]

Bases: object

decrypt(crypt)[source]
encrypt(plain)[source]

covertutils.crypto.keys.standardcyclingkey module

class covertutils.crypto.keys.standardcyclingkey.StandardCyclingKey(passphrase, cycling_algorithm=None, cycle=True, salt=None, **kw)[source]

Bases: covertutils.crypto.keys.cyclingkey.CyclingKey, covertutils.crypto.keys.encryptionkey.EncryptionKey

__init__(passphrase, cycling_algorithm=None, cycle=True, salt=None, **kw)[source]
Parameters:
  • passphrase (str) – The key will be created against a passphrase. Passphrase will be the primary seed of all cycling. If a Secure __hash function is used, it is length won’t provide additional security, or better encryption.
  • cycling_algorithm (object) – The cycling algorithm determines the key quality. By default the :class:CyclingAlgorithm class is used, but hashlib.md5, hashlib.sha256 and every hash function object with a digest() method can be used.
  • salt (str) – Salt further differentiates the key from other keys with the same passphrase. For two keys to be compatible they must have the same salt too. If not specified a default salt is used.
cycle(rounds=1)[source]
decrypt(crypt)[source]
encrypt(plain)[source]
getCycles()[source]
Return type:int
Returns:Returns the number of rounds the key has cycled.
getKeyBytes(length=None)[source]
getKeyLength()[source]
getUUIDBytes(length=None)[source]
reset()[source]
setCycle(cycle)[source]
xor(message, cycle=True)[source]

Module contents