This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://pdfs.semanticscholar.org/2d85/9e8937fe652558a60e82ffd39cd4ab835e31.pdf, Section4.4 | |
# As LLL is not precise for there are only 10 public keys, so I use Babai instead. | |
# Just randomly construct the target vector, if it is close enough to (dM, 1−k1Λ1, ..., 1−krΛr), we may recover d. | |
from Crypto.Util.number import * | |
import random | |
k = 10 | |
f = open('output', 'rb') | |
f.readline() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
from random import randint | |
f = open('gov_officials_PK.txt') | |
pk = [] | |
while True: | |
try: | |
pk.append(int(f.readline())) | |
except: | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pwn import * | |
from Crypto.Util.number import * | |
import hmac | |
from hashlib import md5 | |
context.log_level = 'critical' | |
p = 337333846325195852023465984016735747017640658020735865443882234978293187151183899366894634062588357161 | |
def register(name, base): | |
con = remote('18.216.251.207', 3197) |