-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,5 +31,3 @@ | |
找到最近的格点:$q[i] = \lfloor p[i] + 0.5 \rfloor$ | ||
|
||
得到水印:$m = (q[1] \bmod 2, \dots, q[N] \bmod 2)$ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# 第 11 章:内容认证 | ||
|
||
## 用两个像素编码一位信息 | ||
|
||
现在有两个像素 $x_1$ 和 $x_2$,设 $(y_1, y_2) = T(x_1, x_2) = (2 x_1 - x_2, 2 x_2 - x_1)$。这样可以确保 $y_1 - y_2 \bmod 3 = 0$。 | ||
|
||
接下来,如果要编码 1 就把 $y_1$ 加上 1,编码 0 就把 $y_1$ 减去 1。 | ||
|
||
编码更多信息?确保 $y_1 - y_2 \bmod (2n + 1) = 0$。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# 第 13 章:隐写分析 | ||
|
||
## 最小位嵌入和直方图攻击 | ||
|
||
对于一个(像素)值对 $(u, v) \in P$,给它分类: | ||
|
||
| | $v \bmod 2 = 0$ | $v \bmod 2 = 1$ | | ||
|:-------:|:---------------:|:---------------:| | ||
| $u = v$ | Z | Z | | ||
| $u < v$ | X | Y | | ||
| $u > v$ | Y | X | | ||
|
||
如果 $(u, v) \in Y$,并且 $|u - v| = 1$,那么规定 $(u, v) \in W$,$V = Y - W$。X 会和 V 互相转换,W 会和 Z 互相转换。 | ||
|
||
相对信息长度为 $q = m / n$,期望更改数量为 $q / 2$。 | ||
|
||
$\rho (00, P) = (1 - \frac{q}{2}) ^ 2$,$\rho (01, P) = \rho (10, P) = \frac{q}{2} \times (1 - \frac{q}{2})$,$\rho (11, P) = (\frac{q}{2}) ^ 2$。 | ||
|
||
转换之后: | ||
|
||
$|X'| = |X| (1 - q/2) + |V| (q/2)$ | ||
|
||
$|V'| = |V| (1 - q/2) + |X| (q/2)$ | ||
|
||
$|W'| = |W| (1 - q + q^2 / 2) + |Z| (q) (1 - q/2)$ | ||
|
||
现在我能可以把 $q$ 弄出来。 | ||
|
||
$|X'| - |V'| = |W| (1 - q)$ | ||
|
||
设 $\gamma = |W| + |Z| = |W'| + |Z'|$,那么 $|W'| = (|X'| - |V'|) (1 - q) + \gamma q (1 - q/2)$ | ||
|
||
与此同时 $|W'| = |P| - |X'| - |V'| - |Z'|$: | ||
|
||
$\frac{\gamma}{2} q^2 + (2 |X'| - |P|) q + (|Y'| - |X'|) = 0$ | ||
|
||
于是就可以把 $q$ 解出来。如果结果很明显不为 0 说明里面掺了隐写信息。 |