diff --git a/slhdsa/lowlevel/slhdsa.py b/slhdsa/lowlevel/slhdsa.py index f5c092d..ebb2578 100644 --- a/slhdsa/lowlevel/slhdsa.py +++ b/slhdsa/lowlevel/slhdsa.py @@ -19,7 +19,7 @@ def keygen(par: Parameter) -> tuple[tuple[bytes, bytes, bytes, bytes], tuple[byt def validate_secretkey(secret_key: tuple[bytes, bytes, bytes, bytes], par: Parameter) -> bool: sk_seed, sk_prf, pk_seed, pk_root = secret_key - # len(sk_prf) # magic patch for mypyc, otherwise mypyc will crash + len(sk_prf) # magic patch for mypyc, otherwise mypyc will crash address = Address(par.d - 1, 0, 0) pk_root_new = XMSS(par).node(sk_seed, 0, par.h_m, pk_seed, address) return pk_root == pk_root_new diff --git a/slhdsa/slhdsa.py b/slhdsa/slhdsa.py index 6bbcd40..a4ec52d 100644 --- a/slhdsa/slhdsa.py +++ b/slhdsa/slhdsa.py @@ -25,7 +25,7 @@ def from_digest(cls, digest: bytes, par: Parameter) -> "PublicKey": raise exc.SLHDSAKeyException('Wrong digest length') return cls((digest[:par.n], digest[par.n:]), par) - def __str__(self): + def __str__(self) -> str: return f'' @@ -55,7 +55,7 @@ def from_digest(cls, digest: bytes, par: Parameter) -> "SecretKey": raise exc.SLHDSAKeyException("Wrong digest length") return cls((digest[:par.n], digest[par.n:par.n*2], digest[par.n*2:par.n*3], digest[par.n*3:]), par) - def __str__(self): + def __str__(self) -> str: return f''