Interesting - I didn't expect a difference between the 'mod' function (from wiki link) vs the "rem' function. 'rem' works differently for negative values...
Here's an update to my previous now with a decryptor:
;; < SPOILER > ;;
(defun mod (a b)
(rem (+ (rem a b) b) b)
)
(defun e (x a b / c res)
(foreach c (vl-string->list (strcase x t))
(setq res (append res (list (+ (mod (+ (* (- c 97) a) b) 26) 97))))
)
(vl-list->string res)
)
(defun d (x a b / c res)
(foreach c (vl-string->list (strcase x t))
(setq res (append res (list (+ (mod (* (- c 97 b) (- 26 (mod a 26))) 26) 97))))
)
(vl-list->string res)
)