Re: New authentication protocol, was Re: Tinc's response to Linux's answer to MS-PPTP

2003-10-01 Thread Derek Atkins
Guus Sliepen [EMAIL PROTECTED] writes:

 Compared with the entire TLS protocol it is much simpler, compared with
 just the handshake protocol it is about as simple and probably just as
 efficient, but as I said earlier, I want to get rid of the client/server
 distinction.

You can't get rid of the distinction.  You will always have a client
and a server -- however you may just rename it Initiator and
Responder to make it sound more peer-like, but it's just the same
emperor in different clothes.  The only real distinction between a
_pure_ client-server protocol and a peer-to-peer protocol is that the
latter is generally reversible where the former is not.  By
reversible I mean that either party could be the initiator and
either could be the responder.

HOWEVER, during the run of a protocol it behooves you to label the
parties, and client/server is just as valid a naming as
initiator/responder.  IPsec (IKE) is clearly peer/peer.  Even with
TLS the protocol is reversible if you perform the name mappings and
assume both ends have certificates.

So, I urge you to be careful with trying to get rid of a distinction
that really has little meaning in most protocols.

-derek

-- 
   Derek Atkins 617-623-3745
   [EMAIL PROTECTED] www.ihtfp.com
   Computer and Internet Security Consultant

-
The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to [EMAIL PROTECTED]


Re: New authentication protocol, was Re: Tinc's response to 'Linux's answer to MS-PPTP'

2003-09-30 Thread Bill Stewart
 =Step 1:
 Exchange ID messages. An ID message contains the name of the tinc
 daemon which sends it, the protocol version it uses, and various
 options (like which cipher and digest algorithm it wants to use).

