From: Sam Roberts Date: 2004-04-16T01:45:23+09:00 Subject: Re: openssl ciphers Wrote Vance Heron , on Thu, Apr 15, 2004 at 11:47:16AM +0900: > Hello, > I'm a relatively new user, trying to build an app that > will do an NTLM authentication over HTTP. > > Part of the algorithm involves DES encrypting the > string "KGS!@#$%" using a key consisting of the > following bytes: > "0x52 0xa2 0x51 0x6b 0x25 0x2a 0x51 0x61" > > In the example, the encrypted text is supposed to be: > "0xff 0x37 0x50 0xbc 0xc2 0xb2 0x24 0x12" > > but when using openssl in ruby I get > "0xc7 0x17 0x53 0x90 0x28 0x9e 0xa1 0xe3 > 0x04 0xa4 0xbe 0x0b 0x1a 0xb8 0xf6 0x29" > > which is twice a long, in addition to being > different from what's expected. If its an extra block long, is it possible the APIs you use accept variable length input, and implement a padding algorithm (thus an extra block)? And that they default to CBC, which requires an IV (thus the different first block)? The ruby calls below have a "final", the purpose of which is usually to add padding. Cheers, Sam -- Sam Roberts