密码学中的归约证明

Probailistic and Game based Security

Encryption. G e n ( 1 n ) → k ; E n c ( k , m ) → c ; D e c ( k , c ) → m ′ Gen(1^n)\rightarrow k;Enc(k,m)\rightarrow c;Dec(k,c)\rightarrow m' Gen(1n)k;Enc(k,m)c;Dec(k,c)m

Correct. ∀ m ∈ M , A    w i n s    i f    b ′ = b \forall m\in \mathcal{M},\mathcal{A} \;\mathrm{wins\; if\;} b'=b mM,Awinsifb=b
P r [ k ← G e n ( 1 n ) ; E n c ( k , m ) → c ; D e c ( k , c ) → m ′ : m = m ′ ] = 1 Pr[k\leftarrow Gen(1^n);Enc(k,m)\rightarrow c;Dec(k,c)\rightarrow m':m=m']=1 Pr[kGen(1n);Enc(k,m)c;Dec(k,c)m:m=m]=1
在这里插入图片描述

Security. ∀ P P T    A , ∃    n e g ( n ) \forall PPT\; \mathcal{A},\exists\; neg(n) PPTA,neg(n)
P r [ G e n ( 1 n ) → k ; A ( 1 n ) → m 0 , m 1 , s t ; b ← { 0 , 1 } ; E n c ( k , m b ) → c ; A ( s t , c ) → b ′ ; b = b ] = 1 2 + n e g ( n ) Pr[Gen(1^n)\rightarrow k;\mathcal{A}(1^n)\rightarrow m_0,m_1,st;b\leftarrow \{0,1\};Enc(k,m_b)\rightarrow c;\mathcal{A}(st,c)\rightarrow b';b=b]=\frac{1}{2}+neg(n) Pr[Gen(1n)k;A(1n)m0,m1,st;b{0,1};Enc(k,mb)c;A(st,c)b;b=b]=21+neg(n)

Reduction Proofs- What are they?

Theorem. Y    s e c u r e ⇒ X    s e c u r e \mathrm{Y \;secure} \Rightarrow \mathrm{X\; secure} YsecureXsecure

Proof. X    n o t    s e c u r e → Y    n o t    s e c u r e \mathrm{X\; not\; secure} \rightarrow \mathrm{Y\; not\; secure} XnotsecureYnotsecure

如果 ∃ P P T    A \exists \mathrm{PPT}\; \mathcal{A} PPTA 能够攻破 X \mathrm{X} X, 那我们可以构造 P P T    B \mathrm{PPT}\; \mathcal{B} PPTB 能够攻破 Y \mathrm{Y} Y,即:
∃    P P T    B    b r e a k s    Y ⇒ ∄    P P T    A    b r e a k s    X \exists \;\mathrm{PPT}\; \mathcal{B}\; \mathrm{breaks\; Y}\Rightarrow \nexists \;\mathrm{PPT}\; \mathcal{A} \;\mathrm{breaks}\; \mathrm{X} PPTBbreaksYPPTAbreaksX

在这里插入图片描述

归约的三条规则:

  1. PPT. 归约中构造 B \mathcal{B} B 是 PPT;
  2. Simulation. A \mathcal{A} A 而言, B \mathcal{B} B 构造 X 方案的模拟者跟真实的挑战者一样, A \mathcal{A} A 不可区分;
  3. Probability. IF A \mathcal{A} A has non-neg advantage break X ⇒ \Rightarrow B \mathcal{B} B has non-neg advantage break Y,那么就可以说明方案 X 是安全的。

Reduction Proof Example - PRF Family

Theorem. 如果 F F F 是一个安全的 PRF (Pseudorandom Function) 家族,那么 Z Z Z 是一个安全的 PRF 家族。其中 Z k ( x ) Z_k(x) Zk(x) 定义为:if x = k x=k x=k, return 0 0 0; else, return F k ( x ) F_k(x) Fk(x)

Proof. 如果存在一个 PPT 敌手 A \mathcal{A} A A \mathcal{A} A 可以以不可忽略的优势区分 Z k Z_k Zk 和一个随机函数,那么我可以构造一个 PPT 敌手 B \mathcal{B} B B \mathcal{B} B 能够以不可忽略的优势区分 F k F_k Fk 和一个随机函数。

在这里插入图片描述

如果 A \mathcal{A} A 能够区分 y y y 是 Random 或 Pseudorandom,那么就可以区分 y ′ y' y 是 Random 或 Pseudorandom。

我们之前说明的要证明三个要素成立:

  1. PPT. 我们要使得敌手 B \mathcal{B} B 的算法是 PPT,假设 A \mathcal{A} A 询问 p ( n ) p(n) p(n) 次询问以获取一个多项式 P P P,那么 B \mathcal{B} B 也向其自己的挑战者发起 p ( n ) p(n) p(n) 次询问。那么 B \mathcal{B} B 的运行时间 = p ( n ) p(n) p(n) 个询问时间 + A \mathcal{A} A 的运行时间:
    p ( n ) × O ( 1 ) + q ( n ) ( A ′ s    r u n n i n g    t i m e    i s    P P T ) + p ( n ) + 2 ( s e c u r i t y    p a r a m e t e r s    a n d    o u t p u t ) = p o l y ( n ) p(n)\times O(1)+q(n)(\mathrm{A's\; running\; time\; is\; PPT})+p(n)+2(\mathrm{security\; parameters\; and \;output})=poly(n) p(n)×O(1)+q(n)(AsrunningtimeisPPT)+p(n)+2(securityparametersandoutput)=poly(n)
  2. Indistinguishable. 对于所有的真实挑战者来说,只有在 A \mathcal{A} A 询问 x = k x=k x=k 时,引起了差异,因为 Z k ( x ) = 0 Z_k(x)=0 Zk(x)=0,而 B \mathcal{B} B 会返回 F k ( x ) F_k(x) Fk(x),但这个情况的概率是可忽略的:
    ∀ x ≠ k , B    c o m p u t e s    Z k ( x ) = F k ( x ) .    F o r    a    r a n d o m    k e y    k ,    P r [ A    q u e r i e s    x = k ] = P ( n ) ∣ k ∣ = n e g ( n ) \forall x\ne k,B\; \mathrm{computes}\; Z_k(x)=F_k(x) .\; \mathrm{For\; a\; random\; key\;} k,\; Pr[A\; \mathrm{queries}\; x=k]=\frac{P(n)}{|k|}=neg(n) x=k,BcomputesZk(x)=Fk(x).Forarandomkeyk,Pr[Aqueriesx=k]=kP(n)=neg(n)
  3. Success Probability. P r [ B    d i s t i n g u i s h e s ] = P r [ A    d i s t i n g u i s h e s ] = ϵ ( n ) = n o n − n e g ( n ) Pr[\mathcal{B}\mathrm{\; distinguishes}]=Pr[\mathcal{A}\mathrm{ \;distinguishes}]=\epsilon(n)=non-neg(n) Pr[Bdistinguishes]=Pr[Adistinguishes]=ϵ(n)=nonneg(n)(这里的 non-neg 是我们的假设,假设 A , B \mathcal{A,B} A,B 能够以不可忽略的优势区分 F k , Z k F_k,Z_k Fk,Zk 函数与一个随机数函数的区别)

Random Oracle Model

随机预言机是一个映射函数,该函数要求如果有相同的输入,必须返回相同的输出。

Random Oracle: D → R D\rightarrow R DR

我们可以将随机预言机视为查找表 (Lookup Table)

在这里插入图片描述

且随机预言机的算法是:

在这里插入图片描述

我们可以结合随机预言机来构造归约证明:

Thm. π 1 ⇒ R O π 2 \pi_1 \Rightarrow_{RO} \pi_2 π1ROπ2
Proof. ¬ π 2 ⇒ R O ¬ π 1 \neg \pi_2 \Rightarrow_{RO} \neg \pi_1 ¬π2RO¬π1

在这里插入图片描述

要求:构造 ROM 的算法必须是多项式时间和多项式空间

RSA Encryption ROM Proof

G e n ( 1 n ) : p , q → p r i m e ( l e n g t h = n ) ; N = p ⋅ q ; ϕ ( n ) = ( p − 1 ) ( q − 1 ) ; e ⋅ d = 1 m o d    ( p − 1 ) ( q − 1 ) ; s k = ( N , d ) , p k = ( N , e ) \mathrm{Gen}(1^n): p,q\rightarrow \mathrm{prime(length=n)}; N=p\cdot q; \phi(n)=(p-1)(q-1); e\cdot d=1 \mathrm{mod}\; (p-1)(q-1);sk=(N,d),pk=(N,e) Gen(1n):p,qprime(length=n);N=pq;ϕ(n)=(p1)(q1);ed=1mod(p1)(q1);sk=(N,d),pk=(N,e)
E n c ( p k , m ) → c : r ← Z N ∗ ; c 1 = r e m o d    N ; y = R O ( r ) ; c 2 = y ⊕ m \mathrm{Enc}(pk,m)\rightarrow c: r\leftarrow Z_N^*;c_1=r^e \mathrm{mod}\; N;y=\mathrm{RO}(r);c_2=y\oplus m Enc(pk,m)c:rZN;c1=remodN;y=RO(r);c2=ym

D e c ( s k , c ) → m : r = c 1 d m o d    N = ( r e ) d = r e d m o d    N ; y = R O ( r ) ; m = c 2 ⊕ y \mathrm{Dec}(sk,c)\rightarrow m: r=c_1^d \mathrm{mod}\; N=(r^e)^d=r^{ed} \mathrm{mod}\; N; y=\mathrm{RO}(r); m=c_2 \oplus y Dec(sk,c)m:r=c1dmodN=(re)d=redmodN;y=RO(r);m=c2y

C o r r e c t n e s s : e d = k ϕ ( N ) + 1 ; e d = 1 m o d    ϕ ( n ) ; r e d m o d    N → r k ϕ ( N ) ⋅ r m o d    N = r \mathrm{Correctness}:ed=k\phi(N)+1; ed=1 \mathrm{mod}\; \phi(n); r^{ed} \mathrm{mod}\; N\rightarrow r^{k\phi(N)}\cdot r \mathrm{mod}\; N=r Correctness:ed=kϕ(N)+1;ed=1modϕ(n);redmodNrkϕ(N)rmodN=r
R S A    A s s u m p t i o n : ∀    P P T A , ∃ n e g ( n ) ,    P r [ G e n ( 1 n ) → N , e , d ; x ← Z N ∗ : A ( 1 n , N , e , x e ) → x ] = n e g ( n ) \mathrm{RSA\; Assumption}: \forall\; \mathrm{PPT} \mathcal{A}, \exists \mathrm{neg}(n),\; \mathrm{Pr}[\mathrm{Gen}(1^n)\rightarrow N,e,d;x\leftarrow Z_N^*: \mathcal{A}(1^n,N,e,x^e)\rightarrow x]=\mathrm{neg}(n) RSAAssumption:PPTA,neg(n),Pr[Gen(1n)N,e,d;xZN:A(1n,N,e,xe)x]=neg(n)
Theorem. R S A    A s s u m p t i o n    S e c u r e ⇒ R O π    i s    C P A \mathrm{RSA\; Assumption \; Secure\Rightarrow_{RO} \pi \; is \; CPA} RSAAssumptionSecureROπisCPA
Proof. A    b r e a k s    π ⇒ R O B    b r e a k s    R S A    A s s u m p t i o n \mathrm{\mathcal{A}\; breaks\; \pi\Rightarrow_{RO} \mathcal{B}\; breaks\; RSA \;Assumption} AbreaksπROBbreaksRSAAssumption

在这里插入图片描述

归约构造会出现两种情况:

  1. z : z e = x e m o d    N , T h e n : A    b r e a k s    π ,    B    b r e a k s    R S A    A s s u m p t i o n . z: z^e =x^e \mathrm{mod}\; N,\mathrm{Then: \mathcal{A}\; breaks\; \pi ,\;\mathcal{B}\; breaks\; RSA\; Assumption}. z:ze=xemodN,Then:Abreaksπ,BbreaksRSAAssumption.
  2. A    n e v e r    q u e r y    z = z e = x e    m o d    N . T h e n : R S A    A s s u m p t i o n    S e c u r e ⇒ R O π    i s    C P A \mathcal{A}\; \mathrm{never \;query}\; z=z^e=x^e \;\mathrm{mod}\; N.\mathrm{Then: RSA\; Assumption \; Secure\Rightarrow_{RO} \pi \; is \; CPA} Aneverqueryz=ze=xemodN.Then:RSAAssumptionSecureROπisCPA

A \mathcal{A} A 只输出了一个 bit b ′ b' b,那么 B \mathcal{B} B 如何才能输出 x x x 呢( B \mathcal{B} B 是不知道 x x x 的),如果 b ′ = b b'=b b=b,那么意味着 A \mathcal{A} A 选择的是正确的 m b m_b mb,那么 y = c 2 ⊕ m b y=c_2 \oplus m_b y=c2mb,可以在 ROM 的 Lookup Table 中查询对应的 z z z z z z 也就是正确的 x x x

  • 20
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值