Subject: RFC 2877, DES encryption of passwords

From: "Dave Hefford" <[email-masked]>
Date: Wed, 30 Jul 2003 12:23:14 +0100

Hi,

I was looking for some clarification and help of RFC 2877 re DES encryption of passwords. 

All queries refer to section 6.1, 7 

a) "A 16 value created by padding the user id" - I assume this is the potentially 10 byte id not the folded 8 byte id?

b) I assume the padding is right padding?

c) Finally  (less on topic & more asking for help) I'm not familiar with CBC mode. That would be 

des_key(pw_token);                    // set key as schneier 
res = 00 00 00 00 00 00 00 00;        // set Initial Vector to 0's
res = des_enc(res ^ (RDrSEQ+1));      // encode ecb mode random value from host + seq no. xor'ed with previous result
res = des_enc(res ^ RDs);             // ditto my random value xor'ed with previous result
res = des_enc(res ^ ID1st8);          // ditto "DUMMYUSR" xor'ed with previous result
res = des_enc(res ^ IF2nd8);          // ditto "        " 8 0x40's xor'ed with previous result
res = des_enc(res ^ PWSEQs);          // ditto 00 00 00 00 00 00 00 01 xor'ed with previous result

pw_sub = res   ;                      // the value to send at last!

i.e. using PW_TOKEN as key ECB encode each 8 byte value Xor'ed with the previous result and start with 0 to give a "previous result" for the first 8 bytes.

?? I thought that was what I was doing but I don't get the right answer!

Some intermediate values would help - the nature of encryption means where the error is should be obscured.

Using the example from page 12
7D 3E 48 8F 18 08 04 04 server seed
4E 41 42 33 4E 41 42 33 client seed
44 55 4D 4D 59 55 53 52 (DUMMYUSR)
44 55 4D 4D 59 50 57    (DUMMYPW)

I get c4 2c 11 ce a9 1c de d4 as the PW_TOKEN could anyone confirm this is correct please?

The correct PW_TOKEN for the example could be added to the RFC? All the intermediate values could be added? (who said technology is no place for wimps?)

Thanks,

Dave