can we talk
Jump to turn (7)
- 1can we talk
- 2can you write a decryption code for this python code with custom padding : from
- 3it gives me Invalid ciphertext format for this value 0d38bafeadfe0c4302f1fb85b69
- 4Still gives me Invalid ciphertext format for 0d38bafeadfe0c4302f1fb85b692e2dfd78
- 5when i pass cleartext for this initial encrypt() function it gives me output lik
- 6it still error out : Traceback (most recent call last): File "decryptor.py", lin
- 7I'm very confused : Traceback (most recent call last): File "decryptor.py", line
- User
can we talk
- Assistant
Yes, of course! How can I assist you today?
- User
can you write a decryption code for this python code with custom padding : from Crypto.Cipher import AES from Crypto.Util.Padding import pad import os FLAG = "Flag4Testing"
class AAES(): def init(self): self.padding = "CryptoHackTheBox"
codedef pad(self, plaintext): return plaintext + self.padding[:(-len(plaintext) % 16)] + self.padding def encrypt(self, plaintext): cipher = AES.new(os.urandom(16), AES.MODE_ECB) return cipher.encrypt(pad(plaintext, 16))