[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: aes-pipe -p function.
hyplex wrote:
> I was using a dos formated key file and a unix format key file in a
> command such as '...|aes-pipe -p 3 3<keys >foobar.out', and to my
> surprise they produced different results(foobar.out). I expected them
> to only work on the ascii representation of the keys, and to convert
> them into the actual binary key. Upon looking at the code though
> (hopefully I just overlooked something) it doesn't do such a conversion
> and it checks the keys file for '\n' or \0 to end a key line. So...
There is nothing wrong with having control characters in passphrases that
get hashed to generate keys. CONTROL-m character (CR) is one such special
character. If you don't want CR characters included as hash input, then
don't use key files containing such characters.
Microsoft's CR-LF pair as newline character is just plain silly, and causes
problems with having to deal with text/binary modes of opening files. Unix
and Linux don't have such sillyness.
> If this is the case, you can either 1) continue to use the ascii
> representation anyway, but then each byte of your key is limited to the
> ascii representation of 0-f.
There is no 0-f limitation per byte. '\n' or \0 terminated string gets
hashed to generated a key.
--
Jari Ruusu 1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9 DB 1D EB E3 24 0E A9 DD
-
Linux-crypto: cryptography in and on the Linux system
Archive: http://mail.nl.linux.org/linux-crypto/