By name of the tinc daemon, do you mean identification information?
That data should be encrypted, and therefore in step 2.
(Alternatively, if you just mean tincd version 1.2.3.4, that's fine.

 Step 2:
 Exchange METAKEY messages. The METAKEY message contains the public part
 of a key used in a Diffie-Hellman key exchange.  This message is
 encrypted using RSA with OAEP padding, using the public key of the
 intended recipient.

You can't encrypt the DH keyparts using RSA unless you first exchange
RSA public key information, which the server can't do without knowing
who the client is (the client presumably knows who the server is,
so you _could_ have the client send the key encrypted to annoy MITMs.)
To make the protocol generally useful for privacy protection,
you shouldn't exchange this information unencrypted.
So do a Diffie-Hellman exchange first, then exchange any other information,
including RSA signatures on the DH keyparts.




-
The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to [EMAIL PROTECTED]


Re: New authentication protocol, was Re: Tinc's response to Linux's answer to MS-PPTP

2003-09-30 Thread Matt Blaze
I wrote:
 For some recent relevant papers, see the ACM-CCS '02 paper my colleagues
 and I wrote on our JFK protocol (http://www.crypto.com/papers/jfk-ccs.ppt),
...
But of course I meant the url to be
http://www.crypto.com/papers/jfk-ccs.pdf

I don't know what I could have been thinking; I don't use the
program that produces files with that extension unless a gun is
pointed to my head.

-matt



-
The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to [EMAIL PROTECTED]


Re: New authentication protocol, was Re: Tinc's response to 'Linux's answer to MS-PPTP'

2003-09-30 Thread Bill Stewart

 If we use RSA encryption, then both sides know their message can only
 be received by the intended recipient. If we use RSA signing, then we
 both sides know the message they receive can only come from the assumed
 sender. For the purpose of tinc's authentication protocol, I don't see
 the difference, but...

  Now, the attacker chooses 0 as his DH public. This makes ZZ always
  equal to zero, no matter what the peer's DH key is.

You need to validate the DH keyparts even if you're
corresponding with the person you thought you were.
This is true whether you're using signatures, encryption, or neither.


-
The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to [EMAIL PROTECTED]


Re: New authentication protocol, was Re: Tinc's response to Linux's answer to MS-PPTP

2003-09-30 Thread Eric Rescorla
Guus Sliepen [EMAIL PROTECTED] writes:

 On Mon, Sep 29, 2003 at 09:35:56AM -0700, Eric Rescorla wrote:
 
  Was there any technical reason why the existing cryptographic
  skeletons wouldn't have been just as good?
 
 Well all existing authentication schemes do what they are supposed do,
 that's not the problem. We just want one that is as simple as possible
 (so we can understand it better and implement it more easily), and which
 is efficient (both speed and bandwidth).

In what way is your protocol either simpler or more efficient
than, say, JFK or the TLS skeleton?


   And I just ripped TLS from the list.
  
  Define ripped. This certainly is not the same as TLS.
 
 Used as a skeleton. Don't ask me to define that as well.

It doesn't appear to me that you've used the TLS skeleton.
The protocol you described really isn't much more like 
TLS than it is like STS or JFK. On the other hand,
all these back and forth DH-based protocols look more
or less the same, except for some important details.


  That's not the same a sdoing a thorough analysis, which can take
  years, as Steve Bellovin has pointed out about Needham-Schroeder.
 
 True, but we can learn even from the bullet holes.

Again, it's important to distinguish between learning experiences
and deployed protocols. I agree that it's worthwhile to try
to do new protocols and let other people analyze them as
a learning experience. But that's different from putting
a not fully analyzed protocol into a deployed system.


  Look, there's nothing wrong with trying to invent new protocols,
  especially as a learning experience. What I'm trying to figure
  out is why you would put them in a piece of software rather 
  than using one that has undergone substantial analysis unless
  your new protocol has some actual advantages. Does it?
 
 We're trying to find that out. If we figure out it doesn't, we'll use
 one of the standard protocols.

Well, I'd start by doing a back of the envelope performance
analysis. If that doesn't show that your approach is better,
then I'm not sure why you would wish to pursue it as a
deployed solution.

-Ekr

-- 
[Eric Rescorla   [EMAIL PROTECTED]
http://www.rtfm.com/

-
The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to [EMAIL PROTECTED]


Re: New authentication protocol, was Re: Tinc's response to 'Linux's answer to MS-PPTP'

2003-09-30 Thread Eric Rescorla
Bill Stewart [EMAIL PROTECTED] writes:

  If we use RSA encryption, then both sides know their message can only
  be received by the intended recipient. If we use RSA signing, then we
  both sides know the message they receive can only come from the assumed
  sender. For the purpose of tinc's authentication protocol, I don't see
  the difference, but...
 
   Now, the attacker chooses 0 as his DH public. This makes ZZ always
   equal to zero, no matter what the peer's DH key is.
 
 You need to validate the DH keyparts even if you're
 corresponding with the person you thought you were.
 This is true whether you're using signatures, encryption, or neither.

Not necessarily.

If you're using fully ephemeral DH keys and a properly designed
key, then you shouldn't need to validate the other public share.

-Ekr


-- 
[Eric Rescorla   [EMAIL PROTECTED]
http://www.rtfm.com/

-
The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to [EMAIL PROTECTED]


Re: New authentication protocol, was Re: Tinc's response to Linux's answer to MS-PPTP

2003-09-30 Thread Guus Sliepen
On Mon, Sep 29, 2003 at 11:54:20AM -0700, Eric Rescorla wrote:

  Well all existing authentication schemes do what they are supposed do,
  that's not the problem. We just want one that is as simple as possible
  (so we can understand it better and implement it more easily), and which
  is efficient (both speed and bandwidth).
 
 In what way is your protocol either simpler or more efficient
 than, say, JFK or the TLS skeleton?

Compared with JFK: http://www.crypto.com/papers/jfk-ccs.pdf section 2.2
shows a lot of keys, IDs, derivatives of keys, random numbers and hashes
of various combinations of the previous, 3 public key encryptions and 2
symmetric cipher encryptions and HMACs. I do not consider that simple.

Compared with the entire TLS protocol it is much simpler, compared with
just the handshake protocol it is about as simple and probably just as
efficient, but as I said earlier, I want to get rid of the client/server
distinction.

 Again, it's important to distinguish between learning experiences
 and deployed protocols. I agree that it's worthwhile to try
 to do new protocols and let other people analyze them as
 a learning experience. But that's different from putting
 a not fully analyzed protocol into a deployed system.
[...]
 Well, I'd start by doing a back of the envelope performance
 analysis. If that doesn't show that your approach is better,
 then I'm not sure why you would wish to pursue it as a
 deployed solution.

I will not repeat our motiviations again. Please don't bother arguing
about this.

-- 
Met vriendelijke groet / with kind regards,
Guus Sliepen [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Re: New authentication protocol, was Re: Tinc's response to 'Linux's answer to MS-PPTP'

2003-09-30 Thread Guus Sliepen
On Mon, Sep 29, 2003 at 09:51:20AM -0700, Bill Stewart wrote:

  =Step 1:
  Exchange ID messages. An ID message contains the name of the tinc
  daemon which sends it, the protocol version it uses, and various
  options (like which cipher and digest algorithm it wants to use).
 
 By name of the tinc daemon, do you mean identification information?
 That data should be encrypted, and therefore in step 2.
 (Alternatively, if you just mean tincd version 1.2.3.4, that's fine.

No, identification information. But still, it's just a name, not a
public key or certificate. It is only used by the receiver to choose
which public key (or certificate etc) to use in Step 2. This information
does not have to be encrypted, it has just as much meaning as the IP
address the sender has.

  Step 2:
  Exchange METAKEY messages. The METAKEY message contains the public part
  of a key used in a Diffie-Hellman key exchange.  This message is
  encrypted using RSA with OAEP padding, using the public key of the
  intended recipient.
 
 You can't encrypt the DH keyparts using RSA unless you first exchange
 RSA public key information, which the server can't do without knowing
 who the client is (the client presumably knows who the server is,
 so you _could_ have the client send the key encrypted to annoy MITMs.)

With tinc, public keys are never exchanged during authentication, they
are known beforehand. And again, there is no distinction between a
client and a server, it is peer to peer.

-- 
Met vriendelijke groet / with kind regards,
Guus Sliepen [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Re: New authentication protocol, was Re: Tinc's response to Linux's answer to MS-PPTP

2003-09-30 Thread Eric Rescorla
Guus Sliepen [EMAIL PROTECTED] writes:

 On Mon, Sep 29, 2003 at 02:07:04PM +0200, Guus Sliepen wrote:
 
  Step 2:
  Exchange METAKEY messages. The METAKEY message contains the public part
  of a key used in a Diffie-Hellman key exchange.  This message is
  encrypted using RSA with OAEP padding, using the public key of the
  intended recipient.
 
 After comments and reading up on suggested key exchange schemes, I think
 this step should be changed to send the Diffie-Hellman public key in
 plaintext, along with a nonce (large random number) to prevent replays
 and the effects of bad DH public keys. Instead of encrypting both with
 RSA, they should instead be signed using the private key of the sender
 (the DH public key and nonce wouldn't fit in a single RSA message
 anyway). 
 
 IKEv2 (as described in draft-ietf-ipsec-ikev2-10.txt) does almost the
 same. However, IKEv2 does not send the signature directly, but first
 computes the shared key, and uses that to encrypt (using a symmetric
 cipher) the signature. I do not see why they do it that way; the
 signature has to be checked anyway, if it can be done before computing
 the shared key it saves CPU time. Encrypting it does not prevent a man
 in the middle from reading or altering it, since a MITM can first
 exchange his own DH public key with both sides (and hence he can know
 the shared keys). So actually, I don't see the point in encrypting
 message 3 and 4 as described at page 8 of that draft at all.
In order to hide the identities of the communicating peers.

Personally, I don't have much use for identity protection,
but this is the reason as I understand it.

-Ekr

-- 
[Eric Rescorla   [EMAIL PROTECTED]
http://www.rtfm.com/

-
The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to [EMAIL PROTECTED]


Re: New authentication protocol, was Re: Tinc's response to Linux's answer to MS-PPTP

2003-09-29 Thread Anne Lynn Wheeler
On Mon, 2003-09-29 at 06:07, Guus Sliepen wrote:

 TLS makes a distinction between a client and a server. If possible I
 wish to avoid making that distinction. If possible, I would also like to
 continue to be able to use an RSA public/private keypair. This made me
 *sketch* the following _authentication_ protocol:
 
... snip ...
 
 Some questions:
 
 - Some people keep saying that you shouldn't send the same kinds of
   messages. TLS sends different kinds of messages depending on its role
   (client or server). Is there a reason behind this?
 
 - Would it be nice to move all the cryptographic parameters exchanged in
   step 1 into the encrypted message in step 2? That way an attacker
   cannot see which encryption and digest algorithms will be used, which
   might make an attack less feasible.
 
 - Did I miss something?

1) TLS both authenticates the server and establishes an encrypted
session in the server part of the transaction. 

2) The original SSL somewhat assumed that the business requirements are
different for server authentication (and encrypted session) vis-a-vis
client authentication. The original SSL requirement a) was to give some
level of confidence to the client that the server that the client thot
it was talking to was actually the server it was talking to and b)
provide an encrypted session. There wasn't actually a threat model
requiring proving who you are ... just a threat model that the server
prove that it was who the client supposedly thot it was. 

3) SSL was being deployed with a requirement for encrypted session in an
environment where client authentication:

  a) might not be required
  b) was not required as part of the transport protocol
  c) was used to webize/tunnel an existing legacy application
  where the client might use userid/password or other 
  authentication previously established
  d) wouldn't be public key based because the clients were not
 expected to have public/private key pairs and certificates

