< Return to Video

Stream ciphers are semantically secure (11 min)

  • 0:00 - 0:04
    So now that we understand what a secure
    PRG is, and we understand what semantic
  • 0:04 - 0:08
    security means, we can actually argue that
    a stream cipher with a secure PRG is, in
  • 0:08 - 0:13
    fact, a semantically secure. So that's our
    goal for this, segment. It's a fairly
  • 0:13 - 0:17
    straightforward proof, and we'll see how
    it goes. So the theory we wanna prove is
  • 0:17 - 0:21
    that, basically, given a generator G that
    happens to be a secured, psedo-random
  • 0:21 - 0:25
    generator. In fact, the stream cipher
    that's derived from this generator is
  • 0:25 - 0:29
    going to be semantically secure. Okay and
    I want to emphasize. That there was no
  • 0:29 - 0:33
    hope of proving a theorem like this for
    perfect secrecy. For Shannons concept of
  • 0:33 - 0:37
    perfect secrecy. Because we know that a
    stream cipher can not be perfectly
  • 0:37 - 0:41
    secure because it has short keys. And
    perfect secrecy requires the keys to be as
  • 0:41 - 0:45
    long as the message. So this is really
    kind of the first example the we see where
  • 0:45 - 0:49
    we're able to prove that a cipher with
    short keys has security. The concept of
  • 0:49 - 0:53
    security is semantic security. And this
    actually validates that, really, this is a
  • 0:53 - 0:57
    very useful concept. And in fact, you
    know, we'll be using semantic security
  • 0:57 - 1:01
    many, many times throughout the course.
    Okay, so how do we prove a theory like
  • 1:01 - 1:04
    this? What we're actually gonna be doing,
    is we're gonna be proving the
  • 1:04 - 1:08
    contrapositive. What we're gonna show is
    the following. So we're gonna prove this
  • 1:08 - 1:13
    statement down here, but let me parse it
    for you. Suppose. You give me a semantic
  • 1:13 - 1:18
    security adversary A. What we'll do is
    we'll build PRG adversary B to satisfy
  • 1:18 - 1:24
    this inequality here. Now why is this
    inequality useful? Basically what do we
  • 1:24 - 1:29
    know? We know that if B is an efficient
    adversary. Then we know that since G is a
  • 1:29 - 1:33
    secure generator, we know that this
    advantage is negligible, right? A secure
  • 1:33 - 1:38
    generator has a negligible advantage
    against any efficient statistical test. So
  • 1:38 - 1:42
    the right hand side, basically, is gonna
    be negligible. But because the right hand
  • 1:42 - 1:46
    side is negligible, we can deduce that the
    left hand side is negligible.
  • 1:46 - 1:51
    And therefore, the adversary that you looked
    at actually has negligible advantage in
  • 1:51 - 1:55
    attacking the stream cipher E. Okay. So
    this is how this, this will work.
  • 1:55 - 1:58
    Basically all we have to do is given an
    adversary A we're going to build an
  • 1:58 - 2:03
    adversary B. We know that B has negligible
    advantage against generator but that
  • 2:03 - 2:06
    implies that A has negligible advantage
    against the stream cipher.
  • 2:06 - 2:11
    So let's do that. So all we have to do again
    is given A, we have to build B.
  • 2:11 - 2:15
    So let A be a semantic security adversary against
    the stream cipher. So let me remind you
  • 2:15 - 2:19
    what that means. Basically, there's a
    challenger. The challenger starts off by
  • 2:19 - 2:24
    choosing the key K. And then the adversary
    is gonna output two messages, two equal
  • 2:24 - 2:27
    length messages. And he's gonna receive
    the encryption of M0 or M1
  • 2:27 - 2:31
    and outputs B1. Okay, that's
    what a semantic security adversary is
  • 2:31 - 2:35
    going to do. So now we're going to start
    playing games with this adversary. And
  • 2:35 - 2:38
    that's how we're going to prove our lemma. Alright, so the first thing
  • 2:38 - 2:43
    we're going to do is we're going to make
    the challenger. Also choose a random R.
  • 2:43 - 2:48
    Okay, a random string R. So, well you know
    the adversary doesn't really care what the
  • 2:48 - 2:52
    challenger does internally. The challenger
    never uses R, so this doesn't affect the
  • 2:52 - 2:56
    adversary's advantage at all. The
    adversary just doesn't care that the
  • 2:56 - 3:01
    challenger also picks R. But now comes the
    trick. What we're going to do is we're
  • 3:01 - 3:05
    going to, instead of encrypting using GK.
    We're going to encrypt using R. You can
  • 3:05 - 3:10
    see basically what we're doing
    here. Essentially we're changing the
  • 3:10 - 3:14
    challenger so now the challenge
    cipher text is encrypted using a
  • 3:14 - 3:19
    truly random pad. As opposed to just pseudo
    random pad GK. Okay. Now, the property of
  • 3:19 - 3:24
    the pseudo-random generator is that its
    output is indistinguishable from truly
  • 3:24 - 3:28
    random. So, because the PRG is secure, the
    adversary can't tell that we made this
  • 3:28 - 3:33
    change. The adversary can't tell that we
    switched from a pseudo-random string to a
  • 3:33 - 3:37
    truly random string. Again, because the generator is secure. Well, but now look at
  • 3:37 - 3:42
    the game that we ended up with. So the
    adversary's advantage couldn't have
  • 3:42 - 3:47
    changed by much, because he can't tell the
    difference. But now look at the game that
  • 3:47 - 3:51
    we ended up with. Now this game is truly a
    one time pad game. This a semantic
  • 3:51 - 3:56
    security game against the one time pad.
    Because now the adversary is getting a one
  • 3:56 - 4:00
    time pad encryption of M0 or M1 But in the
    one time pad we know that the adversaries
  • 4:00 - 4:04
    advantage is zero, because you can't beat
    the one time pad. The one time pad is
  • 4:04 - 4:08
    secure Unconditionally secure. And as a
    result, because of this. Essentially
  • 4:08 - 4:13
    because the adversary couldn't have told
    the difference when
  • 4:13 - 4:17
    we moved from pseudo random to random. But he couldn't win the
    random game. That also means that he
  • 4:17 - 4:21
    couldn't win the sudo random game. And as
    a result, the stream cipher, the original
  • 4:21 - 4:26
    stream cipher must be secure. So that's
    the intuition for how the proof is gonna go.
  • 4:26 - 4:30
    But I wanna do it rigorously once.
    From now on, we're just gonna argue by
  • 4:30 - 4:34
    playing games with our challenger. And, we
    won't be doing things as formal as I'm
  • 4:34 - 4:38
    gonna do next. But I wanna do formally and
    precisely once, just so that you see how
  • 4:38 - 4:43
    these proofs actually work. Okay, so I'm
    gonna have to introduce some notation. And
  • 4:43 - 4:48
    I'll do the usual notation, basically. If
    the original semantics are here at the
  • 4:48 - 4:53
    beginning, when we're actually using a
    pseudo-random pad, I'm gonna use W0 and W1
  • 4:53 - 4:58
    to denote the event that the adversary
    outputs one, when it gets the encryption
  • 4:58 - 5:03
    of M0, or gets the encryption of M1,
    respectively. Okay? So W0 corresponds to
  • 5:03 - 5:08
    outputting 1 when receiving the
    encryption of M0. And W1 corresponds
  • 5:08 - 5:13
    to outputting 1 when receiving the encryption of M1. So that's the standard
  • 5:13 - 5:20
    definition of semantic security. Now once
    we flip to the random pad. I'm gonna use
  • 5:20 - 5:25
    R0 and R1 to denote the event that the
    adversary outputs 1 when receiving the
  • 5:25 - 5:29
    one-type pad encryption of M0 or the
    one-time pad encryption of M1. So we have
  • 5:29 - 5:34
    four events, W0, W1 from the original
    semmantics security game, and R0 and R1
  • 5:34 - 5:38
    from the semmantics security game once we
    switch over to the one-time pad. So now
  • 5:38 - 5:43
    let's look at relations between these
    variables. So first of all, R0 and R1 are
  • 5:43 - 5:47
    basically events from a semmantics
    security game against a one-time pad. So
  • 5:47 - 5:52
    the difference between these probabilities
    is that, as we said, basically the
  • 5:52 - 5:57
    advantage of algorithm A, of adversary A,
    against the one-time pad. Which we know is
  • 5:57 - 6:01
    zero. Okay, so that's great. So that
    basically means that probability of, of R0
  • 6:01 - 6:06
    is equal to the probability of R1. So now,
    let's put these events on a line, on a
  • 6:06 - 6:10
    line segment between zero and one. So here
    are the events. W0 and W1 are the events
  • 6:10 - 6:14
    we're interested in. We wanna show that
    these two are close. Okay. And the way
  • 6:14 - 6:18
    we're going to do it is basically by
    showing, oh and I should say, here is
  • 6:18 - 6:23
    probability R0 and R1, it says
    they're both same, I just put them in the
  • 6:23 - 6:27
    same place. What we're gonna do is we're
    gonna show that both W0 and W1 are
  • 6:27 - 6:32
    actually close to the probability of RB
    and as a result they must be close to one
  • 6:32 - 6:36
    another. Okay, so the way we do that is
    using a second claim, so now we're
  • 6:36 - 6:40
    interested in the distance between
    probability of Wb and the probability of
  • 6:40 - 6:45
    Rb. Okay so we'll prove the claim in a
    second. Let me just state the claim. The
  • 6:45 - 6:50
    claim says that there exists in adversary
    B. Such that the difference of these two
  • 6:50 - 6:55
    probabilities is basically the advantage
    of B against the generator G and this is
  • 6:55 - 7:00
    for both b's. Okay? So given these two
    claims, like the theorem is done because
  • 7:00 - 7:05
    basically what do we know. We know this
    distance is less than the advantage of B
  • 7:05 - 7:10
    against G. That's from claim two and
    similarly, this distance actually is even
  • 7:10 - 7:14
    equal to, I'm not gonna say
    less but is equal to the advantage. Of B
  • 7:14 - 7:19
    against G, and as a result you can see
    that the distance between W0 and W1
  • 7:19 - 7:24
    is basically almost twice the
    advantage of B against G. That's basically
  • 7:24 - 7:29
    the thing that we are trying to prove.
    Okay the only thing that remains is just
  • 7:29 - 7:34
    proving this claim two and if you think
    about what claim two says, it basically
  • 7:34 - 7:39
    captures the question of what happens in
    experiment zero what happens when we
  • 7:39 - 7:44
    replace the pseudo random pad GK, by
    truly random pad R. Here in
  • 7:44 - 7:49
    experiment zero say we're using the pseudo
    random pad and here in experiment zero we
  • 7:49 - 7:54
    are using a Truly random pad and we are
    asking can the adversary tell the
  • 7:54 - 7:59
    difference between these two and we wanna
    argue that he cannot because the generator
  • 7:59 - 8:04
    is secure. Okay so here's what we are
    gonna do. So let's prove claim two. So we
  • 8:04 - 8:09
    are gonna argue that in fact there is a
    PRG adversary B that has exactly the
  • 8:09 - 8:14
    difference of the two probabilities as
    it's advantage. Okay and since the point
  • 8:14 - 8:18
    is since this is negligible this is
    negligible. And that's basically what we
  • 8:18 - 8:22
    wanted to prove. Okay, so let's look at
    the statistical test b. So, what, our
  • 8:22 - 8:27
    statistical test b is gonna use adversary
    A in his belly, so we get to build
  • 8:27 - 8:31
    statistical test b however we want. As we
    said, it's gonna use adversary A inside of
  • 8:31 - 8:36
    it, for its operation, and it's a regular
    statistical test, so it takes an n-bit
  • 8:36 - 8:40
    string as inputs, and it's supposed to
    output, you know, random or non-random,
  • 8:40 - 8:44
    zero or one. Okay, so let's see. So it's,
    first thing it's gonna do, is it's gonna
  • 8:44 - 8:48
    run adversary A, and adversary A is gonna
    output two messages, M0 and M1. And then,
  • 8:48 - 8:54
    what adversary b's gonna do, is basically
    gonna respond. With M0 XOR or the string that
  • 8:54 - 9:00
    it was given as inputs. Alright? That's
    the statistical lesson, then. Whenever A
  • 9:00 - 9:05
    outputs, it's gonna output, its output.
    And now let's look at its advantage. So
  • 9:05 - 9:10
    what can we say about the advantage of
    this statistical test against the
  • 9:10 - 9:16
    generator? Well, so by definition, it's
    the probability that, if you choose a
  • 9:16 - 9:21
    truly random string. So here are 01 to the N, so probability
  • 9:21 - 9:26
    that R, that B outputs 1 minus the
    probability, is that when we choose a
  • 9:26 - 9:33
    pseudo random string, B outputs 1, okay?
    Okay, but let's think about what this is.
  • 9:33 - 9:37
    What can you tell me about the first
    expressions? What can you tell me about
  • 9:37 - 9:42
    this expression over here? Well, by the
    definition that's exactly if you think
  • 9:42 - 9:47
    about what's going on here, that's this is
    exactly the probability R0 right?
  • 9:47 - 9:53
    Because this game that we are playing with
    the adversary here is basically he helped
  • 9:53 - 9:58
    us M0 and M1 right here he helped add M0 and m1 and he got the encryption
  • 9:58 - 10:04
    of M0 under truly one time pad. Okay,
    so this is basically a [inaudible]. Here
  • 10:04 - 10:10
    let me write this a little better. That's
    the basic level probability of R0.
  • 10:11 - 10:15
    Now, what can we say about the next
    expression, well what can we say about
  • 10:15 - 10:19
    when B is given a pseudo random
    string Y as input.
  • 10:19 - 10:23
    Well in that case, this is exactly experiment zero and
    true stream cipher game
  • 10:23 - 10:30
    because now we're computing M XOR M0, XOR GK. This is
    exactly W0.
  • 10:30 - 10:33
    Okay, that's exactly what we have to prove. So it's kind of a trivial proof.
  • 10:33 - 10:40
    Okay, so that completes the proof of claim two. And again, just to
    make sure this is all clear, once we have
  • 10:40 - 10:44
    claim two, we know that W0 must be close
    to W1, and that's the theorem.
  • 10:44 - 10:50
    That's what we have to prove. Okay, so now we've
    established that a stream cypher is in
  • 10:50 - 10:54
    fact symmantically secure, assuming that
    the PRG is secure.
Title:
Stream ciphers are semantically secure (11 min)
Video Language:
English

English subtitles

Revisions