opssl php rsa_id0-rsa WP 合集

id0-rsa WP 合集

忙里偷闲做做题 wwwwwwwwwwwwwIntrotoHashinghttps://id0-rsa.pub/problem/18/

Introto PGP https://id0-rsa.pub/problem/19/

HelloPGP https://id0-rsa.pub/problem/1/

HelloOpenSSLhttps://id0-rsa.pub/problem/3/

Introto RSA https://id0-rsa.pub/problem/21/

Caesarhttps://id0-rsa.pub/problem/32/

HelloBitcoinhttps://id0-rsa.pub/problem/2/

PsandQshttps://id0-rsa.pub/problem/8/

AffineCipherhttps://id0-rsa.pub/problem/5/

CutandPasteAttackOnAES-ECB https://id0-rsa.pub/problem/26/

RailFencehttps://id0-rsa.pub/problem/34/

FactoringRSAWithCRTOptimizationhttps://id0-rsa.pub/problem/15/

EasyPasswordshttps://id0-rsa.pub/problem/38/

RSAModulusFactorizationhttps://id0-rsa.pub/problem/45/

FastHashingPasswordshttps://id0-rsa.pub/problem/24/

Vigenère https://id0-rsa.pub/problem/33/MonoalphabeticCipherhttps://id0-rsa.pub/problem/12/

SaltAloneWon't Save You https://id0-rsa.pub/problem/25/

CCA on Textbook RSA https://id0-rsa.pub/problem/23/

AES-CTR with Nonce Reuse https://id0-rsa.pub/problem/4/

Bad Entropy https://id0-rsa.pub/problem/30/

Double Strength Affine https://id0-rsa.pub/problem/6/

Rainbow Table Hash Chain https://id0-rsa.pub/problem/16/

Elliptic Curve Private Key Recovery https://id0-rsa.pub/problem/10/

ECDSA Nonce Recovery https://id0-rsa.pub/problem/17/

Slightly harder passwords https://id0-rsa.pub/problem/41/

Upgraded Affine https://id0-rsa.pub/problem/40/

Fvtavat Xrl Erpbirel https://id0-rsa.pub/problem/39/

Insufficient Key Size https://id0-rsa.pub/problem/9/

H?stad'sBroadcastAttackhttps://id0-rsa.pub/problem/11/

CBCPaddingAttackhttps://id0-rsa.pub/problem/22/

BreakingPDFPasswordshttps://id0-rsa.pub/problem/29/

Vigenère + Rail Fence https://id0-rsa.pub/problem/35/Recoverthe secret phone number https://id0-rsa.pub/problem/43/

OptimalBackpackAllocationhttps://id0-rsa.pub/problem/42/

InsecurePRNG https://id0-rsa.pub/problem/27/

Playfairhttps://id0-rsa.pub/problem/13/

CRIMEsagainst TLS https://id0-rsa.pub/problem/20/

Bleichenbacher's CCA2 on RSA https://id0-rsa.pub/problem/14/

Backdoored PRNG https://id0-rsa.pub/problem/31/

Not So Safe Primes https://id0-rsa.pub/problem/37/

DSA with LCG nonces https://id0-rsa.pub/problem/44/

Intro to Hashing

import hashlib

hashlib.md5(hashlib.sha256('id0-rsa.pub').hexdigest()).hexdigest()

# 'b25d449d86aa07981d358d3b71b891de'

Intro to PGP

# bash

[email protected]:~/Documents/id0-rsa# touch Intro_to_PGP.key

[email protected]:~/Documents/id0-rsa# gpg --import Intro_to_PGP.key

gpg: key 2503D0F1A81B09D4: public key "id0-rsa.pub (http://id0-rsa.pub) " imported

gpg: Total number processed: 1

gpg: imported: 1

[email protected]:~/Documents/id0-rsa# touch Intro_to_PGP.txt

[email protected]:~/Documents/id0-rsa# gpg -d Intro_to_PGP.txt

# Thank you Phil Zimmermann!

Hello PGP

#!/bin/bash

count=1

while read Word; do

gpg --batch --passphrase $Word --decrypt test.txt 2>/dev/null

if [ $? -eq 0 ]; then

echo

echo $Word

exit

fi

count=$(( count + 1 ))

if [ $((count % 1000)) -eq 0 ]; then

