11 lines
268 B
Python
11 lines
268 B
Python
|
"""
|
||
|
Some basic math functionalities
|
||
|
"""
|
||
|
def modular_exponentiation(base: int, exp: int, field: int) -> int:
|
||
|
"""
|
||
|
calculates base^exp in the gallois given gallois field
|
||
|
|
||
|
Uses iterative squaring to be able to calculate large exponents aswell.
|
||
|
"""
|
||
|
...
|