public_key_cryptography course - challenges 1 and 2 - pow and basic encryption
This commit is contained in:
parent
591979d7ef
commit
410a1b7cac
2 changed files with 18 additions and 1 deletions
8
public_key_cryptography.py
Normal file
8
public_key_cryptography.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Challenge PK-crypto-1
|
||||
def modular_exponentiation():
|
||||
return pow(101, 17, 22663)
|
||||
|
||||
|
||||
# Challenge PK-crypto-2
|
||||
def basic_encryption(message: int, p: int, q: int):
|
||||
return pow(message, 0x10001, p * q)
|
||||
Loading…
Add table
Add a link
Reference in a new issue