Some web'ized legacy applications were adopted from a private network
environment ... where the client as part of making the connection knew
that it was talking to the correct server. The minimum required to move
that to the wide-open web ... was to provide server authentication and
encrypted session ...  and then tunnel the legacy app thru the encrypted
session. The business requirement and threat model wasn't to invent a
brand new environment from scratch ... but to adapt existing business
operations to the wide-open web.

Mutual authentication was somewhat an add-on of client authentication
to the base infrastructure. In fact, I think that we were the first to
specify and required the first implementation as part of the back-end of
this thing that has come to be called electronic commerce.

random electronic commerce refs:
http://www.garlic.com/~lynn/aadsm5.htm#asrn2
http://www.garlic.com/~lynn/aadsm5.htm#asrn3

The trivial e-commerce is that the merchant server didn't really care
who the client was ... just that the client bought something and the
merchant was going to get paid. The merchant needed to provide some
assurance that the credit card transaction being passed thru to the
financial infrastructure was protected. The merchant relied on the
financial infrastructure authenticating the credit card transaction ...
and, in fact, any mutual authentication that might be done as part of
the SSL transaction had no impact on the credit card transaction. 

To some extent, both VPN and SSL come into existence about the same time
to satisfy specific business requirement(s) (and in part because it was
taking so long to see any progress with ipsec).

