MCPcopy Create free account
hub / github.com/Apress/practical-cryptography-in-python / simple_rsa_decrypt

Function simple_rsa_decrypt

src/rsa_oracle_attack.py:24–26  ·  view source on GitHub ↗
(c, privatekey)

Source from the content-addressed store, hash-verified

22 return gmpy2.powmod(m, numbers.e, numbers.n)
23
24def simple_rsa_decrypt(c, privatekey):
25 numbers = privatekey.private_numbers()
26 return gmpy2.powmod(c, numbers.d, numbers.public_numbers.n)
27#### DANGER ####
28
29# RSA Oracle Attack Component

Callers 1

__call__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected