RFC 2877, DES encryption of passwords
"Dave Hefford" <[email protected]> Wed, 30 Jul 2003 12:23:14 +0100
| Newsgroups | gmane.ietf.tn3270e |
|---|---|
| Message-ID | <031301c3568c$f7ac4be0$3d7e7f80@Davehspc> |
This is a multi-part message in MIME format.
------=_NextPart_000_0310_01C35695.591FADB0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I was looking for some clarification and help of RFC 2877 re DES =
encryption of passwords.=20
All queries refer to section 6.1, 7=20
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=20
des_key(pw_token); // set key as schneier=20
res =3D 00 00 00 00 00 00 00 00; // set Initial Vector to 0's
res =3D des_enc(res ^ (RDrSEQ+1)); // encode ecb mode random value =
from host + seq no. xor'ed with previous result
res =3D des_enc(res ^ RDs); // ditto my random value xor'ed =
with previous result
res =3D des_enc(res ^ ID1st8); // ditto "DUMMYUSR" xor'ed with =
previous result
res =3D des_enc(res ^ IF2nd8); // ditto " " 8 0x40's =
xor'ed with previous result
res =3D des_enc(res ^ PWSEQs); // ditto 00 00 00 00 00 00 00 01 =
xor'ed with previous result
pw_sub =3D 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
------=_NextPart_000_0310_01C35695.591FADB0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2>Hi,<BR><BR>I was looking for =
some=20
clarification and help of RFC 2877 re DES encryption of=20
passwords. </FONT></DIV></DIV>
<DIV><BR><FONT face=3D"Lucida Console" size=3D2>All queries refer =
to section=20
6.1, 7 </FONT></DIV>
<DIV><BR><FONT face=3D"Lucida Console" size=3D2>a) "A 16 value created =
by padding=20
the user id" - I assume this is the potentially 10 byte id not the =
folded 8=20
byte id?</FONT></DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2>b) I assume the padding is =
right=20
padding?</FONT></DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2>c) Finally (less on =
topic &=20
more asking for help) I'm not familiar with CBC mode. That would be =
<BR><BR>des_key(pw_token);  =
; =20
// set key as schneier </FONT></DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2>res =3D 00 00 00 00 00 00 00 =
00; // set Initial Vector to=20
0's</FONT></DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2>res =3D des_enc(res ^=20
(RDrSEQ+1)); // encode ecb mode =
random value=20
from host + seq no. xor'ed with previous result<BR>res =3D des_enc(res ^ =
RDs); &n=
bsp; //=20
ditto my random value xor'ed with previous result<BR>res =3D des_enc(res =
^=20
ID1st8); // =
ditto=20
"DUMMYUSR" xor'ed with previous result<BR>res =3D des_enc(res ^=20
IF2nd8); // =
ditto=20
" " 8 0x40's xor'ed with =
previous=20
result<BR>res =3D des_enc(res ^ PWSEQs); =20
// ditto 00 00 00 00 00 00 00 01 xor'ed =
with=20
previous result</FONT></DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2>pw_sub =3D=20
res ; &nb=
sp; =20
// the value to send at last!</FONT></DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2>i.e. using PW_TOKEN as key =
ECB encode=20
each 8 byte value Xor'ed with the previous result and start with 0 to =
give a=20
"previous result" for the first 8 bytes.</FONT></DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2>?? I thought that was what I =
was doing=20
but I don't get the right answer!</FONT></DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2>Some intermediate values =
would help -=20
the nature of encryption means where the error is should be=20
obscured.</FONT></DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2>Using the example from page=20
12</FONT></DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2>7D 3E 48 8F 18 08 04 04 =
server=20
seed<BR>4E 41 42 33 4E 41 42 33 client seed<BR>44 55 4D 4D 59 55 53 52=20
(DUMMYUSR)<BR>44 55 4D 4D 59 50 57 =
(DUMMYPW)<BR></FONT></DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2>I get c4 2c 11 ce a9 1c de =
d4 as the=20
PW_TOKEN could anyone confirm this is correct please?</FONT></DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2><FONT face=3DArial>The =
correct PW_TOKEN=20
for the example could be added to the RFC? All the intermediate values =
could be=20
added? (who said technology is no place for wimps?)</FONT></DIV>
<DIV><BR></DIV></FONT>
<DIV><FONT face=3D"Lucida Console" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Lucida Console" size=3D2>Dave</FONT></DIV>
<DIV><FONT face=3D"Lucida Console" =
size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0310_01C35695.591FADB0--