-- 
Anne  Lynn Wheeler -  http://www.garlic.com/~lynn/ 

-
The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to [EMAIL PROTECTED]


Re: New authentication protocol, was Re: Tinc's response to Linux's answer to MS-PPTP

2003-09-29 Thread Eric Rescorla
Guus Sliepen [EMAIL PROTECTED] writes:
 On Sat, Sep 27, 2003 at 07:58:14PM +0100, M Taylor wrote:
 TLS makes a distinction between a client and a server. If possible I
 wish to avoid making that distinction. If possible, I would also like to
 continue to be able to use an RSA public/private keypair. This made me
 *sketch* the following _authentication_ protocol:
I'm trying to figure out why you want to invent a new authentication
protocol rather than just going back to the literature and ripping
off one of the many skeletons that already exist (STS, JFK, IKE,
SKEME, SIGMA, etc.). That would save people from the trouble
of having to analyze the details of your new protoocl.


 ==
 Step 1:
 Exchange ID messages. An ID message contains the name of the tinc daemon
 which sends it, the protocol version it uses, and various options (like
 which cipher and digest algorithm it wants to use).
 
 Step 2:
 Exchange METAKEY messages. The METAKEY message contains the public part
 of a key used in a Diffie-Hellman key exchange.  This message is
 encrypted using RSA with OAEP padding, using the public key of the
 intended recipient.

 After this step, both sides use Diffie-Hellman to compute the shared
 secret key. From this master key, keys and IVs for symmetric ciphers and
 digest algorithms will be derived, as well as verification data. From
 this point on all messages will be encrypted.
