🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.crypt
Article #1866

Encryption with MD5

#1866
From: Matt Mahoney
Date: Wed, 18 Nov 1992 17:05
26 lines
1549 bytes
In an earlier article, I asked if encryption by XOR with a pseudo-random
sequence R generated with a secure one-way hash function like MD5:

  R[i+1] = MD5(R[i] XOR password)
  ciphertext = plaintext XOR R

was secure.  The reponse I got was that it was secure, although not
immune to forgery if part of the plaintext was known.  Also, appending
the password to R[i] instead of XOR might be prefereable.

I later discovered a weakness.  If two files encrypted with the same
password are XORed together, then the result is the XOR of the plaintext,
which can be easily broken.

One solution would be to use a salt which would be different for
each file, e.g.

  salt = MD5(time-of-day + filename + process id + ...)
  R[i+1] = MD5(R[i] + password + salt)
  ciphertext = salt + (plaintext XOR R)

where + means concatenation.  Does this weaken the encryption?

--------------------------------        _\/_
Matt Mahoney, mvm@epg.harris.com       |(TV)|  Drug of the Nation
#include <disclaimer.h>                |____|
Technical Details
Message-ID: <Bxx8sr.KIH@jabba.ess.harris.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!sol.ctr.columbia.edu!jabba.ess.harris.com!caesun6!mvm

Show Full Headers
Complete Article Headers
Newsgroups: sci.crypt
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!sol.ctr.columbia.edu!jabba.ess.harris.com!caesun6!mvm
From: mvm@caesun6.epg.harris.com (Matt Mahoney)
Subject: Encryption with MD5
Message-ID: <Bxx8sr.KIH@jabba.ess.harris.com>
Sender: usenet@jabba.ess.harris.com (Usenet News Feed Account)
Nntp-Posting-Host: su3f.ess.harris.com
Reply-To: mvm@epg.harris.com (Matt Mahoney)
Organization: Engineering Productivity Group, Harris Corp., Melbourne, FL
Date: Wed, 18 Nov 1992 17:05:15 GMT
Lines: 27