Does rotor follow a cross-language encryption algorithm ?

Lance Ellinghaus lellinghaus at yahoo.com
Sun Nov 25 17:23:56 EST 2001


Hello Stephen!!

I thought I should put in my $0.02 since I wrote the module...

> Which also answers my other question about it being available
> in C (obviously, it is !).  Rewriting this in Java should be
> straightforward. 

Yes. The rewrite to Java should be pretty easy. I had most of it
rewritten in Java for a little project I had at one time.

> Lance Ellinghouse (who wrote rotormodule.c) also writes that the 
> output "is considered BINARY data" so a CRLF, LF or CR are not
> possible output.

CRLF, LF, and CR are possible in the output of encrypted data. The
input and output are both 8bit clean (all 8bits are used). You cannot
add additional CRLF, LF, or CR and expect to get the data back
correctly. One thing you can do is take the output of the rotor and
feed it through UUENCODE, A2B, etc to convert it from binary data to
ASCII encoded data. Then you can do whatever you want with it, as long
as you reverse the process EXACTLY to recreate the binary data to feed
back into the rotor to decrypt it.
(I should change the comments in the code as my last name has changed
since then. It is now Ellinghaus. Oh well...)

> Reading his comments, this does not seem to be a "standard"
> rotor. However, having the C and Java equivalents will suffice
> at the moment.  Makes me wonder why more people don't use the
> rotor when they need "just enough" encryption without going
> the full hog with PKI.

You are correct. It is not a "standard" rotor. The German Enigma rotor
ran through 3 iterations with a fixed offset to start. The one in the
rotor module uses a variable offset (defined by the key passed in),
primes the data stream, and then uses a variable number of iterations
with separate offsets (defined by a passed in optional variable at
rotor creation time). *Have not looked at the code in a while... I
believe this is correct...*

I wrote it before the PKI stuff was available! It has been used for
data stream encryption for a long time by people. PKI is great and much
stronger than the rotor module, but as you stated, it works when you
need "just enough" encryption.

I have thought of rewriting it into pure Python so it could be used on
any platform (including handhelds), but have not gotten around to it
and am a little worried about speed.

Lance Ellinghaus


=====
--
Lance Ellinghaus

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1




More information about the Python-list mailing list