Skip to Content
CSE442TIntroduction to Cryptography (Lecture 18)

CSE442T Introduction to Cryptography (Lecture 18)

Chapter 5: Authentication

5.1 Introduction

Signatures

private key

Alice and Bob share a secret key kk.

Message Authentication Codes (MACs)

public key

Any one can verify the signature.

Digital Signatures

Definitions 134.1

A message authentication codes (MACs) is a triple (Gen,Tag,Ver)(Gen, Tag, Ver) where

  • kGen(1k)k\gets Gen(1^k) is a p.p.t. algorithm that takes as input a security parameter kk and outputs a key kk.
  • σTagk(m)\sigma\gets Tag_k(m) is a p.p.t. algorithm that takes as input a key kk and a message mm and outputs a tag σ\sigma.
  • Verk(m,σ)Ver_k(m, \sigma) is a deterministic algorithm that takes as input a key kk, a message mm, and a tag σ\sigma and outputs “Accept” if σ\sigma is a valid tag for mm under kk and “Reject” otherwise.

For all nNn\in\mathbb{N}, all mMnm\in\mathcal{M}_n.

P[kGen(1k):Verk(m,Tagk(m))=“Accept”]=1P[k\gets Gen(1^k):Ver_k(m, Tag_k(m))=\textup {``Accept''}]=1

Definition 134.2 (Security of MACs)

Security: Prevent an adversary from producing any accepted (m,σ)(m, \sigma) pair that they haven’t seen before.

  • Assume they have seen some history of signed messages. (m1,σ1),(m2,σ2),,(mq,σq)(m_1, \sigma_1), (m_2, \sigma_2), \ldots, (m_q, \sigma_q).
  • Adversary A\mathcal{A} has oracle access to TagkTag_k. Goal is to produce a new (m,σ)(m, \sigma) pair that is accepted but none of (m1,σ1),(m2,σ2),,(mq,σq)(m_1, \sigma_1), (m_2, \sigma_2), \ldots, (m_q, \sigma_q).

\forall n.u.p.p.t. adversary A\mathcal{A} with oracle access to Tagk()Tag_k(\cdot),

Pr[kGen(1k);(m,σ)ATagk()(1k);A did not query m and Verk(m,σ)=“Accept”]<ϵ(n)\Pr[k\gets Gen(1^k);(m, \sigma)\gets\mathcal{A}^{Tag_k(\cdot)}(1^k);\mathcal{A}\textup{ did not query }m \textup{ and } Ver_k(m, \sigma)=\textup{``Accept''}]<\epsilon(n)

MACs scheme

F={fs}F=\{f_s\} is a PRF family.

fs:{0,1}S{0,1}Sf_s:\{0,1\}^{|S|}\to\{0,1\}^{|S|}

Gen(1k):s{0,1}nGen(1^k): s\gets \{0,1\}^n

Tagk(m)Tag_k(m) outputs fs(m)f_s(m).

Vers(m,σ)Ver_s(m, \sigma) outputs “Accept” if fs(m)=σf_s(m)=\sigma and “Reject” otherwise.

Proof of security (Outline):

Suppose we used FRFnF\gets RF_n (true random function).

If A\mathcal{A} wants F(m)F(m) for m{m1,,mq}m\in \{m_1, \ldots, m_q\}. F(m)UnF(m)\gets U_n.

P[FRFn;(m,σ)AF()(1k);A did not query m and Verk(m,σ)=“Accept”]=P[FRFn;(m,σ)F(m)]=12n<ϵ(n)\begin{aligned} &P[F\gets RF_n; (m, \sigma)\gets\mathcal{A}^{F(\cdot)}(1^k);\mathcal{A}\textup{ did not query }m \textup{ and } Ver_k(m, \sigma)=\textup{``Accept''}]\\ &=P[F\gets RF_n; (m, \sigma)\gets F(m)]\\ &=\frac{1}{2^n}<\epsilon(n) \end{aligned}

Suppose an adversary A\mathcal{A} has 1p(n)\frac{1}{p(n)} chance of success with our PRF-based scheme…

This could be used to distinguish PRF fsf_s from a random function.

The distinguisher runs as follows:

  • Runs A(1n)\mathcal{A}(1^n)
  • Whenever A\mathcal{A} asks for Tagk(m)Tag_k(m), we ask our oracle for f(m)f(m)
  • (m,σ)AF()(1n)(m, \sigma)\gets\mathcal{A}^{F(\cdot)}(1^n)
  • Query oracle for f(m)f(m)
  • If σ=f(m)\sigma=f(m), output 1
  • Otherwise, output 0