Why are you using RSA encryption to authenticate your DH rather
than using RSA signature?

Depending on *exactly* how you do things, there are MITM attacks:

Consider the following protocol:

M1={DHx}RSAy -
-  M2={DHy}RSAx
  
   ZZ = DH shared key

HMAC(ZZ,M1,M2)  -
-  HMAC(ZZ,M2,M1) [Reverse order to prevent 
replay]


Now, the attacker chooses 0 as his DH public. This makes ZZ always
equal to zero, no matter what the peer's DH key is. He can now forge
the rest of the exchange and intercept the connection.

-Ekr

-- 
[Eric Rescorla   [EMAIL PROTECTED]
http://www.rtfm.com/

-
The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to [EMAIL PROTECTED]


Re: New authentication protocol, was Re: Tinc's response to Linux's answer to MS-PPTP

2003-09-29 Thread Guus Sliepen
On Mon, Sep 29, 2003 at 07:53:29AM -0700, Eric Rescorla wrote:

 I'm trying to figure out why you want to invent a new authentication
 protocol rather than just going back to the literature and ripping
 off one of the many skeletons that already exist (

Several reasons. Because it's fun, because we learn more from doing it
ourselves (we learn from our mistakes too), because we want something
that fits our needs. We could've just grabbed one from the shelf, but
then we could also have grabbed IPsec or PPP-over-SSH from the shelf,
instead of writing our own VPN daemon. However, we wanted something
different.

 STS,

If you mean station-to-station protocol, then actually that is pretty
much what we are doing now, except for encrypting instead of signing
using RSA.

 JFK, IKE, SKEME, SIGMA, etc.).

And I just ripped TLS from the list.

 That would save people from the trouble of having to analyze the
 details of your new protoocl.

Several people on this list have already demonstrated that they are very
willing to analyse new protocols. Also, I don't *expect* you to do so,
if you don't want to ignore me.

 Why are you using RSA encryption to authenticate your DH rather
 than using RSA signature?

If we use RSA encryption, then both sides know their message can only be
received by the intended recipient. If we use RSA signing, then we both
sides know the message they receive can only come from the assumed
sender. For the purpose of tinc's authentication protocol, I don't see
the difference, but...

 Now, the attacker chooses 0 as his DH public. This makes ZZ always
 equal to zero, no matter what the peer's DH key is.

I think you mean it is equal to 1 (X^0 is always 1). This is the first
time I've heard of this, I've never thought of this myself. In that case
I see the point of signing instead of encrypting.

-- 
Met vriendelijke groet / with kind regards,
Guus Sliepen [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Re: New authentication protocol, was Re: Tinc's response to Linux's answer to MS-PPTP

2003-09-29 Thread Guus Sliepen
On Mon, Sep 29, 2003 at 05:57:46PM +0200, Guus Sliepen wrote:

  Now, the attacker chooses 0 as his DH public. This makes ZZ always
  equal to zero, no matter what the peer's DH key is.
 
 I think you mean it is equal to 1 (X^0 is always 1).

Whoops, stupid me. Please ignore that.

-- 
Met vriendelijke groet / with kind regards,
Guus Sliepen [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Re: New authentication protocol, was Re: Tinc's response to Linux's answer to MS-PPTP

2003-09-29 Thread Matt Blaze
EKR writes:
 I'm trying to figure out why you want to invent a new authentication
 protocol rather than just going back to the literature and ripping
 off one of the many skeletons that already exist (STS, JFK, IKE,
 SKEME, SIGMA, etc.). That would save people from the trouble
 of having to analyze the details of your new protoocl.

Indeed.

It's also worth pointing out that the standards for authentication /
key exchange / key agreement protocols (and the techniques for
attacking them) have improved over the last few years, to the point
that if you want your protocol to have any chance of being taken
seriously, you'd better have both a clear statement of why your
protocol is an improvement over those in the existing literature,
and some kind of proof of security under an appropriate model.

Key agreement turns out to be a surprisingly hard problem, especially
in any context that's to be used in a real protocol.  (For evidence of
this, you need look no further than the fact that research papers on
the subject are still being written and published in competitive
conferences and journals).  Even defining the security model under
which such protocols should be analyzed is a hard problem and the subject
of current research.

It is probably no longer acceptable, as it was just a few years ago,
to throw together an ad-hoc authentication or key agreement protocol
based on informal obvious security properties, without a strong
proof of security and a clear statement of the model under which the
security holds.

For some recent relevant papers, see the ACM-CCS '02 paper my colleagues
and I wrote on our JFK protocol (http://www.crypto.com/papers/jfk-ccs.ppt),
and Ran Canetti and Hugo Krawczyk's several recent papers on the design
and analysis of various IPSEC key exchange protocols (especially their
CRYPTO'02 paper).

-matt

-
The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to [EMAIL PROTECTED]


Re: New authentication protocol, was Re: Tinc's response to Linux's answer to MS-PPTP

2003-09-29 Thread Eric Rescorla
Guus Sliepen [EMAIL PROTECTED] writes:

 On Mon, Sep 29, 2003 at 07:53:29AM -0700, Eric Rescorla wrote:
 
  I'm trying to figure out why you want to invent a new authentication
  protocol rather than just going back to the literature and ripping
  off one of the many skeletons that already exist (
 
 Several reasons. Because it's fun, because we learn more from doing it
 ourselves (we learn from our mistakes too), because we want something
 that fits our needs. We could've just grabbed one from the shelf, but
 then we could also have grabbed IPsec or PPP-over-SSH from the shelf,
 instead of writing our own VPN daemon. However, we wanted something
 different.

And I'm trying to understand why. This answer sounds a lot
like NIH.

Was there any technical reason why the existing cryptographic
skeletons wouldn't have been just as good?


  STS,
 
 If you mean station-to-station protocol, then actually that is pretty
 much what we are doing now, except for encrypting instead of signing
 using RSA.

But that's not a harmless change, which is the point of the potential
attack I just described.


  JFK, IKE, SKEME, SIGMA, etc.).
 
 And I just ripped TLS from the list.

Define ripped. This certainly is not the same as TLS.


  That would save people from the trouble of having to analyze the
  details of your new protoocl.
 
 Several people on this list have already demonstrated that they are very
 willing to analyse new protocols.

Actually, no. People are willing to take a quick look and
then shoot bullets at your protocol. That's not the same as
doing a thorough analysis, which can take years, as Steve
Bellovin has pointed out about Needham-Schroeder.


  Why are you using RSA encryption to authenticate your DH rather
  than using RSA signature?
 
 If we use RSA encryption, then both sides know their message can only be
 received by the intended recipient. If we use RSA signing, then we both
 sides know the message they receive can only come from the assumed
 sender. For the purpose of tinc's authentication protocol, I don't see
 the difference, but...

There's no difference if it's done correctly. If it's not done
correctly...


  Now, the attacker chooses 0 as his DH public. This makes ZZ always
  equal to zero, no matter what the peer's DH key is.
 
 I think you mean it is equal to 1 (X^0 is always 1). This is the first
 time I've heard of this, I've never thought of this myself. In that case
 I see the point of signing instead of encrypting.

Except that the way you compute DH is to do Y^X rather than 
X^Y. 


Look, there's nothing wrong with trying to invent new protocols,
especially as a learning experience. What I'm trying to figure
out is why you would put them in a piece of software rather 
than using one that has undergone substantial analysis unless
your new protocol has some actual advantages. Does it?

-Ekr


-- 
[Eric Rescorla   [EMAIL PROTECTED]
http://www.rtfm.com/

-
The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to [EMAIL PROTECTED]