LN15
LN15
473:
Cryptography
Mark
Zhandry
Princeton
University
Spring
2018
Number
Theory
ℤN:
integers
mod
N
ℤN*:
integers
mod
N that
are
relatively
prime
to
N
• x∈ ℤN* iff x has
an
“inverse”
y s.t. xy mod N = 1
• For
prime
N, ℤN*={1,…,N-1}
Φ(N) = |ℤN*|
Examples:
• Additive
group
ℤN (generator?)
Non-‐example:
ℤ15*
DLog:
Stronger
Assumptions
• Given
(g,ga),
compute
a
Increasing
Difficulty
CDH:
• Given
(g,ga,gb), compute
gab
DDH:
• Distinguish
(g,ga,gb,gc) from
(g,ga,gb,gab)
G cyclic,
order
q
(G,t,ε)-Discrete
Log:
For
any
algorithm
running
in
time
at
most
t,
bi+1xi+1 … bnxn
Hybrid
i:
H(x) = Hi(x [1,i])
• Hi is
a
random
function
from
{0,1}i à G
Hybrid
i:
(g,gx1,gy1,…,gxi,gyi, gxi+1,gb xi+1, …gxs,gb xs)
(g,h,u,v)
(g,gx1,gy1,…,gxi-1,gyi-1,u,v,
gxi+1,hxi+1, …gxs,hxs)
Proof
of
Lemma
(g,gx1,gy1,…,gxi-1,gyi-1,u,v, gxi+1,hxi+1, …gxs,hxs)
• CPA-‐secure encryption
• Block Ciphers
• MACs
• Authenticated
Encryption
Parameter
Size
in
Practice?
G = subgroup
of
ℤp* of
order
q,
where
q| p-1
• In
practice,
best
algorithms
require
p ≥ 21024 or
so
Pr[(p,q)ß (N):
N=pq and
p,q random
λ-‐bit
primes]≤ε
⅓ ⅓
Plausible
assumption: (λ, t=2 ,
λ ε=2 )
-λ
Sampling
Random
Primes
Ex:
• Let
p be
a
prime,
and
y≠0 a
quadratic
residue
mod
p.
How
many
square
roots
of
y?
• Let
N=pq be
the
product
of
two
primes,
y a
quadratic
residue
mod N.
Suppose
y≠0 mod p
and
y≠0 mod q.
How
many
square
roots?
(λ,t,ε)-‐QR
Assumption: For
any
factoring
algorithm
running
in
time
at
most
t,
Pr[y2=x2 mod N:
yß (N,x2)
N=pq and
p,q random
λ-‐bit
primes
xßℤN ]≤ε
Theorem: If
the
(λ,t,ε)-‐factoring
assumption
holds,
then
the
(λ,t-t’,2ε)-‐QR
assumption
holds
Proof
To
factor
N:
• xßℤN
• yß (N,x2)
• Output GCD(x-y,N)
Analysis:
• Let
{a,b,c,d}
be
the
4
square
roots
of
x2
• has
no
idea
which
one
you
chose
• With
probability
½,
y will
not
be
in
{+x,-x}
• In
this
case,
we
know
x=y mod p but
x=-y mod q
Collision
Resistance
from
Factoring
Let
N=pq,
y a
QR
mod
N
Suppose
-1 is
not
a
QR mod
N
By
CRT,
need
to
choose
p,q such
that
-‐1
is
not
a
QR
mod
p or
mod
q
Find x
x F
Questions:
• Can
common
techniques
be
abstracted
out
as
theorem
statements?
• Can
every
technique
be
used
to
build
every
application?
One-‐way
Functions
The
minimal
assumption
for
crypto
Syntax:
• Domain
D
• Range
R
• Function
F: D à R
No
correctness
properties
other
than
deterministic
Security?
Trivial
example:
F(x) = parity
of
x
Given
F(x), impossible
to
predict
x
Security
F(p,q) = pq
F(g,a) = (g,ga)
Com Auth
Enc
So
Far
OWF
CRH
PRF PRP
PRG
Com
MAC Enc
x F
h
Hardcore
Bits
A
hc bit
for
any
OWF
OWF
CRH
PRF PRP
PRG
Com
MAC Enc