DD will output 1 for PRF with probability 1p(n)\frac{1}{p(n)} and for RF with probability 12n\frac{1}{2^n}.

Definition 135.1(Digital Signature D.S. over {Mn}n\{M_n\}_n)

A digital signature scheme is a triple (Gen,Sign,Ver)(Gen, Sign, Ver) where

  • (pk,sk)Gen(1k)(pk,sk)\gets Gen(1^k) is a p.p.t. algorithm that takes as input a security parameter kk and outputs a public key pkpk and a secret key sksk.
  • σSignsk(m)\sigma\gets Sign_{sk}(m) is a p.p.t. algorithm that takes as input a secret key sksk and a message mm and outputs a signature σ\sigma.
  • Verpk(m,σ)Ver_{pk}(m, \sigma) is a deterministic algorithm that takes as input a public key pkpk, a message mm, and a signature σ\sigma and outputs “Accept” if σ\sigma is a valid signature for mm under pkpk and “Reject” otherwise.

For all nNn\in\mathbb{N}, all mMnm\in\mathcal{M}_n.

P[(pk,sk)Gen(1k);σSignsk(m);Verpk(m,σ)=“Accept”]=1P[(pk,sk)\gets Gen(1^k); \sigma\gets Sign_{sk}(m); Ver_{pk}(m, \sigma)=\textup{``Accept''}]=1

Security of Digital Signature

P[(pk,sk)Gen(1k);(m,σ)ASignsk()(1k);A did not query m and Verpk(m,σ)=“Accept”]<ϵ(n)P[(pk,sk)\gets Gen(1^k); (m, \sigma)\gets\mathcal{A}^{Sign_{sk}(\cdot)}(1^k);\mathcal{A}\textup{ did not query }m \textup{ and } Ver_{pk}(m, \sigma)=\textup{``Accept''}]<\epsilon(n)

For all n.u.p.p.t. adversary A\mathcal{A} with oracle access to Signsk()Sign_{sk}(\cdot).

5.4 One time security: A\mathcal{A} can only use oracle once.

Output (m,σ)(m, \sigma) if mmm\neq m

Security parameter nn

One time security on {0,1}n\{0,1\}^n

One time security on {0,1}\{0,1\}^*

Regular security on {0,1}\{0,1\}^*

Note: the adversary automatically has access to Verpk()Ver_{pk}(\cdot)

One time security scheme (Lamport Scheme on {0,1}n\{0,1\}^n)

Gen(1k)Gen(1^k): Zn\mathbb{Z}_n random n-bit string

sksk: List 0: x1ˉ0,x2ˉ0,,xnˉ0\bar{x_1}^0, \bar{x_2}^0, \ldots, \bar{x_n}^0

List 1: x1ˉ1,x2ˉ1,,xnˉ1\bar{x_1}^1, \bar{x_2}^1, \ldots, \bar{x_n}^1

All xiˉj{0,1}n\bar{x_i}^j\in\{0,1\}^n

pkpk: For a strong one-way function ff

List 0: f(x1ˉ0),f(x2ˉ0),,f(xnˉ0)f(\bar{x_1}^0), f(\bar{x_2}^0), \ldots, f(\bar{x_n}^0)

List 1: f(x1ˉ1),f(x2ˉ1),,f(xnˉ1)f(\bar{x_1}^1), f(\bar{x_2}^1), \ldots, f(\bar{x_n}^1)

Signsk(m):(m1,m2,,mn)(x1ˉm1,x2ˉm2,,xnˉmn)Sign_{sk}(m):(m_1, m_2, \ldots, m_n)\mapsto(\bar{x_1}^{m_1}, \bar{x_2}^{m_2}, \ldots, \bar{x_n}^{m_n})

Verpk(m,σ)Ver_{pk}(m, \sigma): output “Accept” if σ\sigma is a prefix of f(m)f(m) and “Reject” otherwise.

Example: When we sign a message 0110001100, Signsk(01100)=(x1ˉ0,x2ˉ1,x3ˉ1,x4ˉ0,x5ˉ0)Sign_{sk}(01100)=(\bar{x_1}^0, \bar{x_2}^1, \bar{x_3}^1, \bar{x_4}^0, \bar{x_5}^0) We only reveal the x10,x21,x31,x40,x50x_1^0, x_2^1, x_3^1, x_4^0, x_5^0 For the second signature, we need to reveal exactly different bits.
The adversary can query the oracle for f(0n)f(0^n) (reveals list0) and f(1n)f(1^n) (reveals list1) to produce any valid signature they want.

Last updated on