当前位置:网站首页>BUUCTF-RSA
BUUCTF-RSA
2022-07-27 23:54:00 【[email protected]】
1. subject
Public key :pub.key
-----BEGIN PUBLIC KEY-----
MDwwDQYJKoZIhvcNAQEBBQADKwAwKAIhAMAzLFxkrkcYL2wch21CM2kQVFpY9+7+
/AvKr1rzQczdAgMBAAE=
-----END PUBLIC KEY-----
Perform public key decomposition :

Break down links :RSA Public private key decomposition Exponent、Modulus,Rsa Public private key index 、 coefficient ( modulus ) decompose -- Error checking network
obtain 10 Base number n=86934482296048119190666062003494800588905656017203025617216654058378322103517
decompose n:

import rsa
import gmpy2
e= 65537
n= 86934482296048119190666062003494800588905656017203025617216654058378322103517
p= 285960468890451637935629440372639283459
q= 304008741604601924494328155975272418463
phi=(p-1)*(q-1)
d= gmpy2.invert(e,phi)
key = rsa.PrivateKey(n,e,d,q,p) # stay pkcs In the standard ,pkcs#1 Regulations , The private key contains (n,e,d,p,q)
with open("D:\\ctf\\flag\\flag.enc","rb") as f: # In binary read mode , Read ciphertext
f = f.read()
print(rsa.decrypt(f,key)) # f: Public key encryption results key: Private key
#b'flag{decrypt_256}\n'版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/208/202207272106553693.html
边栏推荐
- Remotely debug idea, configure remote debug, and add JVM startup parameter -xdebug in the program of remote server
- Monologue of a software Investor: why don't I pursue fast-growing companies
- Your list is too laggy? These four optimizations can make your list silky smooth
- Explain the idempotence of distributed system in detail
- The share price soared 180.46%! Shanghai silicon industry, the leader of domestic large silicon wafers, is listed: the cumulative net profit in recent four years is less than 60million
- 硬布线控制器的特点:
- 15million per day! BYD masks won a US $1billion order in California
- 2022 summer vacation daily question (5)
- How Flink uses savepoint
- 2022/7/26
猜你喜欢
![[GWCTF 2019]BabyRSA1](/img/31/6727fd04be13ddd6bd46969fe2c50f.png)
[GWCTF 2019]BabyRSA1

The first activity of togaf10 standard reading club was successfully held, and the wonderful moments were reviewed!

My annual salary is 1million, and I don't have clothes more than 100 yuan all over my body: saving money is the top self-discipline

Construction and application of super large scale knowledge map of ants

Record the errors about formatc in R language

Character stream learning 14.3

TCP sticking and unpacking problem + Solution

Sudden, wechat important notice

CaEGCN: Cross-Attention Fusion based Enhanced Graph Convolutional Network for Clustering 2021

Explain the idempotence of distributed system in detail
随机推荐
NDK series (6): let's talk about the way and time to register JNI functions
为什么 Redis 集群要使用反向代理? 看这篇就明白了
J9数字科普:Sui网络的双共识是如何工作的?
虚拟存储器与Cache的比较
Lua基础语法学习
7.6万人停工!东芝宣布关闭日本所有工厂
如果我们是那晚负责修复 B 站崩了的开发人员
15million per day! BYD masks won a US $1billion order in California
JUC toolkit learning
Interviewer: let's talk about the specific process of network data transmission
BUUCTF-childRSA费马小定理
Features of hardwired controller:
[NPUCTF2020]EzRSA
org.junit.runners.model. InvalidTestClassError: Invalid test class ‘com.zhj.esdemo. MysqlTests‘: 1.
How to use FTP to realize automatic update of WinForm
[GWCTF 2019]BabyRSA1
Why do I need to wait for 2msl?
Use of date
解密 OOM 崩溃下降 90% 的秘密~
[JS reverse hundred examples] a public resource trading network, reverse analysis of announcement URL parameters