Hackthebox, Hacking, Hackthebox Writeup, Htb, Crypto.
Final Code: #!/usr/bin/python3 from Crypto.Util.number import getPrime, long_to_bytes, inverse import binascii class RSA: def __init__(self): self.p = getPrime(512) self.q = getPrime(512) self.e = 3 self.n = self.p * self.q self.d = inverse(self.e, (self.p-1)*(self.q-1)) def encrypt(self, data: