Re: Linux can't decrypt cipher text created under Windows
- From: David Eather <eather@xxxxxxxxxx>
- Date: Sun, 17 Feb 2008 05:24:29 +1000
danmez@xxxxxxxxx wrote:
at least it seems so. Although I'm a newbie to crytpo, so I'm not
sure.
The actual goal is to write DES decryption code in C to run on a 16
bit micro controller with no OS. This controller will then decrypt
messages encrypted by the Win/DOS exe. I don't have src code to the
Win/Dos exe but know it's doing single DES in ECB mode.
I have working controller code that encrypts and decrypts messages but
I can't decrypt a message encrypted by the Windows/DOS tool.
Furthermore, I wrote a test program under Linux, to make use of the
ecb_crypt() DES library call, but neither my code or the Win/DOS tool
agree with the Linux version. All three seem to encrypt and then
decrypt it's own, but just can't decrypt the other's encrypted data.
I just try on 64 bit plain text messages(like 0x0101010101010101) with
the same key.
So how can these 3 different encryption programs be correct but yet
disagree with each other(produce different cipher text)? From the
definition of DES in the FIPS Publication 46-3, Appendix 1 gives a
"recommended set" of selection functions.
Is it possible Windows and Linux libraries use different selection(S-
Box) functions? Which are both different from what is defined in FIPS
Publication 46-3? But I did google searches and didn't see anyone
else with this problem. I'm confused.
Any feedback would be appreciated!
Thanks,
Dan
Two possibilities not yet mentioned.
Some software reformats the data for the s-boxes into a more "friendly" format for arrays - there is plenty of room for errors there.
Some (most?) software versions of DES do not included the initial and final bit permutations. The resulting cipher is as strong as DES but is not compatible.
Good luck
.
- References:
- Prev by Date: Re: Handheld device for storing passwords?
- Next by Date: Re: Irreversible file tag
- Previous by thread: Re: Linux can't decrypt cipher text created under Windows
- Next by thread: Irreversible file tag
- Index(es):
Relevant Pages
|