Skip to main content

Crypto - basicLLL

Sur base du fichier .sage fourni 

Evaluate avec : https://sagecell.sagemath.org/ pour obtenir x, a, n, k & c.

p = k // a              # division entière : x·y est négligeable
q = n // p
from Crypto.Util.number import inverse, long_to_bytes
phi = (p-1)*(q-1)
d   = inverse(65537, phi)
flag = long_to_bytes(pow(c, d, n)).decode()
print(flag)             # → L3AK{...}

Idée : dans k = x·y + a·p, le terme x·y est ridiculement petit, donc p = [k / a]