You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/learn/crypto.md
+49Lines changed: 49 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -314,7 +314,11 @@ p = getPrime(256)
314
314
q = getPrime(256)
315
315
316
316
# 计算n,即p和q的乘积,用于RSA算法的模数
317
+
<<<<<<< HEAD
317
318
n = p * q
319
+
=======
320
+
n = p*q
321
+
>>>>>>> a45c34ff209a4c248d7650e232fa17e26ff8d5a3
318
322
# 定义公钥指数e,通常为65537
319
323
e = 65537
320
324
# 将flag转换为长整数
@@ -333,6 +337,7 @@ print(f'c = {c}')
333
337
print(f'p = {p}')
334
338
# 打印质数q(通常在CTF中不会直接给出)
335
339
print(f'q = {q}')
340
+
<<<<<<< HEAD
336
341
337
342
# 以下是输出的结果,这些值通常在 CTF 题目中给出
338
343
# n = 4024941574680124502316363981547051098032677531528457166859670261861728313081282635664023890534034586556845494323497683923813915739234466472396261320600483
@@ -344,6 +349,22 @@ print(f'q = {q}')
344
349
345
350
```python:line-numbers [RSA 解密脚本]
346
351
# 导入 Crypto.Util.number 模块中的所有函数,用于处理数字和字节之间的转换等
352
+
=======
353
+
"""
354
+
# 以下是打印的结果,这些值通常在CTF挑战中给出
355
+
n = 4024941574680124502316363981547051098032677531528457166859670261861728313081282635664023890534034586556845494323497683923813915739234466472396261320600483
356
+
e = 65537
357
+
c = 226967182640114431119923862488626190608050511354278604627242247124377735518111678279381846350389469161980779137969837090666693533616114290831130137310320
358
+
p = 62658315832909660478685872111870233686035497063073558738980225214351386198939
0 commit comments