Bleichenbacher (million messages)
In 1998, Bleichenbacher showed that if a server outputs a single "yes/no" answer on whether the padding format of a ciphertext is correct or not (a padding oracle), the entire message can be recovered based on this answer without the private key. It is also called the "million message attack".
Simplified variant: the format is considered "conforming" when for the decrypted number m' it holds 2B ≤ m' < 3B (where B = 256^(k−1), k is the number of bytes in n). That is, the high "byte" is equal to 2.
The attack is adaptive: at each step, we choose a new multiplier s and ask if c·s^e is conforming; if it is conforming, we narrow the possible message interval. In the end, the interval shrinks to a single number.
During a successful attack, all s values that conformed (in order) are in the attached mos_s_qiymatlari.txt file. Repeat the interval narrowing using these s values to find m.
e = 65537, k = 64 bytes, B = 256^(k−1).
n =
6325989270015183700273823007035934369348148081763730273962759832
6448195331456056829802930484708837154067103445821590818668854039
48988157480678607745261517
c =
6836232018285282023248879396644333061466569092137840072210329116
3732661307738903324866597306452094850113997704353778284593141630
7084580200634895409175148
Initial interval M = {[2B, 3B−1]}. For each s: for every [a,b] and every r ∈ [⌈(a·s−3B+1)/n⌉, ⌊(b·s−2B)/n⌋], the new [max(a, ⌈(2B+r·n)/s⌉), min(b, ⌊(3B−1+r·n)/s⌋)]. At the end, a = b = m. Flag = m − 2B.