n'th order encryption
;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:
http://www.geocities.com/xrgsal/ncrypt.txt
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement