By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,587 Members | 1,070 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,587 IT Pros & Developers. It's quick & easy.

DES-CBC 16 Byte HEX key

P: 4
Hello all,

I have a requirement to decrypt a string that has apparently been encrypted using the DES algorithm in CBC mode. There seems to be no shortage of information around relating to how this can be achieved within .NET however my hurdle seems to be a more fundamental understanding of strings (bytes/hex - encoding??).

Documentation on single DES-CBC all clearly specifies the requirement is an 8 byte key. The key being supplied to us however is a 16 Byte HEX format. (E.G "E61CC4F71C017367")

What is it exactly that I need to understand to make this 16 Byte Hex key work to decrypt using DES-CBC?

Any direction with how to approach this problem is much appreciated. Thanks in advance.
Dec 17 '08 #1
Share this Question
Share on Google+
6 Replies


P: 10
As i know u can use triple DES with two keys which is much more secure
Dec 17 '08 #2

P: 4
Sharaola,

Unfortunately, I have no control over the method of encryption that has been chosen as the data is being supplied by a different company who do not answer to us. TripleDES is therefore not a possibilty.

I have no choice but to "understand" the problem and solve it.
Dec 17 '08 #3

P: 10
@Tricky
I understand the problem , but the Single DES key is only 64 bit "and actually 56 bit in operation" , the only way is to make your program exclude the extra bits and deal with only 64 bits.

Hope i can help , but i reply as i understand the situation
Dec 17 '08 #4

P: 4
Sharola your reply is appreciated.

I agree that the 16 byte key needs to be stripped back to the 8 byte representation for DES. I lack the basic neccessary understanding of this procedure hence my original post :

"my hurdle seems to be a more fundamental understanding of strings (bytes/hex - encoding??)"

"What is it exactly that I need to understand to make this 16 Byte Hex key work to decrypt using DES-CBC?"

Are you able to assist with this specifically?
Dec 17 '08 #5

P: 10
No sir , if u reach , inform me plz , thanks
Dec 17 '08 #6

nukefusion
Expert 100+
P: 221
I realize that you probably haven't posted the exact key, but is the example one the same length as the real key?

I only ask because if so, then that is an 8 byte key. 2 hexadecimal characters is equal to 1 byte, so your 16 character hexadecimal key is in fact an 8 byte key.
Dec 17 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.