bobocep.dist.crypto.crypto.BoboDistributedCrypto

class bobocep.dist.crypto.crypto.BoboDistributedCrypto[source]

Bases: abc.ABC

Abstract class for distributed crypto.

__init__()
abstract decrypt(msg_bytes: bytes) str[source]
Parameters

msg_bytes – Message to decrypt.

Returns

Decrypted message.

abstract encrypt(msg_str: str) bytes[source]
Parameters

msg_str – Message to encrypt.

Returns

Encrypted message.

abstract end_bytes() bytes[source]
Returns

Bytes used to signify the end of every encrypted payload.

abstract min_length() int[source]
Returns

The minimum possible length of an encrypted payload, in number of bytes.