Suppose \(p = 11\), \(q = 17\) and \(e = 3\). Compute \(d\) and encrypt the plaintext \(m = 107\). Then, decrypt the resulting ciphertext.
\(k\) | \(a\) | \(s\) |
---|---|---|
160 | 0 | |
3 | 1 | |
53 | 1 | -53 |
Encryption of \(m = 107\):
bit | square | multiply |
---|---|---|
1 | \(1\) | \(107\) |
1 | \(42\) | \(6\) |
Decryption of \(c = 6\):
bit | square | multiply |
---|---|---|
1 | \(1\) | \(6\) |
1 | \(36\) | \(29\) |
0 | \(93\) | |
1 | \(47\) | \(95\) |
0 | \(49\) | |
1 | \(157\) | \(7\) |
1 | \(49\) | \(107\) |
Find \(\sqrt[7]{2}\) in \(\mathbb{Z}_{187}^*\).
\[ \begin{aligned} x &\equiv a_1 \pmod{n_1} \\ x &\equiv a_2 \pmod{n_2} \\ &\dots \\ x &\equiv a_k \pmod{n_k} \end{aligned} \]
If \(n_1, n_2, \dots, n_k\) are mutually coprime, then there is a unique solution for \(x\) modulo \(n_1 n_2 \cdots n_k\).
Find a number \(x\) such that its remainder is \(2\) when dividing by \(3\), \(3\) when dividing by \(5\), and \(2\) when dividing by \(7\).
\[ \begin{aligned} x &\equiv 2 \pmod{3} \\ x &\equiv 3 \pmod{5} \\ x &\equiv 2 \pmod{7} \end{aligned} \]
\[ \begin{aligned} x &= 2 + 3a & (a \in \mathbb{Z}) \\ 2 + 3a &\equiv 3 \pmod{5} \\ 3a &\equiv 1 \pmod{5} \\ a &\equiv 2 \pmod{5} \\ a &= 2 + 5b & (b \in \mathbb{Z}) \\ x &= 2 + 3(2 + 5b) = 8 + 3 \cdot 5b & (b \in \mathbb{Z}) \\ 8 + 15b &\equiv 2 \pmod{7} \\ 1 + b &\equiv 2 \pmod{7} \\ b &\equiv 1 \pmod{7} \\ b &= 1 + 7c & (c \in \mathbb{Z}) \\ x &= 8 + 3 \cdot 5 \cdot (1 + 7c) = 23 + 3 \cdot 5 \cdot 7c & (c \in \mathbb{Z}) \\ x &\equiv 23 \pmod{3 \cdot 5 \cdot 7} \end{aligned} \]
Let \(p\) be a prime, and \(a\) and \(b\) be arbitrary integers.
\((a + b)^p \equiv \sum_{i=0}^p {p \choose i} a^i b^{p-i} \equiv a^p + b^p \pmod{p}\)
\(a^p \equiv ((a-1) + 1)^p \equiv (a-1)^p + 1^p \equiv 1^p + 1^p + \dots + 1^p \equiv 1 + 1 + \dots + 1 \equiv a \pmod{p}\)
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing