Sign in to follow this  

n'th order encryption

Recommended Posts

;n'th order encryption, the n'th root algorithm ;by david jones ;the following is a lisp implementation of the n'th root algorithm. ;possible applications include n'th order encryption, random number generation, ;and the modeling of neural behaviior. (defun mul () (setf fy (/ (+ (expt y (- n 1)) (/ x y) ) (* 2 (expt y (- n 1))) ))) (defun is () (setf y (* (+ (/ (- fy 1) k) 1) y))) ;calculates the n'th root of any number ;y converges on the n'th root of x ;fy converges on 1 as y converges on the n'th root of x ;n is the desired root ;k determines the efficiency of convergence on the desired root ;the values of x,y,n, and k are set prior to the first iteration, with y constituting an initial "guess"*-*-*-*-*-*-*- (setf x #36rthisisamessage) (setf n 51) (setf k 26) (setf y #36rhello) (setq *print-base* 36) (mul) (is) ;(mul) ;(is) ;loading this file into a lisp listener will set all variables to an initial iteration of ;calculating the 51st root of "this is a message," set to an initial value of "hello." ;check the values of fy and y fields after loading. (MUL) (IS) 0 ;copyright 2006 david jones. all rights reserved this file ois available online at:

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this