An efficient and portable implementation of the Fast Fourier Transform
cl-buchberger: A Common Lisp implementation of Buchberger's algorithm.
The CL-UNIFICATION system.
The system contains the definitions for the 'unification' machinery.
The Levenshtein Distance algorithm finds the minimum number of operations needed to transform one string into the other, where an operation is an insertion, deletion, or substitution of a single character.This public domain Common Lisp implementation of the Levenshtein Distance was converted to Common Lisp from the Scheme example given in Wikipedia.Soundex may also be of interest for those wanting to sort words.
Fast algorithms for simple random sampling from sets,
The Soundex algorithm indexes words by their sound when pronounced in English, for example to account for differences in spelling.This public domain Common Lisp implementation of Soundex was originally in the JWZ tarball of the CMU AI repository.
Natural Language Processing text
Ironclad is a Common Lisp Cryptography package; several block encryption algorithms and hash functions are included with the initial release. Its initial impetus was to unify several of the cryptographic packages for Common Lisp (such as the MD5 and SHA1 implementations floating around), but it aims at providing a cryptographic toolkit similar in scope to something like OpenSSL or Crypto++.
Supported ciphers: AES, DES, 3DES, Blowfish, Twofish, RC5, RC6, Arcfour (RC4)
Supported hash functions: MD4, MD5, SHA1, SHA256, Tiger, Adler32, CRC32 (also supports tree hashes)
RFC 2104 HMACs and RFC 4493 CMACs
Public key schemes: DSA signing and verification
Key derivation functions: PBKDF1, PBKDF2 (RFC 2898)
The Ironclad homepage and package documentation can be found at:http://method-combination.net/lisp/ironclad/Ironclad can be downloaded from:An ASDF package-definition file is included.The SHA-1 and SHA-256 hash functions do not work under CLISP versions earlier than 2.34. Please upgrade your CLISP installation. (The failures are related to CLISP's handling of (LOOP ... FINALLY ...).)Ironclad is distributed under a liberal X11/MIT-like license.Debian packageIronclad has been packaged for Debian. You can just apt-get install it.The latest Debian package sources can be found among the CL-Debian repositories.Note however that the Debian package lacks some cryptographic algorithms, removed due to patent issues. More information here.Using IroncladRSA With Ironclad—The Missing Manual is an article about using the RSA functionality that is currently implemented in Ironclad.Tell us how you are using Ironclad:
To encrypt passwords for a web site, for that I created the following function:
(defun hash-password (password)
Very simple example of encrypting and decrypting a message using the blowfish algorithm:(push "/home/mcarter/ironclad_0.20.1/" asdf:*central-registry*) ; or something similar
(asdf:oos 'asdf:load-op 'ironclad)
(defun cipher-example (message password)
(let* ((iv (ironclad:ascii-string-to-byte-array password))
(cipher (ironclad:make-cipher :blowfish :mode :ecb :key iv)))
(setf message (ironclad:ascii-string-to-byte-array message))
(format t "original message as bytes:~A~%" message)
(ironclad:encrypt-in-place cipher message)
(format t "encrypted message as bytes:~A~%" message)
(ironclad:decrypt-in-place cipher message)
;; convert the message back to a string
(setf message (coerce message 'list))
(setf message (mapcar #'code-char message))
(setf message (coerce message 'string))
(format t "your original message was:*~A*~%" message)))
* (cipher-example "ironclad is a way of encrypting and decrypting messages" "my password")
original message as bytes:#(105 114 111 110 99 108 97 100 32 105 115 32 97 32
119 97 121 32 111 102 32 101 110 99 114 121 112
116 105 110 103 32 97 110 100 32 100 101 99 114
121 112 116 105 110 103 32 109 101 115 115 97 103
encrypted message as bytes:#(206 106 66 158 68 233 4 198 157 196 72 39 13 110
140 102 0 27 7 177 80 46 144 203 187 69 89 95 208
51 206 149 172 158 127 210 90 210 19 240 224 252
137 13 19 206 188 20 101 115 115 97 103 101 115)
your original message was:*ironclad is a way of encrypting and decrypting messages*
NIL A more functional (hopefully simpler) example(ql:quickload :ironclad)
(defun get-cipher (key)
:key (ironclad:ascii-string-to-byte-array key)))
(defun encrypt (plaintext key)
(let ((cipher (get-cipher key))
(msg (ironclad:ascii-string-to-byte-array plaintext)))
(ironclad:encrypt-in-place cipher msg)
(defun decrypt (ciphertext-int key)
(let ((cipher (get-cipher key))
(msg (ironclad:integer-to-octets ciphertext-int)))
(ironclad:decrypt-in-place cipher msg)
(coerce (mapcar #'code-char (coerce msg 'list)) 'string)))
* (defvar test (encrypt "A simple test message" "pass"))
* (decrypt test "pass")
"A simple test message"
The MD5 Message-Digest Algorithm RFC 1321
A utility library implementing 2x2, 3x3, 4x4, and NxN matrix functionality.
Graph manipulation utilities for Common Lisp
An implementation of heap and priority queue data structures.
CL-MW: A Master/Slave Library
Password management for Common Lisp (web) applications. cl-password-store provides a light-weight and extendible solution to
safe password storage:
cleartext-free, using your choice of hash algorithm through
storage in an SQL database through
clsql, in a database your application
already uses anyway, or in a separate one, and using any backend
supported by clsql,
password reset mechanism with one-time tokens (suitable for mailing
to users for confirmation),
user creation optionally with confirmation tokens (suitable for
mailing to users),
(obviously) user authentication.
Users can be identified by strings or by subclassing
user-token-mixin. The code is available under LLGPL at github. For documentation check out the
CL-PROJ Common Lisp bindings for the Proj4 geographic projections library.
Substring search and string matching, exact and inexact and other algorithms on strings and sequences.
This is a mirror of the repository on SourceForge.
DIFF is a simple asdf-installable Text Library which can compute unified-style or context-style diffs between two files. It also includes code to compute copy/insert deltas via the vdelta algorithm and encode those diffs in svndiff format. Other algorithms and encodings are planned for future versions. Version 0.4 includes a reader for "patch" files; an interface for applying patches is planned for future versions. Comments on the interface or wanted algorithms greatly appreciated.NOTE: Old rice.edu link broken as of 12/31/2009. Code has reappeared on github at https://github.com/froydnj/diff
efficient implementations of various string metric algorithms
Jaro-Winkler and Levenshtein string distance algorithms.