Mic Check

1
cybrics{An5WEr_t0_T3h_M1C_Ch3CK}

Broken Invitation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from Crypto.Util.number import *
from libnum import solve_crt
import gmpy2

def BroadcastAttack(N, C):
e = 3
m = solve_crt(C, N)
ans = gmpy2.iroot(m, e)
if ans[1] == True:
return ans[0]
else:
raise Exception('BroadcastAttack Failed')


if __name__ == '__main__':
NA = 924506488821656685683910901697171383575761384058997452768161613244316449994435541406042874502024337501621283644549497446327156438552952982774526792356194523541927862677535193330297876054850415513120023262998063090052673978470859715791539316871
NB = 88950937117255391223977435698486265468789676087383749025900580476857958577458361251855358598960638495873663408330100969812759959637583297211068274793121379054729169786199319454344007481804946263873110263761707375758247409
NC = 46120424124283407631877739918717497745499448442081604908717069311339764302716539899549382470988469546914660420190473379187397425725302899111432304753418508501904277711772373006543099077921097373552317823052570252978144835744949941108416471431004677

c1 = 388825822870813587493154615238012547494666151428446904627095554917874019374474234421038941934804209410745453928513883448152675699305596595130706561989245940306390625802518940063853046813376063232724848204735684760377804361178651844505881089386
c2 = 4132099145786478580573701281040504422332184017792293421890701268012883566853254627860193724809808999005233349057847375798626123207766954266507411969802654226242300965967704040276250440511648395550180630597000941240639594
c3 = 43690392479478733802175619151519523453201200942800536494806512990350504964044289998495399805335942227586694852363272883331080188161308470522306485983861114557449204887644890409995598852299488628159224012730372865280540944897915435604154376354144428

N = [NA, NB, NC]
C = [c1, c2, c3]

print(long_to_bytes(BroadcastAttack(N,C))[::-1])

Too Secure

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import hashlib
from Crypto.Util.number import *

g = 10729072579307052184848302322451332192456229619044181105063011741516558110216720725
qs = [2, 3, 7, 3671, 10733,
1039300813886545966418005631983853921163721828798787466771912919828750891]
p = 12039102490128509125925019010000012423515617235219127649182470182570195018265927223
q = 1039300813886545966418005631983853921163721828798787466771912919828750891

def Hat(x):
G = pow(g, x, p)

G = long_to_bytes(G)
if len(G) < 128:
G = b'\x00' * (128 - len(G)) + G

a = hashlib.sha512(G).hexdigest()
a = int(a, 16)
return pow(a, a, p-1)


r1 = 31245182471

M1 = b"Hi! I am Vadim Davydov from ITMO University"
x1 = int.from_bytes(M1, 'little')
h1 = Hat(x1)
print(f'h1: {h1}')

M2 = b"Transfer the points for easy task to this team"
x2 = int.from_bytes(M2, 'little')
h2 = Hat(x2)
print(f'h2: {h2}')

r2 = ((x1 - x2 + h1 * r1) * inverse(h2, q)) % (q)
print(f'r2: {r2}')
>>> 'r2: 299610740605778098196154877327490870095375317123548563579894088319476495'

Serial

image-20200729035626109

So,we hold this equation 99999 * 99999 * 99999 + 1 * 1 * 1 == 99999 * 99999 * 99999

评论