This commit is contained in:
lda committed 2026-03-14 04:49:31 +07:00
1 parent 66e176a13e
commit 7e4c6dd3cd
1 file changed
+20 -20
+20 -20
View File
@@ -80,10 +80,10 @@ diagram ahh. i aint do Ts.
$$
\begin{aligned}
y_1 &= e_k(x_1 \oplus IV)
y_i &= e_k(x_i \oplus y_{i-1})
x_1 &= e_k^{-1}(y_1) \oplus IV
x_i &= e_k^{-1}(y_i) \oplus y_{i-1}
y_1 &= e_k(x_1 \oplus IV) \\
y_i &= e_k(x_i \oplus y_{i-1}) \\
x_1 &= e_k^{-1}(y_1) \oplus IV \\
x_i &= e_k^{-1}(y_i) \oplus y_{i-1} \\
\end{aligned}
$$
@@ -91,10 +91,10 @@ $$
$$
\begin{aligned}
s_1 &= e_k(IV)
s_i &= e_k(s_{i-1})
y_i &= s_i \oplus x_i
x_i &= s_i \oplus y_i
s_1 &= e_k(IV) \\
s_i &= e_k(s_{i-1}) \\
y_i &= s_i \oplus x_i \\
x_i &= s_i \oplus y_i \\
\end{aligned}
$$
@@ -102,10 +102,10 @@ $$
$$
\begin{aligned}
y_1 &= e_k(IV) \oplus x_1
y_i &= e_k(y_{i-1}) \oplus x_i
x_1 &= e_k(IV) \oplus y_1
x_i &= e_k(y*{i-1}) \oplus y_i
y_1 &= e_k(IV) \oplus x_1 \\
y_i &= e_k(y_{i-1}) \oplus x_i \\
x_1 &= e_k(IV) \oplus y_1 \\
x_i &= e_k(y*{i-1}) \oplus y_i \\
\end{aligned}
$$
@@ -113,7 +113,7 @@ $$
$$
\begin{aligned}
y_i = e_k(IV \|\| CTR_i) \oplus x_i
y_i = e_k(IV \| CTR_i) \oplus x_i
\end{aligned}
$$
@@ -125,20 +125,20 @@ two kinds apparently. idk
1. convert expo to binary. we go left to right. (Ts is buns)
lets say we have x, e = $\overline{e_1e_2e_3e_4}$ and n. We are trying to do $x^e \pmod n$ or just x^e
lets say we have x, e = $\overline{e_1e_2e_3e_4}_2$ and n. We are trying to do $x^e \pmod n$ or just x^e
2. let do Ts
1. of course
we have $\overline{e_1} = 1$
we have $e_1 = 1$
do $x^{\overline{e_1}} \pmod n$
do $x^{\overline{e_1}_2} \pmod n$
2. sq step
we are trying to expand Ts to $x^{\overline{e_1e_2}}$
so we first do $x^{\overline{e_10}}$ aka $x^{\overline{e_1} \cdot 2}$
so we first do $x^{\overline{e_10}_2}$ aka $x^{\overline{e_1}_2 \cdot 2}$
do $ans^2 \pmod n$
@@ -146,7 +146,7 @@ two kinds apparently. idk
if $e_2$ conveniently equals 0, skip Ts.
so $x^{\overline{e_10}}$ needs to become $x^{\overline{e_11}}$
so $x^{\overline{e_10}_2}$ needs to become $x^{\overline{e_11}_2}$
that means you needa multiply by x.
@@ -230,14 +230,14 @@ for authentication. is this really you type shit.
calc r = alpha ^ ke mod p
s = (x - d _ r) _ ke^-1 mod (p-1)
$$ s = (x - d \cdot r) k_e^-1 \pmod{p-1}$$
give (r, s) to whoever is gonna verify yo msg
3. verify x
get ts to be true:
$\beta^rr^s \equiv \alpha^x \pmod p$
$$\beta^rr^s \equiv \alpha^x \pmod p$$
then you are ball.