Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I know that I can pass password in HEX as a keyphrase to WiFi network using WEP encryption as well as ASCII. But somehow you cannot get the ASCII when you only know HEX value.

Can anyone explain the underlying reason for this ? How does this work ?

For instance: I have decided to make a small 'laboratory' and set up a network with WEP encryption on my router and try to crack it. And as I have done this I have obtained HEX keyphrase which translated with 'normal' tools or manually with HEX to ASCII table didn't correspond to ASCII values of this key.

share|improve this question

1 Answer 1

up vote 7 down vote accepted

According to Wikipedia's page on WEP:

A 64-bit WEP key is usually entered as a string of 10 hexadecimal (base 16) characters (0-9 and A-F). Each character represents four bits, 10 digits of four bits each gives 40 bits; adding the 24-bit IV produces the complete 64-bit WEP key. Most devices also allow the user to enter the key as five ASCII characters, each of which is turned into eight bits using the character's byte value in ASCII; however, this restricts each byte to be a printable ASCII character, which is only a small fraction of possible byte values, greatly reducing the space of possible keys.

So in hex mode, 0 is 0, but in ASCII mode 0 is 48. Similarly, in hex mode F and f are both 15 (they're the same number), but in ASCII mode they're 70 and 102 respectively (different characters). You actually can convert the hex values to ASCII, but you probably won't get printable characters.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.