AlpacaHack Logo

Challenges

Sign InSign Up

Rows:

CHALLENGEAUTHORS

SOLVES

(CURRENT)

Loading challenges...

Rows:

I cannot decrypt RSA

Daily AlpacaHackTopic: RSAReleased: May 26, 2026

74 solves
Crypto
Medium

by

baumroll1234

I implemented an RSA program, but why cannot I revert to the original data after encrypting and decrypting it?

Beginner Hint
  • The reason why it cannot be decrypted correctly is that there is an error in a part of chall.py. Because of this error, it is not guaranteed that the incorrect d and the correct phi are relatively prime, and it becomes very difficult to recover the ciphertext c from the incorrect flag, which happens about once in four times, so please be careful when actually running chall.py to solve it.
  • However, this does not happen in the majority of cases, and the data in the distributed output.txt can also be solved assuming gcd(incorrect d, correct phi)=1.
i-cannot-decrypt-rsa.tar.gz

Please sign in to submit the flag.

descriptionsolveswriteups