echo $count

fi

done

# passionately apathetic

# seamanship

# gpg: AES256 encrypted data

# gpg: encrypted with 1 passphrase

Hello OpenSSL

繁琐的解法# bash

[emailprotected]:~/Documents/id0-rsa/Hello_OpenSSL# openssl rsa -in priva.pem -text

Private-Key:(256bit)

modulus:

00:e6:dc:a0:a5:26:5d:39:95:0c:7e:e3:b7:a1:31:

96:47:87:00:2c:1b:56:ba:2e:54:ce:b4:30:db:ff:

09:95:9d

publicExponent:65537(0x10001)

privateExponent:

00:8f:67:e1:8a:75:28:57:ca:94:76:85:f1:dd:79:

b6:05:0e:35:05:e7:f9:ed:da:23:e6:de:14:aa:22:

d9:78:a9

prime1:

00:fd:99:07:3e:67:03:c1:72:2a:96:81:ab:9a:29:

db:d7

prime2:

00:e9:0c:76:fe:de:98:c1:9d:d3:c8:30:c0:e4:3a:

8b:ab

exponent1:

00:b4:a6:37:17:c7:d0:50:14:20:ac:58:30:c2:c0:

00:bf

exponent2:

00:c5:87:27:25:07:8e:fa:2c:c7:e0:9a:52:24:1f:

eb:59

coefficient:

00:e3:bd:9b:a2:47:11:68:33:2d:80:fe:7d:ed:34:

de:fc

writing RSA key

-----BEGINRSA PRIVATE KEY-----

MIGtAgEAAiEA5tygpSZdOZUMfuO3oTGWR4cALBtWui5UzrQw2/8JlZ0CAwEAAQIh

AI9n4Yp1KFfKlHaF8d15tgUONQXn+e3aI+beFKoi2XipAhEA/ZkHPmcDwXIqloGr

minb1wIRAOkMdv7emMGd08gwwOQ6i6sCEQC0pjcXx9BQFCCsWDDCwAC/AhEAxYcn

JQeO+izH4JpSJB/rWQIRAOO9m6JHEWgzLYD+fe003vw=

-----ENDRSA PRIVATE KEY-----

n=0xe6dca0a5265d39950c7ee3b7a131964787002c1b56ba2e54ceb430dbff09959d

d=0x8f67e18a752857ca947685f1dd79b6050e3505e7f9edda23e6de14aa22d978a9

c=0x6794893f3c47247262e95fbed846e1a623fc67b1dd96e13c7f9fc3b880642e42

>>>hex(pow(c,d,n))

'0x310f2eb0634ed1ab'

一行# bash

[emailprotected]:~/Documents/id0-rsa/Hello_OpenSSL# openssl rsautl -decrypt -in

# 310f2eb0634ed1ab

Introto RSA

>>>(e,N)=(0x3,0x64ac4671cb4401e906cd273a2ecbc679f55b879f0ecb25eefcb377ac724ee3b1)

>>>d=0x431d844bdcd801460488c4d17487d9a5ccc95698301d6ab2e218e4b575d52ea3

>>>c=0x599f55a1b0520a19233c169b8c339f10695f9e61c92bd8fd3c17c8bba0d5677e

>>>hex(pow(c,d,N))

'0x4d801868d894740b2be29309fcd3edcd51bd2c2a685028b89290f9268c727581'

Caesar

但是交了以后就显示错误, 不知道为什么......

破案了, 因为凯撒之后的原文是

Hello Bitcoin

按资料算就是了

然而我找到了在线计算的工具 https://gobittest.appspot.com/PrivateKey ;D

按照比特币 wiki 的说法, 计算过程大概是这样的:

首先我们生成一个私钥

获取对应的公钥

获得公钥的 SHA256 散列值

获取上一步结果的 RIPEMD-160 散列值

在散列值前加入版本号

计算上一步结果的 SHA-256 散列

取第二个 SHA-256 散列值的前四字节作为地址校验和

在第四步的结果末尾加入校验和

进行 Base28 编码Youalready solvedthisone!Solution:18GZRs5nx8sVhF1xVAaEjKrYJga4hMbYc2

PsandQs

factordb.com 完成

噫, 年老体衰也就算了, 眼神也不好了, 其实没有分解成功

然后开了个

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值