Chris Wellons on Emacs and RSA

Chris Wellons likes to make Emacs do unexpected things (see 1, 2, and 3 for instance). His latest example is an implementation of the RSA public key algorithm in Emacs Calc.

It’s only a toy implementation, of course, but the wonder is that you can do it at all in an editor. Of course if your editor is named something besides Emacs, you can’t but, as I’ve said many times before, Emacs is more of a Lisp environment with a library optimized for text editing. That still wouldn’t be enough because Emacs Lisp doesn’t have a full numeric tower. In particular, it doesn’t implement large integers.

Fortunately, Elisp is powerful enough to support the Calc library, which does support large integers. I’ve written about the wonders of Calc before and use it pretty much every day. What Wellons demonstrates is how to use the Calc functionality programmatically. You probably won’t have a need for an Emacs implementation of RSA but if you want to make use of the Calc functionality in your own Elisp code, Wellons’ post has a lot to teach you.

This entry was posted in General and tagged , . Bookmark the permalink.