Subject: [midcom] STUN issue #7: recommended stateless server procedures

From: Jonathan Rosenberg <[email-masked]>
Date: Tue, 19 Nov 2002 03:34:37 -0500

The STUN specification doesn't give any specific algorithm for doing a 
stateless server. Stateless operation requires some way to hand out 
usernames and passwords without storing them.

Since it is easy to do this wrong, Steve Bellovin recommedned an 
algorithm. The algorithm also allows for determination of the source IP 
address used for the TLS exchange, needed to handle another one of the 
open issues. His algorithm is:

username = <prefix,rounded-time,clientIP,hmac>

where prefix is some string (I honestly don't know what this is needed 
for - I have a note in asking him), rounded-time is the time rounded 
off, clientIP is the IP address where the TLS exchange came from, and 
hmac is the hmac over the prefix, rounded-time and client IP, using a 
server key.

password = <hmac(USERNAME,anotherprivatekey)>

This allows the server to verify the password against the username, 
determine the staleness of the username, and determine the client IP 
used in the TLS exchange, all without state.

I recommend we document this algorithm in the spec.

-Jonathan R.

-- 
Jonathan D. Rosenberg, Ph.D.                72 Eagle Rock Ave.
Chief Scientist                             First Floor
dynamicsoft                                 East Hanover, NJ 07936
[email-masked]                     FAX:   (973) 952-5050
http://www.jdrosen.net                      PHONE: (973) 952-5000
http://www.dynamicsoft.com

_______________________________________________
midcom mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/midcom

---

From: "Adina Simu \(asimu\)" <[email-masked]>
Date: Tue, 19 Nov 2002 10:13:06 -0800

> username = <prefix,rounded-time,clientIP,hmac>

(sorry, I'm being very dense today)

Why is rounded-time needed?

Does this somehow imply reliable time?

thanks
-Adina

---

From: Jonathan Rosenberg <[email-masked]>
Date: Thu, 21 Nov 2002 03:32:20 -0500

inline.

> Why is rounded-time needed?

To prevent people from reusing old usernames. They are supposed to have 
an expiration time.

> Does this somehow imply reliable time?

Reliable? It doesn't require any clock synchronization, if thats what 
you mean. It does require maintaining the clock across reboots if you 
want the username to be valid across reboots, which you do.

-Jonathan R.