Article View: sci.crypt
Article #321Re: Encryption with MD5
From: Colin Plumb
Date: Tue, 03 Nov 1992 01:10
Date: Tue, 03 Nov 1992 01:10
32 lines
1724 bytes
1724 bytes
In article <1992Nov2.200735.15588@mlb.semi.harris.com> mvm@epg.harris.com (Matt Mahoney) writes: >Supposed I generate a pseudo-random number sequence R using a secure >one-way hash function (such as MD5) by: > > r[i+1] = MD5(r[i] XOR password) > >and my encryption (and decryption) algorithm is: > > ciphertext = plaintext XOR R > >Is this secure? Yes, but. It's known as output feedback (OFB) mode, and yes it is secure, *but*... unless you take precautions, an active eavesdropper can still meaningfully alter the message. Let's say you use this to connect an ATM with a central bank computer. The underlying message formats are known. An active wiretap can invert the bit corresponding to some large number of dollars and thereby alter the transaction in its owner's favour, by turning $50 into $50+$1024, for example. A checksum will help, but a standard CRC will *not*, as it is trivial to fix that up by toggling the bits that would indicate the error caused by toggling the $1024 bit. Or if the eavesdropper ever gets all of the plaintext, they can extract the pseudo-one-time pad by xor, and send an arbitrary message in its place. So be careful. -- -Colin
Technical Details
Message-ID:
<1992Nov3.011054.13235@mnemosyne.cs.du.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!mnemosyne.cs.du.edu!nyx!cplumbReferences:
<1992Nov2.200735.15588@mlb.semi.harris.com>Show Full Headers
Complete Article Headers
Newsgroups: sci.crypt Path: arc1-ca.pugleaf.net!sparky!uunet!mnemosyne.cs.du.edu!nyx!cplumb From: cplumb@nyx.cs.du.edu (Colin Plumb) Subject: Re: Encryption with MD5 Message-ID: <1992Nov3.011054.13235@mnemosyne.cs.du.edu> X-Disclaimer: Nyx's hardware; my words. Sender: usenet@mnemosyne.cs.du.edu (netnews admin account) Reply-To: colin@web.apc.org Organization: Nyx, Public Access Unix at U. of Denver Math/CS dept. References: <1992Nov2.200735.15588@mlb.semi.harris.com> Date: Tue, 3 Nov 92 01:10:54 GMT Lines: 32