Skip to content

Commit

Permalink
Add type annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
  • Loading branch information
tom-cosgrove-arm committed Dec 6, 2022
1 parent c240600 commit 21d459d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/mbedtls_dev/bignum_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@ def __init__(self, val_n: str, val_a: str, val_b: str = "0",
# provides earlier/more robust input validation.
self.int_n = hex_to_int(val_n)

def to_montgomery(self, val) -> int:
def to_montgomery(self, val: int) -> int:
return (val * self.r) % self.int_n

def from_montgomery(self, val) -> int:
def from_montgomery(self, val: int) -> int:
return (val * self.r_inv) % self.int_n

@property
Expand Down

0 comments on commit 21d459d

Please sign in to comment.