Re: What are the DC instuctions buried in RSA in 3 lines of perl?

New Message Reply About this list Date view Thread view Subject view Author view

Adam Back (aba@dcs.ex.ac.uk)
Mon, 23 Mar 1998 23:52:55 GMT


Perry Metzger <perry@piermont.com> writes:
> "Peter D. Junger" writes:
> > In connection both with my law suit against the enforcement of theexport
> > regulations relating to encryption software and with my course in
> > computing and the law, I believe it would be a big help if I could
> > understand the dc instructions that are implemented in Adam Back's
> > version of RSA in two or three lines of perl.
>
> BTW, I will point out that a version of RSA in Scheme is only a few
> lines longer, and actually can be read and understood easily by people
> (which might make it of more use in a legal context.)

Ulf Moeller wrote an RSA in scheme:

(define(RSA m e n)(list->string(u(r(s(string->list m))e n))))(define(u a)(if(>
a 0)(cons(integer->char(modulo a 256))(u(quotient a 256)))'()))(define(s a)(if
(null? a)0(+(char->integer(car a))(* 256(s(cdr a))))))(define(r a x n)(cond((=
0 x)1)((odd? x)(modulo(* a(r a(- x 1)n))n))(#t(modulo(expt(r a(/ x 2)n)2)n))))

usage instructions at:

        http://www.dcs.ex.ac.uk/~aba/rsa/scheme.html

Adam

-- 
Now officially an EAR violation...
Have *you* exported RSA today? --> http://www.dcs.ex.ac.uk/~aba/rsa/

print pack"C*",split/\D+/,`echo "16iII*o\U@{$/=$z;[(pop,pop,unpack"H*",<> )]}\EsMsKsN0[lN*1lK[d2%Sa2/d0<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<J]dsJxp"|dc`


New Message Reply About this list Date view Thread view Subject view Author view

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

The following archive was created by hippie-mail 7.98617-22 on Fri Aug 21 1998 - 17:16:11 ADT