Subject: [Sip] aka querry

From: ayan <[email-masked]>
Date: Tue, 4 Oct 2005 17:59:08 +0530

hi all,
 for registration using akav1algorithm,
the nonce value of the WWW-Authenticate header of 401 response for REGISTER
contains the base 64 encoded RAND, AUTN and Server Specific Data.
 how do we parse the RAND, AUTN and Server Specific Data from the nonce
value?
 according to rfc 3310 example in section 3.2 :

__________________________________________________________________________________
 Example:

nonce="MzQ0a2xrbGtmbGtsZm9wb2tsc2tqaHJzZXNy9uQyMzMzMzQK="

0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| RAND |
| |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| AUTN |
| |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Server Data...
+-+-+-+-+-+-+-+-+-+-+-+

Figure 1: Generating the nonce value.

________________________________________________________________________________________
 here a 32 bit value is given for RAND and AUTN.
each base 64 digit will be 6 bit long.
so how do we fit it into 32 bits?
 i'm a little confused on this one?
kindly help me out.
  Thnx n Rgds.
/ayan
_______________________________________________
Sip mailing list  https://www1.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use [email-masked] for questions on current sip
Use [email-masked] for new developments on the application of sip

---

From: Aki Niemi <[email-masked]>
Date: Sat, 22 Oct 2005 20:09:38 +0300

Hi Ayan,

Inline.

ext ayan wrote:
> hi all,
> 
> for registration using akav1algorithm, the nonce value of the
> WWW-Authenticate header of 401 response for REGISTER contains the
> base 64 encoded RAND, AUTN and Server Specific Data.
> 
> how do we parse the RAND, AUTN and Server Specific Data from the
> nonce value?

You first need to base64 decode the content of the field, which will
reveal those parameters in binary format.

> 0                   1                   2                   3 0 1 2 3
> 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
> | |                            RAND                               | |
> | |                                                               | 
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
> | |                            AUTN                               | |
> | |                                                               | 
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
> Server Data... +-+-+-+-+-+-+-+-+-+-+-+
> 
> here a 32 bit value is given for RAND and AUTN. each base 64 digit
> will be 6 bit long. so how do we fit it into 32 bits?

The base64 decoded nonce field can be of any lenght upwards from 64
bits. That is because the RAND and AUTN params can be appended with
additional server generated data, basically serving as the "real" nonce
of the authentication challenge.

Never mind the fact that the example nonces are, well, nonsense; this is
a known bug in the spec. It was a copy-paste error on my part at the
late stages of editing the draft, and I didn't bother to double-check
the examples by actually decoding the fields again -- they're not legal
base64 encoding.

I regret that now, since it seems that many times examples are to
implementors much more important than actual text, syntax definitions or
figures of bit fields... :(

Cheers,
Aki

> i'm a little confused on this one? kindly help me out.
> 
> 
> Thnx n Rgds. /ayan
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> _______________________________________________ Sip mailing list
> https://www1.ietf.org/mailman/listinfo/sip This list is for NEW
> development of the core SIP Protocol Use
> [email-masked] for questions on current sip Use
> [email-masked] for new developments on the application of sip