diff --git a/noise/noise_protocol.py b/noise/noise_protocol.py index cc18a3f..34cb4d4 100644 --- a/noise/noise_protocol.py +++ b/noise/noise_protocol.py @@ -31,15 +31,15 @@ class NoiseProtocol(object): if self.pattern_modifiers: self.pattern.apply_pattern_modifiers(pattern_modifiers) - self.dh_fn: 'DH' = mappings['dh'] - self.cipher_fn: 'Cipher' = mappings['cipher'] - self.hash_fn: 'Hash' = mappings['hash'] + self.dh_fn = mappings['dh'] + self.cipher_fn = mappings['cipher'] + self.hash_fn = mappings['hash'] - self.psks: list = None # Placeholder for PSKs + self.psks = None # Placeholder for PSKs - self.handshake_state: 'HandshakeState' = Empty() - self.symmetric_state: 'SymmetricState' = Empty() - self.cipher_state: 'CipherState' = Empty() + self.handshake_state = Empty() + self.symmetric_state = Empty() + self.cipher_state = Empty() def _parse_protocol_name(self) -> Tuple[dict, list]: unpacked = self.name.decode().split('_') diff --git a/noise/patterns.py b/noise/patterns.py index 4c6de8e..c2f3f25 100644 --- a/noise/patterns.py +++ b/noise/patterns.py @@ -10,13 +10,13 @@ class Pattern(object): # As per specification, if both parties have pre-messages, the initiator is listed first. To reduce complexity, # pre_messages shall be a list of two lists: # the first for the initiator's pre-messages, the second for the responder - pre_messages: List[list] = [ + pre_messages = [ [], [] ] # List of lists of valid tokens, alternating between tokens for initiator and responder - tokens: List[list] = [] + tokens = [] def __init__(self): self.has_pre_messages = any(map(lambda x: len(x) > 0, self.pre_messages))