Skip to content

Commit

Permalink
small type annotation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
leonschmidt99 committed Jan 19, 2023
1 parent 5dde37b commit 7d1fb8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions kvac/parameters.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Tuple, NamedTuple
from typing import List, NamedTuple, Optional, Tuple
from curve25519_dalek.ristretto import RistrettoPoint
from curve25519_dalek.scalar import Scalar

Expand Down Expand Up @@ -62,7 +62,7 @@ class ServerKeyPair(NamedTuple):
I: RistrettoPoint

@classmethod
def generate(cls, system: SystemParams, sho: RistrettoSho = None) -> 'ServerKeyPair':
def generate(cls, system: SystemParams, sho: Optional[RistrettoSho] = None) -> 'ServerKeyPair':
if sho is None:
sho = RistrettoSho(
b'Signal_HPICrypto_SecMes2223_KVAC_Credential_ServerKeyPair_Generation',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_system_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def get_point_from_hardcoded_system(system_index: int) -> RistrettoPoint:
)


def test_generate_signal_hardcoded_test_system() -> kvac.SystemParams:
def test_generate_signal_hardcoded_test_system():
# assumption: kvac.RistrettoSho uses HMAC-SHA-256 SHO
sho = kvac.RistrettoSho(
b"Signal_ZKGroup_20200424_Constant_Credentials_SystemParams_Generate",
Expand Down

0 comments on commit 7d1fb8e

Please sign in to comment.