polyRSA - InCTF Internationals 2020
TL;DR
- Factor the modulus and Find phi.
- Find the inverse of e and Decrypt the ciphertext.
Challenge
Polynomial RSA
Challenge Points: 100
Description
All that warmup you need to get started. Challenge files: out.txt.
Challenge Author: pyr0
Attachment
- out.txt
given file
By looking at this, we can say that the challenge is about polynomial RSA, as mentioned in the name PolyRSA
.
1 | sage: p |
We have all the public parameters.
decryption
If we see the n
, it is a polynomial, and we have enough algorithms to factorise it, unlike integers.
Here if we notice, the totient function for the polynomials differs from the totient function for the integers.
1 | #finding inverese |
Moreover, here m is a polynomial. We can use bytes(m.list())
to change it to bytes.
solution
1 | #given: |
Conclusion
Polynomials are easy to factorise, so we cannot use them for RSA.
I hope you enjoyed the challenge!