Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

Commit 0d88bb4

Browse files
committed
Modified Hastad's Broadcast Attack README
1 parent ac9d281 commit 0d88bb4

File tree

7 files changed

+16
-15
lines changed

7 files changed

+16
-15
lines changed
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Multicast
22

3-
Many messages intercepted.
4-
Break them.
5-
6-
Points: 175
7-
8-
Check the writeup of this challenge [here](https://github.com/ashutosh1206/Crypto-CTF-Writeups/tree/master/2017/Plaid-CTF/Multicast)
3+
1. Challenge Description: Many messages intercepted. Break them.
4+
2. Challenge Writeups:
5+
+ [My writeup](https://github.com/ashutosh1206/Crypto-CTF-Writeups/tree/master/2017/Plaid-CTF/Multicast)
6+
+ [Other writeups](https://ctftime.org/task/3999)
7+
8+
## Directory Contents
9+
1. [data.txt](data.txt)- output file
10+
2. [generate.sage](generate.sage)- encryption script
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Challenges
2+
23

3-
## Hastad's Broadcast Attack on unpadded messages
4-
5-
6-
## Hastad's Broadcast Attack on padded messages
7-
1. Multicast - Plaid CTF 2017
4+
| S.No. | Challenge | CTF | Year | Difficulty Level | Points |
5+
|-------|:--------------------------------------------------------------------:|:------------------------:|:----:|:----------------:|:------:|
6+
| 1 | [Multicast](Multicast/) | Plaid | 2017 | _None_ | 175 |
674 Bytes
Loading
694 Bytes
Loading
686 Bytes
Loading
1.07 KB
Loading

RSA-encryption/Attack-Hastad-Broadcast/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ We will start by discussing the simplest form of Hastad's Broadcast Attack and t
99
## Hastad's Broadcast Attack on unpadded message
1010
Suppose Alice sends an unpadded message M to `k` people P<sub>1</sub>, P<sub>2</sub>, ..., P<sub>k</sub> each using a same small public key exponent `e` and different moduli `N` for ith individual, the public key for ith individual (N<sub>i</sub>, e). The attack states that as soon as `k>=e`, the message M is no longer secure and we can recover it easily using Chinese Remainder Theorem. Let us see how, using an example: Alice sends a message M to 3 three different people using the above conditions and using the same public key exponent `e = 3`. Let the ciphertext received by ith receiver be C<sub>i</sub> where C<sub>i</sub> = M<sup>3</sup> mod N<sub>i</sub>. We have to assume that **gcd(N<sub>i</sub>, N<sub>j</sub>)** where `i != j` (Otherwise if we get a common factor between a pair of moduli let us suppose it to be k, we can factorise both of them, since we then know one of the factors of N<sub>i</sub> and we can calculate the other as N<sub>i</sub>/k). We can now write:
1111

12-
![equation](https://latex.codecogs.com/png.latex?{\displaystyle&space;M^{3}\equiv&space;C_{1}{\pmod&space;{N_{1}}}})
13-
![equation](https://latex.codecogs.com/png.latex?{\displaystyle&space;M^{3}\equiv&space;C_{2}{\pmod&space;{N_{2}}}})
14-
![equation](https://latex.codecogs.com/png.latex?{\displaystyle&space;M^{3}\equiv&space;C_{3}{\pmod&space;{N_{3}}}})
12+
![equation](Pictures/1.gif)
13+
![equation](Pictures/2.gif)
14+
![equation](Pictures/3.gif)
1515

1616
Thus we can get the following by solving using Chinese Remainder Theorem:
17-
![equation](https://latex.codecogs.com/png.latex?M^{3}&space;=&space;\sum_{i=1}^3&space;C_i&space;b_i&space;b'_i&space;\pmod{N})
17+
![equation](Pictures/4.gif)
1818
where **b<sub>i</sub> = N/N<sub>i</sub>** , **b<sub>i</sub><sup>'</sup> = b<sub>i</sub><sup>-1</sup> mod N<sub>i</sub>** and N = N<sub>1</sub>*N<sub>2</sub>*N<sub>3</sub>. Since we know that M < N<sub>i</sub> (If our message M is larger than the modulus N, then we won't get the exact message when we decrypt the ciphertext, we will get an equivalent message instead, which is not favourable). Therefore we can write M < N<sub>1</sub>N<sub>2</sub>N<sub>3</sub>. We can easily calculate M now by directly taking the `cube root` of M<sup>3</sup> to get `M`.
1919

2020

0 commit comments

Comments
 (0)