Perfect-Secrecy

了解如何證明加密方案是完全保密的

  • October 7, 2017

考慮以下每個加密方案並說明該方案是否完全保密。如果你的答案是肯定的,請給出詳細的證明來證明你的答案是正確的,如果你的答案是否定的,請給出一個反例。

考慮一個加密方案,其明文空間為 $ \mathcal{M}={m\in{0,1}^\ell \mathrel{|} \text{the last bit of $m$ is $0$}} $ 密鑰生成算法從密鑰空間中選擇一個統一的密鑰 $ \mathcal{K}={0,1}^{\ell-1} $ . 認為 $ \mathit{Enc}_k(m)=m \oplus (k\parallel 0) $ 和 $ \mathit{Dec}_k(c)=c\oplus (k\parallel 0) $ .

$ \newcommand{\given}{\mathrel{|}} $ 完全機密的定義:一種加密方案 $ (\mathit{Gen}, \mathit{Enc}, \mathit{Dec}) $ 有消息空間 $ \mathcal{M} $ 如果對於每個機率分佈 $ \mathcal{M} $ , 每一條消息 $ m\in \mathcal{M} $ , 和每一個密文 $ c\in \mathcal{C} $ 為此 $ \Pr[C=c]>0 $ :

$$ \Pr[M=m\given C=c]=\Pr[M=m]. $$ 我們首先計算 $ \Pr[C=c\given M=m’] $ 對於任意 $ c\in \mathcal{C} $ 和 $ m’\in \mathcal{M} $ .

$$ \begin{equation*} \begin{aligned} \Pr[C=c\given M=m’] & =\Pr[\mathit{Enc}K(m’)=c]=\Pr[m’ \oplus (K\parallel 0)=c] \ & =\Pr[(K\parallel 0) = c\oplus m’]=2^{1-\ell}\quad (1) \end{aligned} \end{equation*} $$ 最終等式成立的地方,因為關鍵 $ K $ 是製服 $ \ell-1 $ 位字元串。修復任何分佈 $ \mathcal{M} $ . 對於任何 $ c\in \mathcal{C} $ , 我們有 $$ \begin{equation*} \begin{aligned} \Pr[C=c] & = \sum{m’\in\mathcal{M}} \Pr[C=c\given M=m’] \cdot \Pr[M=m’] \ & = 2^{1-\ell} \cdot \sum_{m’\in \mathcal{M}} \Pr[M=m’]=2^{1-\ell}\cdot 1=2^{1-\ell}\quad (2) \end{aligned} \end{equation*} $$ 總和結束的地方 $ m’\in \mathcal{M} $ 和 $ \Pr[M=m’]\neq 0 $ . 貝氏定理給出: $$ \begin{equation*} \begin{aligned} \Pr[M=m\given C=c] & = \dfrac{\Pr[C=c\given M=m]\cdot \Pr[M=m]}{\Pr[C=c]} \ & = \dfrac{2^{1-\ell} \cdot \Pr[M=m]}{2^{1-\ell}} = \Pr[M=m] \end{aligned} \end{equation*} $$ 因此,我們得出結論,這種加密方案是完全保密的。 **我的問題:**我試圖按照設置來證明 One-Time Pad 是完全安全的。但是,我並不真正理解證明背後的邏輯(假設我所做的是正確的)。有人可以弄清楚為什麼這種技術是正確的嗎?

問題出在哪裡?你的推理似乎是正確的,但你顯然對機率感到不舒服(至少)。

您使用了 (1) 中加密方案的定義,然後使用了關於在 (2) 中形成分區的消息集的機率標準表達式,這是有效的,因為它包括所有具有非零機率的消息及其機率總和必須為 1。

然後你應用了貝氏定理。標準的東西,真的。也許你需要復習一下機率。

引用自:https://crypto.stackexchange.com/questions/51351