AlpacaHack Logo

Tag: RSA

Sign InSign Up
RSA

RSA is a representative public-key cryptosystem whose security is based on the difficulty of integer factorization. (automatically translated from Japanese)

minaminao
·Updated Apr 24, 2026
RSA Challenges

I cannot decrypt RSA

Daily AlpacaHackTopic: RSAReleased: May 26, 2026

89 solves
Crypto

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