Re: Requesting comments: SRP based IRC encryption
- From: Simon Johnson <simon.johnson@xxxxxxxxx>
- Date: Thu, 29 Jan 2009 01:27:47 -0800 (PST)
And above all, what problem do we really solve here? An attacker
doesn't know the session key, so he can't inject his own messages.
What he can do is take an old message from Alice and send it again,
or take Alice message and say it origninated from Bob.
I'll have one last stab at convincing you. Your fault is right there
in front of you. Not knowing the key *does not* prevent changing the
messages!
The easiest way to see this is to look at AES in CTR. In CTR mode, AES
is a stream cipher. Let's say I'm writing some code that tells the
cash point that the transaction is authorised. I decide to use AES in
CTR mode and I encrypt a single bit that tells the cash point whether
to give out money: 1 for yes, 0 for no.
Is this secure? Of course not! I can use my card and enter the wrong
pin. I know that the answer back is going to be a zero, so I flip the
bit. Bingo! The machine gives me free money.
What went wrong here? CTR is provably secure, how could it fail this
badly? Well CTR is proven to protect the secrecy of the message - not
the authenticity. CBC mode has a similiar proof.
Let's say I've put a patch in to the IRC server so that I can muck
about with your messages. Let's say I change one of your blocks from x
to y.
What happens? Well, most of the time everything after this block is
garbage. The question is, how does your software *know* that this has
happened? How can you be sure that under a chosen plain-text attack,
the result will always be nonsense?
Consider a final scenario: You're using your protocol on an IRC base
file sharing network. Somebody on this network knows that you're about
to transfer a copy of [your favourite game]. What's to stop them
corrupting the stream in such a way that they know will predictably
remove a length check on a string, effectively injecting an exploit in
transit?
Unlikely perhaps, but I always assume an attacker is smarter and has
significantly more resources than me. The difference between unlikely
attack and a plausible one is often only intellect and time.
This is why all cryptographers demand that their messages have secrecy
protection, in the form of AES, and authenticity protection in the
form of a MAC: either through an encrypt/authenticate mode or through
something like HMAC.
Simon.
.
- Follow-Ups:
- Re: Requesting comments: SRP based IRC encryption
- From: Björn Edström
- Re: Requesting comments: SRP based IRC encryption
- References:
- Requesting comments: SRP based IRC encryption
- From: Björn Edström
- Re: Requesting comments: SRP based IRC encryption
- From: Kristian Gjøsteen
- Re: Requesting comments: SRP based IRC encryption
- From: Björn Edström
- Re: Requesting comments: SRP based IRC encryption
- From: Simon Johnson
- Re: Requesting comments: SRP based IRC encryption
- From: Björn Edström
- Requesting comments: SRP based IRC encryption
- Prev by Date: Re: Encrypting with two or more algorithms vs one
- Next by Date: Re: Performance of RSA key generation
- Previous by thread: Re: Requesting comments: SRP based IRC encryption
- Next by thread: Re: Requesting comments: SRP based IRC encryption
- Index(es):
Relevant Pages
|