DES encryption algorithm

Carey Evans careye at spamcop.net
Wed Jan 16 02:31:59 EST 2002


jjfarling at yahoo.com writes:

> I was planning to implement a pure python DES encryption algorithm.
> 
> Now,
> 1: Has any pure python algorithm been implemented already?

I wrote some Python code that does the part of DES needed by the Unix
crypt() function.  See <http://home.clear.net.nz/pages/c.evans/sw/>.

> 2: What would be the best method (to maximise performance) in implementing the high intensity bit swaping of the algorithm (I.e. lists [], long ints?)

The original C code I copied does some kind of magic to do the bit
swapping quickly.  It all uses standard integers and lists of
integers; no long ints.

-- 
	 Carey Evans  http://home.clear.net.nz/pages/c.evans/

                             Cavem canus.



More information about the Python-list mailing list