Date: Fri, 12 Jan 2001 10:34:21 -0800 From: Brooks Davis <brooks@one-eyed-alien.net> To: Brian Reichert <reichert@numachi.com> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: wicontrol: password <-> hex digits Message-ID: <20010112103421.C20792@Odin.AC.HMC.Edu> In-Reply-To: <20010112125446.C93738@numachi.com>; from reichert@numachi.com on Fri, Jan 12, 2001 at 12:54:46PM -0500 References: <20010112125446.C93738@numachi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 12, 2001 at 12:54:46PM -0500, Brian Reichert wrote: > I'm trying to debug my interactions with a WAP. Could someone > quickly explain the algorithm in wicontrol for converting a text > key to a hex key, and vice-versa? Yes, I could go scrounge though > the source, but I have my hands full... The hex version is just the literal ASCII string. IMNSHO it's a really bad idea to generate a key by converting an ASCII string as you limit your key space tremendously by doing so. If you really want to do this you can use: echo "password" | hexdump -C Just ignore the trailing 0x0a. My recommended key generation method is actually: dd count=13 bs=1 if=/dev/random of=/dev/stdout | hexdump -C > And, while I'm at it, how does 'wicontrol -i wi0' know when to dump > out the keys in text vs hex? It checks to see if all the characters are printable with isprint() and if they are it prints the string in ASCII, otherwise it prints it out in hex. I implemented this feature because it pretty much does what the user would expect, but it's pretty stupid because it encourages people to use ASCII keys. -- Brooks -- Any statement of the form "X is the one, true Y" is FALSE. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010112103421.C20792>