> For the complete documentation index, see [llms.txt](https://gitbook.youngseaz.com/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.youngseaz.com/notes/00-wang-luo-an-quan/ctf/utctf_2024_rsa_256.md).

# UTCTF\_2024\_RSA\_256

## 题目描述

Based on the military-grade encryption offered by AES-256, RSA-256 will usher in a new era of cutting-edge security... or at least, better security than RSA-128.

By Jeriah (@jyu on discord)

## 附件内容

```
N = 77483692467084448965814418730866278616923517800664484047176015901835675610073
e = 65537
c = 43711206624343807006656378470987868686365943634542525258065694164173101323321
```

## 解题思路

RSA 算法题，尝试[在线分解大数](http://factordb.com/) N ，

* p = 1025252665848145091840062845209085931
* q = 75575216771551332467177108987001026743883

直接解题得到 utflag{just\_send\_plaintext}

```python
import libnum
from gmpy2 import invert

n = 77483692467084448965814418730866278616923517800664484047176015901835675610073
e = 65537
c = 43711206624343807006656378470987868686365943634542525258065694164173101323321
p = 1025252665848145091840062845209085931
q = 75575216771551332467177108987001026743883
assert n == p * q
d = invert(e, (p - 1) * (q - 1))
m = pow(c, d, n)
print(libnum.n2s(int(m)))

```
