Common Lisp Package: IRONCLAD

README:

FUNCTION

Public

ASCII-STRING-TO-BYTE-ARRAY (STRING &KEY (START 0) END)

Convert STRING to a (VECTOR (UNSIGNED-BYTE 8)). It is an error if STRING contains any character whose CHAR-CODE is greater than 255.

BYTE-ARRAY-TO-HEX-STRING (VECTOR &KEY (START 0) END (ELEMENT-TYPE 'BASE-CHAR))

Return a string containing the hexadecimal representation of the subsequence of VECTOR between START and END. ELEMENT-TYPE controls the element-type of the returned string.

CIPHER-SUPPORTED-P (NAME)

Return T if the cipher NAME is supported as an argument to MAKE-CIPHER.

DECRYPT (CIPHER CIPHERTEXT PLAINTEXT &KEY (CIPHERTEXT-START 0) CIPHERTEXT-END (PLAINTEXT-START 0) HANDLE-FINAL-BLOCK)

Decrypt the data in CIPHERTEXT between CIPHERTEXT-START and CIPHERTEXT-END according to CIPHER. Places the decrypted data in PLAINTEXT, beginning at PLAINTEXT-START. Less data than (- CIPHERTEXT-END CIPHERTEXT-START) may be encrypted, depending on the alignment constraints of CIPHER and the amount of space available in PLAINTEXT.

DIGEST-SUPPORTED-P (NAME)

Return T if the digest NAME is a valid digest name.

EGCD

Extended Euclidean algorithm, aka extended greatest common denominator.

ENCRYPT (CIPHER PLAINTEXT CIPHERTEXT &KEY (PLAINTEXT-START 0) PLAINTEXT-END (CIPHERTEXT-START 0) HANDLE-FINAL-BLOCK)

Encrypt the data in PLAINTEXT between PLAINTEXT-START and PLAINTEXT-END according to CIPHER. Places the encrypted data in CIPHERTEXT, beginning at CIPHERTEXT-START. Less data than (- PLAINTEXT-END PLAINTEXT-START) may be encrypted, depending on the alignment constraints of CIPHER and the amount of space available in CIPHERTEXT.

EXPT-MOD

As (mod (expt n exponent) modulus), but more efficient.

GENERATE-PRIME (NUM-BITS &OPTIONAL (PRNG *PRNG*))

Return a NUM-BITS-bit prime number with very high probability (1:2^128 chance of returning a composite number).

GET-OUTPUT-STREAM-OCTETS (STREAM)

As GET-OUTPUT-STREAM-STRING, only with an octet output-stream instead of a string output-stream.

HEX-STRING-TO-BYTE-ARRAY (STRING &KEY (START 0) (END NIL))

Parses a substring of STRING delimited by START and END of hexadecimal digits into a byte array.

MAKE-CIPHER (NAME &KEY KEY MODE INITIALIZATION-VECTOR PADDING)

Return a cipher object using algorithm NAME with KEY in the specified MODE. If MODE requires an initialization vector, it must be provided as INITIALIZATION-VECTOR; otherwise, the INITIALIZATION-VECTOR argument is ignored.

MAKE-DIGEST (DIGEST-NAME &REST KEYS &KEY &ALLOW-OTHER-KEYS)

Return a digest object which uses the algorithm DIGEST-NAME.

MAKE-KDF (KIND &KEY DIGEST (N 4096) (R 8) (P 2))

digest is used for pbkdf1 and pbkdf2. N, p, and r are cost factors for scrypt.

MAKE-OCTET-INPUT-STREAM (BUFFER &OPTIONAL (START 0) END)

As MAKE-STRING-INPUT-STREAM, only with octets instead of characters.

MAKE-OCTET-OUTPUT-STREAM

As MAKE-STRING-OUTPUT-STREAM, only with octets instead of characters.

MAKE-RANDOM-SALT (&OPTIONAL (SIZE 16))

Generate a byte vector of SIZE (default 16) random bytes, suitable for use as a password salt.

PBKDF2-CHECK-PASSWORD (PASSWORD COMBINED-SALT-AND-DIGEST)

Given a PASSWORD byte vector and a combined salt and digest string produced by PBKDF2-HASH-PASSWORD-TO-COMBINED-STRING, checks whether the password is valid.

PBKDF2-HASH-PASSWORD (PASSWORD &KEY (SALT (MAKE-RANDOM-SALT)) (DIGEST 'SHA256) (ITERATIONS 1000))

Given a PASSWORD as a byte vector, a SALT as a byte vector (MAKE-RANDOM-SALT is called to generate a random salt if none is provided), a digest function (SHA256 by default), and a number of iterations (1000), returns the PBKDF2-derived hash of the password (byte vector) as the first value, and the SALT (byte vector) as the second value.

PBKDF2-HASH-PASSWORD-TO-COMBINED-STRING (PASSWORD &KEY (SALT (MAKE-RANDOM-SALT)) (DIGEST 'SHA256) (ITERATIONS 1000))

Given a PASSWORD byte vector, a SALT as a byte vector (MAKE-RANDOM-SALT is called to generate a random salt if none is provided), a digest function (SHA256 by default), and a number of iterations (1000), returns the salt and PBKDF2-derived hash of the password encoded in a single ASCII string, suitable for use with PBKDF2-CHECK-PASSWORD.

PRIME-P (N &OPTIONAL (PRNG *PRNG*))

True if N is a prime number (with very high probability; 1:2^128 chance of returning true for a composite number.

READ-SEED (PATH &OPTIONAL (PSEUDO-RANDOM-NUMBER-GENERATOR *PRNG*))

Reseed PSEUDO-RANDOM-NUMBER-GENERATOR from PATH. If PATH doesn't exist, reseed from /dev/random and then write that seed to PATH.

STRONG-RANDOM (LIMIT &OPTIONAL (PRNG *PRNG*))

Return a strong random number from 0 to limit-1 inclusive. A drop-in replacement for COMMON-LISP:RANDOM.

Undocumented

ADD-RANDOM-EVENT (SOURCE POOL-ID EVENT &OPTIONAL (PSEUDO-RANDOM-NUMBER-GENERATOR *PRNG*))

CMAC-DIGEST (CMAC)

DECRYPT-IN-PLACE (CIPHER TEXT &KEY (START 0) END)

DSA-KEY-G (DSA-KEY)

DSA-KEY-P (DSA-KEY)

DSA-KEY-Q (DSA-KEY)

ENCRYPT-IN-PLACE (CIPHER TEXT &KEY (START 0) END)

GENERATE-PRIME-IN-RANGE (LOWER-LIMIT UPPER-LIMIT &OPTIONAL (PRNG *PRNG*))

HMAC-DIGEST (HMAC &KEY BUFFER (BUFFER-START 0))

INTEGER-TO-OCTETS (BIGNUM &KEY (N-BITS (INTEGER-LENGTH BIGNUM)) (BIG-ENDIAN T))

LIST-ALL-CIPHERS

LIST-ALL-DIGESTS

LIST-ALL-MODES

LIST-ALL-PRNGS

MAKE-CMAC (KEY CIPHER-NAME)

MAKE-DIGESTING-STREAM (DIGEST)

MAKE-DSA-SIGNATURE (R S)

MAKE-HMAC (KEY DIGEST-NAME)

MAKE-TIGER-TREE-HASH

MODE-SUPPORTED-P (NAME)

OCTETS-TO-INTEGER (OCTET-VEC &KEY (START 0) END (BIG-ENDIAN T) N-BITS)

RANDOM-BITS (NUM-BITS &OPTIONAL (PSEUDO-RANDOM-NUMBER-GENERATOR *PRNG*))

RANDOM-DATA (NUM-BYTES &OPTIONAL (PSEUDO-RANDOM-NUMBER-GENERATOR *PRNG*))

READ-OS-RANDOM-SEED (SOURCE &OPTIONAL (PRNG *PRNG*))

UB16REF/BE (VECTOR INDEX)

UB16REF/LE (VECTOR INDEX)

UB32REF/BE (VECTOR INDEX)

UB32REF/LE (VECTOR INDEX)

UB64REF/BE (VECTOR INDEX)

UB64REF/LE (VECTOR INDEX)

UPDATE-CMAC (CMAC SEQUENCE &KEY (START 0) END)

UPDATE-HMAC (HMAC SEQUENCE &KEY (START 0) (END (LENGTH SEQUENCE)))

WRITE-SEED (PATH &OPTIONAL (PRNG *PRNG*))

Private

%COPY-MD4-REGS (SEQUENCE)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

%COPY-MD5-REGS (SEQUENCE)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

%COPY-RIPEMD-128-REGS (SEQUENCE)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

%COPY-RIPEMD-160-REGS (SEQUENCE)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

%COPY-SHA1-REGS (SEQUENCE)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

%COPY-SHA224-REGS (SEQUENCE)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

%COPY-SHA256-REGS (SEQUENCE)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

%COPY-SHA384-REGS (SEQUENCE)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

%COPY-SHA512-REGS (SEQUENCE)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

%COPY-TIGER-REGS (SEQUENCE)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

ADLER32-S1 (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

ADLER32-S2 (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

COPY-TO-BUFFER

Copy a partial segment from input vector from starting at from-offset and copying count elements into the 64 byte buffer starting at buffer-offset.

CRC24-CRC (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

CRC32-CRC (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

EXPAND-BLOCK

Expand the first 16 words in BLOCK to fill the entire 80 word space available.

FEED-FIFO (PSEUDO-RANDOM-NUMBER-GENERATOR PATH)

Feed random data into a FIFO

FILL-BLOCK-UB8-BE (BLOCK BUFFER OFFSET)

Convert a complete 64 (unsigned-byte 8) input vector segment starting from offset into the given 16 word SHA1 block. Calling this function without subsequently calling EXPAND-BLOCK results in undefined behavior.

FILL-BLOCK-UB8-BE/64

Convert a complete 128 (unsigned-byte 8) input vector segment starting from offset into the given 16 qword SHA1 block. Calling this function without subsequently calling EXPAND-BLOCK results in undefined behavior.

FILL-BLOCK-UB8-LE (BLOCK BUFFER OFFSET)

Convert a complete 64 (UNSIGNED-BYTE 8) input BUFFER starting from OFFSET into the given (UNSIGNED-BYTE 32) BLOCK.

FILL-BLOCK-UB8-LE/64

Convert a complete 128 (unsigned-byte 8) input vector segment starting from offset into the given 16 qword SHA1 block. Calling this function without subsequently calling EXPAND-BLOCK results in undefined behavior.

GENERATE-BLOCKS (GENERATOR NUM-BLOCKS)

Internal use only

GENERATE-SMALL-PRIMES (N)

Generates a list of all primes up to N using the Sieve of Eratosthenes. Was used to generate the list above; included for mathematical interest.

MD2-AMOUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD2-BUFFER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD2-BUFFER-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD2-CHECKSUM (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD2-REGS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD4-AMOUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD4-BLOCK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD4-BUFFER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD4-BUFFER-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD4-REGS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD5-AMOUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD5-BLOCK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD5-BUFFER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD5-BUFFER-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MD5-REGS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MDX-AMOUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MDX-BUFFER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MDX-BUFFER-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MODULAR-INVERSE (N MODULUS)

Returns M such that N * M mod MODULUS = 1

RABIN-MILLER

Rabin-Miller probabalistic primality test. There is a 1:2^128 chance that a composite number will be determined to be a prime number using this test.

RIPEMD-128-AMOUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RIPEMD-128-BLOCK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RIPEMD-128-BUFFER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RIPEMD-128-BUFFER-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RIPEMD-128-REGS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RIPEMD-160-AMOUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RIPEMD-160-BLOCK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RIPEMD-160-BUFFER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RIPEMD-160-BUFFER-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RIPEMD-160-REGS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA1-AMOUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA1-BLOCK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA1-BUFFER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA1-BUFFER-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA1-REGS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA224-AMOUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA224-BLOCK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA224-BUFFER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA224-BUFFER-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA224-REGS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA256-AMOUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA256-BLOCK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA256-BUFFER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA256-BUFFER-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA256-REGS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA384-AMOUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA384-BLOCK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA384-BUFFER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA384-BUFFER-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA384-REGS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA512-AMOUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA512-BLOCK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA512-BUFFER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA512-BUFFER-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SHA512-REGS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TIGER-AMOUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TIGER-BLOCK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TIGER-BUFFER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TIGER-BUFFER-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TIGER-REGS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TREE-HASH-BLOCK-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TREE-HASH-BLOCK-LENGTH (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TREE-HASH-BRANCH (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TREE-HASH-STATE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

UPDATE-MD5-BLOCK

This is the core part of the MD5 algorithm. It takes a complete 16 word block of input, and updates the working state in A, B, C, and D accordingly.

UPDATE-WHIRLPOOL-BLOCK (REGS BLOCK)

this is the core part of the whirlpool algorithm. it takes a complete 16 word block of input, and updates the working state in the regs.

WHIRLPOOL-AMOUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

WHIRLPOOL-BLOCK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

WHIRLPOOL-BUFFER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

WHIRLPOOL-BUFFER-INDEX (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

WHIRLPOOL-REGS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

Undocumented

%ADD-WITH-CARRY (X Y CARRY)

%BLOCK-CIPHER-P (INFO)

%DEFCIPHER (NAME INITARGS)

%FIND-CIPHER (NAME)

SETF%FIND-CIPHER (CIPHER-INFO NAME)

%MAKE-ADLER32-DIGEST

%MAKE-ADLER32-STATE (S1 S2)

%MAKE-CRC24-DIGEST

%MAKE-CRC24-STATE (CRC)

%MAKE-CRC32-DIGEST

%MAKE-CRC32-STATE (CRC)

%MAKE-MD2-DIGEST (&AUX (BUFFER (MAKE-ARRAY 16 ELEMENT-TYPE '(UNSIGNED-BYTE 8) INITIAL-ELEMENT 0)))

%MAKE-MD2-STATE (REGS CHECKSUM BUFFER BUFFER-INDEX)

%MAKE-MD4-DIGEST

%MAKE-MD4-STATE (REGS AMOUNT BLOCK BUFFER BUFFER-INDEX)

%MAKE-MD5-DIGEST

%MAKE-MD5-STATE (REGS AMOUNT BLOCK BUFFER BUFFER-INDEX)

%MAKE-RIPEMD-128-DIGEST

%MAKE-RIPEMD-128-STATE (REGS AMOUNT BLOCK BUFFER BUFFER-INDEX)

%MAKE-RIPEMD-160-DIGEST

%MAKE-RIPEMD-160-STATE (REGS AMOUNT BLOCK BUFFER BUFFER-INDEX)

%MAKE-SHA1-DIGEST

%MAKE-SHA1-STATE (REGS AMOUNT BLOCK BUFFER BUFFER-INDEX)

%MAKE-SHA224-DIGEST (&AUX (REGS (INITIAL-SHA224-REGS)))

%MAKE-SHA256-DIGEST

%MAKE-SHA384-DIGEST (&AUX (REGS (INITIAL-SHA384-REGS)) (BUFFER (MAKE-ARRAY 128 ELEMENT-TYPE '(UNSIGNED-BYTE 8))))

%MAKE-SHA512-DIGEST (&AUX (BUFFER (MAKE-ARRAY 128 ELEMENT-TYPE '(UNSIGNED-BYTE 8))))

%MAKE-TIGER-DIGEST

%MAKE-TIGER-STATE (REGS AMOUNT BLOCK BUFFER BUFFER-INDEX)

%MAKE-TREE-HASH

%MAKE-TREE-HASH-DIGEST (&KEY (DIGEST TIGER) (BLOCK-LENGTH 1024))

%MAKE-TREE-HASH-STATE (BLOCK-LENGTH STATE BLOCK-INDEX BRANCH)

%MAKE-WHIRLPOOL-DIGEST

%MAKE-WHIRLPOOL-STATE (REGS AMOUNT BLOCK BUFFER BUFFER-INDEX)

%SUBTRACT-WITH-BORROW (X Y BORROW)

3DES-DECRYPT-BLOCK

3DES-ENCRYPT-BLOCK

3DES-MUNGE-BLOCK (INPUT INPUT-START OUTPUT OUTPUT-START K1 K2 K3)

ACCEPTABLE-KEY-LENGTHS (KEY-LENGTH-SPEC)

ACCEPTABLE-KEY-LENGTHS* (KEY-LENGTH-SPEC)

ADLER32-P (OBJECT)

SETFADLER32-S1 (NEW-VALUE INSTANCE)

SETFADLER32-S2 (NEW-VALUE INSTANCE)

AES-DECRYPT-BLOCK

AES-ENCRYPT-BLOCK

ALLOCATE-ROUND-KEYS (KEY)

ARCFOUR-CRYPT

ARCFOUR-KEYIFY (CONTEXT KEY)

BLOCK-MIX (B XY XY-START R)

BLOWFISH-DECRYPT-BLOCK

BLOWFISH-DECRYPT-BLOCK* (P-ARRAY S-BOXES CIPHERTEXT CIPHERTEXT-START PLAINTEXT PLAINTEXT-START)

BLOWFISH-ENCRYPT-BLOCK

BLOWFISH-ENCRYPT-BLOCK* (P-ARRAY S-BOXES PLAINTEXT PLAINTEXT-START CIPHERTEXT CIPHERTEXT-START)

BLOWFISH-F (BLOCK S-BOXES)

BURN-BABY-BURN

CAST5-DECRYPT-BLOCK

CAST5-ENCRYPT-BLOCK

CAST5-F1 (INPUT MASK ROTATE)

CAST5-F2 (INPUT MASK ROTATE)

CAST5-F3 (INPUT MASK ROTATE)

CIRCULAR-LIST-SUBSEQ (LIST START END)

COMBINE-HASH-TREE-DIGESTS (DIGEST HASH1 HASH2)

COMPUTE-DES-ENCRYPTION-KEYS (KEY)

COMPUTE-ROUND-KEYS-FOR-DES-KEY (KEY)

SETFCRC24-CRC (NEW-VALUE INSTANCE)

CRC24-P (OBJECT)

SETFCRC32-CRC (NEW-VALUE INSTANCE)

CRC32-P (OBJECT)

CRYPTING-STREAM-READ-BYTE (STREAM CRYPTFUN)

CRYPTING-STREAM-WRITE-BYTE (STREAM BYTE CRYPTFUN)

DES-COOK-KEY-SCHEDULE (DOUGH)

DES-DECRYPT-BLOCK

DES-ENCRYPT-BLOCK

DES-MUNGE-BLOCK (INPUT INPUT-START OUTPUT OUTPUT-START KEYS)

DIGESTP (SYM)

EIGHTH-BYTE (UB)

EXTRACT-BYTE (K ROW COLUMN)

FI (FI-IN FI-KEY)

FIFTH-BYTE (UB)

FIND-CIPHER-OR-LOSE (NAME)

FIRST-BYTE (UB)

FL (D0 D1 KEYS ROUND)

FL-INV (D0 D1 KEYS ROUND)

FO (T0 T1 KEYS ROUND)

FOURTH-BYTE (UB)

GENERATE-128-BIT-ROUND-KEYS

GENERATE-192-BIT-ROUND-KEYS

GENERATE-256-BIT-ROUND-KEYS

GENERATE-BLOCK-CIPHER-FORMS (NAME KEY-LENGTH-SPEC ENCRYPT-FUNCTION DECRYPT-FUNCTION)

GENERATE-CAST5-KEY-SCHEDULE (KEY)

GENERATE-COMMON-CIPHER-METHODS (NAME BLOCK-LENGTH KEY-LENGTH-SPEC)

GENERATE-KEY-VERIFIER-METHODS (NAME KEY-LENGTH-SPEC)

GENERATE-ROUND-KEYS (KEY N-ROUNDS ENCRYPT-ROUNDKEYS DECRYPT-ROUNDKEYS)

GENERATE-ROUND-KEYS-FOR-DECRYPTION (ROUND-KEYS N-ROUNDS)

GENERATE-ROUND-KEYS-FOR-ENCRYPTION (KEY ROUND-KEYS)

GENERATE-STREAM-CIPHER-FORMS (NAME KEY-LENGTH-SPEC CRYPT-FUNCTION)

GENERATE-UNROLLED-RC6-DECRYPTION (N-ROUNDS)

GENERATE-UNROLLED-RC6-ENCRYPTION (N-ROUNDS)

GENERATE-XOR (TERMS)

HOLD-ME-BACK

IDEA-DECRYPT-BLOCK

IDEA-ENCRYPT-BLOCK

IDEA-INVERT-KEY (ENCRYPTION-KEYS DECRYPTION-KEYS)

IDEA-KEY-SCHEDULE (KEY)

IDEA-MUL (A B)

IDEA-MUL-INV (X)

IDEA-MUNGE-BLOCK (INPUT INPUT-START OUTPUT OUTPUT-START KEYS)

INCREMENT-COUNTER-BLOCK (BLOCK)

INITIAL-MD4-REGS

INITIAL-MD5-REGS

INITIAL-RIPEMD-128-REGS

INITIAL-RIPEMD-160-REGS

INITIAL-SHA1-REGS

INITIAL-SHA224-REGS

INITIAL-SHA256-REGS

INITIAL-SHA384-REGS

INITIAL-SHA512-REGS

INITIAL-TIGER-REGS

INITIAL-WHIRLPOOL-REGS

INITIALIZE-BLOWFISH-VECTORS (KEY P-ARRAY S-BOXES)

MAKE-CIRCULAR-LIST (&REST ELEMENTS)

MAKE-DECRYPTING-STREAM (STREAM CIPHER MODE KEY &KEY INITIALIZATION-VECTOR (PADDING NONE) (DIRECTION INPUT))

MAKE-ENCRYPTING-STREAM (STREAM CIPHER MODE KEY &KEY INITIALIZATION-VECTOR (DIRECTION OUTPUT) (PADDING NONE))

MAKE-FORTUNA (CIPHER)

MAKE-MODE-FOR-CIPHER (CIPHER MODE &OPTIONAL INITIALIZATION-VECTOR)

MAKE-TIGER-SBOX (ELEMENTS)

MAKE-TREE-HASH-LEAF-DIGEST (DIGEST-SPEC)

MASSAGE-SYMBOL (SYMBOL)

MAYBE-EXPAND-ONE-SHOT-CALL (FORM FUNNAME NAME 2ND-ARG KEYS)

MAYBE-INTEGERIZE (THING)

SETFMD2-AMOUNT (NEW-VALUE INSTANCE)

SETFMD2-BUFFER-INDEX (NEW-VALUE INSTANCE)

MD2-P (OBJECT)

MD2REGS-DIGEST

SETFMD4-AMOUNT (NEW-VALUE INSTANCE)

SETFMD4-BUFFER-INDEX (NEW-VALUE INSTANCE)

MD4-P (OBJECT)

MD4-REGS-A (STRUCTURE)

SETFMD4-REGS-A (NEW-VALUE STRUCTURE)

MD4-REGS-B (STRUCTURE)

SETFMD4-REGS-B (NEW-VALUE STRUCTURE)

MD4-REGS-C (STRUCTURE)

SETFMD4-REGS-C (NEW-VALUE STRUCTURE)

MD4-REGS-D (STRUCTURE)

SETFMD4-REGS-D (NEW-VALUE STRUCTURE)

MD4REGS-DIGEST

SETFMD5-AMOUNT (NEW-VALUE INSTANCE)

SETFMD5-BUFFER-INDEX (NEW-VALUE INSTANCE)

MD5-P (OBJECT)

MD5-REGS-A (STRUCTURE)

SETFMD5-REGS-A (NEW-VALUE STRUCTURE)

MD5-REGS-B (STRUCTURE)

SETFMD5-REGS-B (NEW-VALUE STRUCTURE)

MD5-REGS-C (STRUCTURE)

SETFMD5-REGS-C (NEW-VALUE STRUCTURE)

MD5-REGS-D (STRUCTURE)

SETFMD5-REGS-D (NEW-VALUE STRUCTURE)

MD5REGS-DIGEST

SETFMDX-AMOUNT (NEW-VALUE INSTANCE)

SETFMDX-BUFFER-INDEX (NEW-VALUE INSTANCE)

MDX-P (OBJECT)

MDX-UPDATER (STATE COMPRESSOR SEQ START END)

MERGE-TREE-HASH-BRANCH (DIGEST BRANCH HASH)

MISTY1-DECRYPT-BLOCK

MISTY1-ENCRYPT-BLOCK

MISTY1-EXPAND-KEY (KEY)

MIX-P-ARRAY (KEY P-ARRAY)

MOD32* (A B)

MOD32+ (A B)

MOD32- (A B)

MOD32ASH (NUM COUNT)

MOD32LOGNOT (NUM)

MOD64* (A B)

MOD64+ (A B)

MOD64- (A B)

MOD64ASH (NUM COUNT)

MOD64LOGNOT (NUM)

MUL8 (A B)

NULL-CRYPT-BLOCK (CONTEXT IN IN-START OUT OUT-START)

NULL-DECRYPT-BLOCK

NULL-ENCRYPT-BLOCK

ONE-SLICE (TO FROM I)

OPTIMIZED-MAKER-NAME (NAME)

OS-RANDOM-SEED (SOURCE NUM-BYTES)

PBKDF2-DERIVE-KEY (DIGEST PASSPHRASE SALT ITERATION-COUNT KEY-LENGTH)

PSEUDO-RANDOM-DATA (GENERATOR NUM-BYTES)

QUOTATIONP (THING)

RC2-DECRYPT-BLOCK

RC2-ENCRYPT-BLOCK

RC2-SCHEDULE-KEY (KEY EFFECTIVE-KEY-LENGTH)

RC5-DECRYPT-BLOCK

RC5-ENCRYPT-BLOCK

RC5-EXPAND-KEY (KEY N-ROUNDS)

RC6-DECRYPT-BLOCK

RC6-ENCRYPT-BLOCK

RC6-EXPAND-KEY (KEY N-ROUNDS)

REED-SOLOMON-MULTIPLY (BOX BOX-OFFSET KEY RS0 RS1 RS2 RS3)

RESEED (GENERATOR SEED)

SETFRIPEMD-128-AMOUNT (NEW-VALUE INSTANCE)

SETFRIPEMD-128-BUFFER-INDEX (NEW-VALUE INSTANCE)

RIPEMD-128-P (OBJECT)

RIPEMD-128-REGS-A (STRUCTURE)

SETFRIPEMD-128-REGS-A (NEW-VALUE STRUCTURE)

RIPEMD-128-REGS-B (STRUCTURE)

SETFRIPEMD-128-REGS-B (NEW-VALUE STRUCTURE)

RIPEMD-128-REGS-C (STRUCTURE)

SETFRIPEMD-128-REGS-C (NEW-VALUE STRUCTURE)

RIPEMD-128-REGS-D (STRUCTURE)

SETFRIPEMD-128-REGS-D (NEW-VALUE STRUCTURE)

RIPEMD-128REGS-DIGEST

SETFRIPEMD-160-AMOUNT (NEW-VALUE INSTANCE)

SETFRIPEMD-160-BUFFER-INDEX (NEW-VALUE INSTANCE)

RIPEMD-160-P (OBJECT)

RIPEMD-160-REGS-A (STRUCTURE)

SETFRIPEMD-160-REGS-A (NEW-VALUE STRUCTURE)

RIPEMD-160-REGS-B (STRUCTURE)

SETFRIPEMD-160-REGS-B (NEW-VALUE STRUCTURE)

RIPEMD-160-REGS-C (STRUCTURE)

SETFRIPEMD-160-REGS-C (NEW-VALUE STRUCTURE)

RIPEMD-160-REGS-D (STRUCTURE)

SETFRIPEMD-160-REGS-D (NEW-VALUE STRUCTURE)

RIPEMD-160-REGS-E (STRUCTURE)

SETFRIPEMD-160-REGS-E (NEW-VALUE STRUCTURE)

RIPEMD-160REGS-DIGEST

ROL16 (X SHIFT)

ROL32 (A S)

ROL64 (A S)

ROR32 (A S)

ROR64 (A S)

RSA-CORE (MSG EXPONENT MODULUS)

SCRYPT-VECTOR-SALSA (B)

SECOND-BYTE (UB)

SEVENTH-BYTE (UB)

SETFSHA1-AMOUNT (NEW-VALUE INSTANCE)

SETFSHA1-BUFFER-INDEX (NEW-VALUE INSTANCE)

SHA1-P (OBJECT)

SHA1-REGS-A (STRUCTURE)

SETFSHA1-REGS-A (NEW-VALUE STRUCTURE)

SHA1-REGS-B (STRUCTURE)

SETFSHA1-REGS-B (NEW-VALUE STRUCTURE)

SHA1-REGS-C (STRUCTURE)

SETFSHA1-REGS-C (NEW-VALUE STRUCTURE)

SHA1-REGS-D (STRUCTURE)

SETFSHA1-REGS-D (NEW-VALUE STRUCTURE)

SHA1-REGS-E (STRUCTURE)

SETFSHA1-REGS-E (NEW-VALUE STRUCTURE)

SHA1REGS-DIGEST

SETFSHA224-AMOUNT (NEW-VALUE INSTANCE)

SETFSHA224-BUFFER-INDEX (NEW-VALUE INSTANCE)

SHA224-P (OBJECT)

SHA224-REGS-A (STRUCTURE)

SETFSHA224-REGS-A (NEW-VALUE STRUCTURE)

SHA224-REGS-B (STRUCTURE)

SETFSHA224-REGS-B (NEW-VALUE STRUCTURE)

SHA224-REGS-C (STRUCTURE)

SETFSHA224-REGS-C (NEW-VALUE STRUCTURE)

SHA224-REGS-D (STRUCTURE)

SETFSHA224-REGS-D (NEW-VALUE STRUCTURE)

SHA224-REGS-E (STRUCTURE)

SETFSHA224-REGS-E (NEW-VALUE STRUCTURE)

SHA224-REGS-F (STRUCTURE)

SETFSHA224-REGS-F (NEW-VALUE STRUCTURE)

SHA224-REGS-G (STRUCTURE)

SETFSHA224-REGS-G (NEW-VALUE STRUCTURE)

SHA224-REGS-H (STRUCTURE)

SETFSHA224-REGS-H (NEW-VALUE STRUCTURE)

SHA224REGS-DIGEST

SETFSHA256-AMOUNT (NEW-VALUE INSTANCE)

SETFSHA256-BUFFER-INDEX (NEW-VALUE INSTANCE)

SHA256-EXPAND-BLOCK

SHA256-P (OBJECT)

SHA256-REGS-A (STRUCTURE)

SETFSHA256-REGS-A (NEW-VALUE STRUCTURE)

SHA256-REGS-B (STRUCTURE)

SETFSHA256-REGS-B (NEW-VALUE STRUCTURE)

SHA256-REGS-C (STRUCTURE)

SETFSHA256-REGS-C (NEW-VALUE STRUCTURE)

SHA256-REGS-D (STRUCTURE)

SETFSHA256-REGS-D (NEW-VALUE STRUCTURE)

SHA256-REGS-E (STRUCTURE)

SETFSHA256-REGS-E (NEW-VALUE STRUCTURE)

SHA256-REGS-F (STRUCTURE)

SETFSHA256-REGS-F (NEW-VALUE STRUCTURE)

SHA256-REGS-G (STRUCTURE)

SETFSHA256-REGS-G (NEW-VALUE STRUCTURE)

SHA256-REGS-H (STRUCTURE)

SETFSHA256-REGS-H (NEW-VALUE STRUCTURE)

SHA256REGS-DIGEST

SETFSHA384-AMOUNT (NEW-VALUE INSTANCE)

SETFSHA384-BUFFER-INDEX (NEW-VALUE INSTANCE)

SHA384-P (OBJECT)

SHA384-REGS-A (STRUCTURE)

SETFSHA384-REGS-A (NEW-VALUE STRUCTURE)

SHA384-REGS-B (STRUCTURE)

SETFSHA384-REGS-B (NEW-VALUE STRUCTURE)

SHA384-REGS-C (STRUCTURE)

SETFSHA384-REGS-C (NEW-VALUE STRUCTURE)

SHA384-REGS-D (STRUCTURE)

SETFSHA384-REGS-D (NEW-VALUE STRUCTURE)

SHA384-REGS-E (STRUCTURE)

SETFSHA384-REGS-E (NEW-VALUE STRUCTURE)

SHA384-REGS-F (STRUCTURE)

SETFSHA384-REGS-F (NEW-VALUE STRUCTURE)

SHA384-REGS-G (STRUCTURE)

SETFSHA384-REGS-G (NEW-VALUE STRUCTURE)

SHA384-REGS-H (STRUCTURE)

SETFSHA384-REGS-H (NEW-VALUE STRUCTURE)

SHA384REGS-DIGEST

SETFSHA512-AMOUNT (NEW-VALUE INSTANCE)

SETFSHA512-BUFFER-INDEX (NEW-VALUE INSTANCE)

SHA512-EXPAND-BLOCK

SHA512-P (OBJECT)

SHA512-REGS-A (STRUCTURE)

SETFSHA512-REGS-A (NEW-VALUE STRUCTURE)

SHA512-REGS-B (STRUCTURE)

SETFSHA512-REGS-B (NEW-VALUE STRUCTURE)

SHA512-REGS-C (STRUCTURE)

SETFSHA512-REGS-C (NEW-VALUE STRUCTURE)

SHA512-REGS-D (STRUCTURE)

SETFSHA512-REGS-D (NEW-VALUE STRUCTURE)

SHA512-REGS-E (STRUCTURE)

SETFSHA512-REGS-E (NEW-VALUE STRUCTURE)

SHA512-REGS-F (STRUCTURE)

SETFSHA512-REGS-F (NEW-VALUE STRUCTURE)

SHA512-REGS-G (STRUCTURE)

SETFSHA512-REGS-G (NEW-VALUE STRUCTURE)

SHA512-REGS-H (STRUCTURE)

SETFSHA512-REGS-H (NEW-VALUE STRUCTURE)

SHA512REGS-DIGEST

SIXTH-BYTE (UB)

SMIX (B B-START R N V XY)

SPLIT (LST)

SQUARE-DECRYPT-BLOCK

SQUARE-ENCRYPT-BLOCK

SQUARE-MUNGE-BLOCK (ROUND-KEYS N-ROUNDS T-ARRAY S-ARRAY PLAINTEXT PLAINTEXT-START CIPHERTEXT CIPHERTEXT-START)

STORE-DATA-LENGTH (BLOCK LENGTH OFFSET &OPTIONAL BIG-ENDIAN-P)

TEA-DECRYPT-BLOCK

TEA-ENCRYPT-BLOCK

THIRD-BYTE (UB)

SETFTIGER-AMOUNT (NEW-VALUE INSTANCE)

SETFTIGER-BUFFER-INDEX (NEW-VALUE INSTANCE)

TIGER-P (OBJECT)

TIGER-REGS-A (STRUCTURE)

SETFTIGER-REGS-A (NEW-VALUE STRUCTURE)

TIGER-REGS-B (STRUCTURE)

SETFTIGER-REGS-B (NEW-VALUE STRUCTURE)

TIGER-REGS-C (STRUCTURE)

SETFTIGER-REGS-C (NEW-VALUE STRUCTURE)

TIGERREGS-DIGEST

TRANSFORM (IN IN-OFFSET OUT OUT-OFFSET)

SETFTREE-HASH-BLOCK-INDEX (NEW-VALUE INSTANCE)

SETFTREE-HASH-BLOCK-LENGTH (NEW-VALUE INSTANCE)

SETFTREE-HASH-BRANCH (NEW-VALUE INSTANCE)

TREE-HASH-P (OBJECT)

SETFTREE-HASH-STATE (NEW-VALUE INSTANCE)

TWOFISH-DECRYPT-BLOCK

TWOFISH-ENCRYPT-BLOCK

TWOFISH-KEY-SCHEDULE (KEY)

TWOFISH-SCHEDULE-16-BYTE-KEY (ROUND-KEYS S-BOXES KEY BOX)

TWOFISH-SCHEDULE-24-BYTE-KEY (ROUND-KEYS S-BOXES KEY BOX)

TWOFISH-SCHEDULE-32-BYTE-KEY (ROUND-KEYS S-BOXES KEY BOX)

UBREF-FUN-NAME (BITSIZE BIG-ENDIAN-P)

UNQUOTE (THING)

UPDATE-DIGEST-FROM-STREAM (DIGEST STREAM &KEY BUFFER (START 0) END)

UPDATE-MD2-REGS

UPDATE-MD4-BLOCK

UPDATE-RIPEMD-128-BLOCK

UPDATE-RIPEMD-160-BLOCK

UPDATE-SHA1-BLOCK

UPDATE-SHA256-BLOCK

UPDATE-SHA512-BLOCK

UPDATE-TIGER-BLOCK

UPDATE-TREE-HASH-BRANCH (STATE)

VALID-MODE-FOR-BLOCK-CIPHER-P (MODE)

VALIDATE-PARAMETERS-FOR-CIPHER-INFO (CIPHER-INFO MODE PADDING)

SETFWHIRLPOOL-AMOUNT (NEW-VALUE INSTANCE)

SETFWHIRLPOOL-BUFFER-INDEX (NEW-VALUE INSTANCE)

WHIRLPOOL-P (OBJECT)

WHIRLPOOLREGS-DIGEST (REGS BUFFER &OPTIONAL (START 0))

XOR-BLOCK (BLOCK-LENGTH INPUT-BLOCK1 INPUT-BLOCK2 INPUT-BLOCK2-START OUTPUT-BLOCK OUTPUT-BLOCK-START)

XTEA-DECRYPT-BLOCK

XTEA-ENCRYPT-BLOCK

MACRO

Private

Undocumented

DEFCIPHER (NAME &REST INITARGS)

DEFCONST (NAME VALUE)

DEFDIGEST (NAME &KEY DIGEST-LENGTH BLOCK-LENGTH)

DEFINE-BLOCK-DECRYPTOR (ALGORITHM BLOCKSIZE &BODY BODY)

DEFINE-BLOCK-ENCRYPTOR (ALGORITHM BLOCKSIZE &BODY BODY)

DEFINE-DIGEST-FINALIZER (SPECS &BODY BODY)

DEFINE-DIGEST-REGISTERS ((DIGEST-NAME &KEY (ENDIAN BIG) (SIZE 4) (DIGEST-REGISTERS NIL)) &REST REGISTERS)

DEFINE-DIGEST-UPDATER (DIGEST-NAME &BODY BODY)

DEFINE-STREAM-CRYPTOR (ALGORITHM &BODY BODY)

DEFINE-STREAM-READ-SEQUENCE (SPECIALIZER TYPE &BODY BODY)

DEFINE-STREAM-WRITE-SEQUENCE (SPECIALIZER TYPE &BODY BODY)

LOOKUP-IN-C (TO FROM)

SALSA-VECTOR-4MIX (X I4 I8 I12 I0)

WITH-WORDS (((&REST WORD-VARS) ARRAY INITIAL-OFFSET &KEY (SIZE 4) (BIG-ENDIAN T)) &BODY BODY)

GENERIC-FUNCTION

Public

BLOCK-LENGTH (CIPHER)

Return the number of bytes in an encryption or decryption block for CIPHER. CIPHER may either be a cipher name as accepted by MAKE-CIPHER or a cipher object as returned by MAKE-CIPHER. NIL is returned if CIPHER does not name a known cipher or is not a cipher object.

COPY-DIGEST (DIGESTER &OPTIONAL COPY)

Return a copy of DIGESTER. If COPY is not NIL, it should be of the same type as DIGESTER and will receive the copied data, rather than creating a new object. The copy is a deep copy, not a shallow copy as might be returned by COPY-STRUCTURE.

DECRYPT-MESSAGE (KEY MESSAGE &KEY START END (START 0))

Decrypt MESSAGE with KEY. START and END bound the extent of the message. Returns a fresh octet vector.

DIGEST-FILE (DIGEST-SPEC PATHNAME &REST ARGS &KEY BUFFER START END DIGEST DIGEST-START (START 0) (DIGEST-START 0))

Return the digest of the contents of the file named by PATHNAME using the algorithm DIGEST-NAME. If DIGEST is provided, the digest will be placed into DIGEST starting at DIGEST-START. DIGEST must be a (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (*)). An error will be signaled if there is insufficient room in DIGEST. If BUFFER is provided, the portion of BUFFER between START and END will be used to hold data read from the stream.

DIGEST-LENGTH (DIGEST)

Return the number of bytes in a digest generated by DIGEST.

DIGEST-SEQUENCE (DIGEST-SPEC SEQUENCE &REST ARGS &KEY START END DIGEST DIGEST-START (DIGEST-START 0) (START 0))

Return the digest of the subsequence of SEQUENCE specified by START and END using the algorithm DIGEST-NAME. For CMUCL and SBCL, SEQUENCE can be any vector with an element-type of (UNSIGNED-BYTE 8); for other implementations, SEQUENCE must be a (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (*)). If DIGEST is provided, the digest will be placed into DIGEST starting at DIGEST-START. DIGEST must be a (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (*)). An error will be signaled if there is insufficient room in DIGEST.

DIGEST-STREAM (DIGEST-SPEC STREAM &REST ARGS &KEY BUFFER START END DIGEST DIGEST-START (START 0) (DIGEST-START 0))

Return the digest of the contents of STREAM using the algorithm DIGEST-NAME. STREAM-ELEMENT-TYPE of STREAM should be (UNSIGNED-BYTE 8). If DIGEST is provided, the digest will be placed into DIGEST starting at DIGEST-START. DIGEST must be a (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (*)). An error will be signaled if there is insufficient room in DIGEST. If BUFFER is provided, the portion of BUFFER between START and END will be used to hold data read from the stream.

ENCRYPT-MESSAGE (KEY MESSAGE &KEY START END (START 0))

Encrypt MESSAGE with KEY. START and END bound the extent of the message. Returns a fresh octet vector.

KEY-LENGTHS (CIPHER)

Return a list of possible lengths of a key for CIPHER. CIPHER may either be a cipher name as accepted by MAKE-CIPHER or a cipher object as returned by MAKE-CIPHER. NIL is returned if CIPHER does not name a known cipher or is not a cipher object.

MAKE-PRIVATE-KEY (KIND &KEY D N P Q G Y X &ALLOW-OTHER-KEYS)

Return a private key of KIND, initialized according to the specified keyword arguments.

MAKE-PRNG (NAME &KEY SEED (SEED RANDOM) (CIPHER AES))

Create a new NAME-type random number generator, seeding it from SEED. If SEED is a pathname or namestring, read data from the indicated file; if it is sequence of bytes, use those bytes directly; if it is :RANDOM then read from /dev/random; if it is :URANDOM then read from /dev/urandom; if it is NIL then the generator is not seeded.

MAKE-PUBLIC-KEY (KIND &KEY E N P Q G Y &ALLOW-OTHER-KEYS)

Return a public key of KIND, initialized according to the specified keyword arguments.

PRODUCE-DIGEST (DIGESTER &KEY DIGEST DIGEST-START (DIGEST-START 0))

Return the hash of the data processed by DIGESTER so far. This function modifies the internal state of DIGESTER. If DIGEST is provided, the hash will be placed into DIGEST starting at DIGEST-START. DIGEST must be a (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (*)). An error will be signaled if there is insufficient room in DIGEST.

SIGN-MESSAGE (KEY MESSAGE &KEY START END (START 0))

Produce a key-specific signature of MESSAGE; MESSAGE is a (VECTOR (UNSIGNED-BYTE 8)). START and END bound the extent of the message.

UPDATE-DIGEST (DIGESTER THING &KEY (END (LENGTH SEQUENCE)) (START 0) BUFFER &ALLOW-OTHER-KEYS)

Update the internal state of DIGESTER with THING. The exact method is determined by the type of THING.

VERIFY-SIGNATURE (KEY MESSAGE SIGNATURE &KEY START END (START 0))

Verify that SIGNATURE is the signature of MESSAGE using KEY. START and END bound the extent of the message.

Undocumented

DERIVE-KEY (KDF PASSPHRASE SALT ITERATION-COUNT KEY-LENGTH)

Private

ADD-PADDING-BYTES (PADDING TEXT START BLOCK-OFFSET BLOCK-SIZE)

Add padding to the block in TEXT beginning at position START. Padding is done according to PADDING and assumes that text prior to BLOCK-OFFSET is user-supplied. This function assumes that the portion of TEXT from START to (+ START BLOCK-SIZE) is writable.

COUNT-PADDING-BYTES (PADDING TEXT START BLOCK-SIZE)

Return the number of bytes of padding in the block in TEXT beginning at START. The padding algorithm used for the block is PADDING.

ENCRYPTED-MESSAGE-LENGTH (CIPHER MODE LENGTH &OPTIONAL HANDLE-FINAL-BLOCK)

Return the length a message of LENGTH would be if it were to be encrypted (decrypted) with CIPHER in MODE. HANDLE-FINAL-BLOCK indicates whether we are encrypting up to and including the final block (so that short blocks may be taken into account, if applicable). Note that this computation may involve MODE's state.

INTERNAL-RANDOM-DATA (NUM-BYTES PSEUDO-RANDOM-NUMBER-GENERATOR)

Generate NUM-BYTES bytes using PSEUDO-RANDOM-NUMBER-GENERATOR

INTERNAL-READ-OS-RANDOM-SEED (SOURCE PRNG)

(Re)seed PRNG from SOURCE. SOURCE may be :random or :urandom

INTERNAL-READ-SEED (PATH PRNG)

Reseed PRNG from PATH.

INTERNAL-WRITE-SEED (PATH PRNG)

Write enough random data from PRNG to PATH to properly reseed it.

MODE-CRYPT-FUNCTIONS (CIPHER MODE)

Returns two functions that perform encryption and decryption, respectively, with CIPHER in MODE. The lambda list of each function is (IN OUT IN-START IN-END OUT-START HANDLE-FINAL-BLOCK). HANDLE-FINAL-BLOCK is as in ENCRYPT and DECRYPT; the remaining parameters should be self-explanatory. Each function, when called, returns two values: the number of octets processed from IN and the number of octets processed from OUT. Note that for some cipher modes, IN and OUT may be different.

SCHEDULE-KEY (CIPHER KEY)

Schedule KEY for CIPHER, filling CIPHER with any round keys, etc. needed for encryption and decryption.

VERIFY-KEY (CIPHER KEY)

Return T if KEY is a valid encryption key for CIPHER.

Undocumented

ACCEPTED-LENGTHS (CONDITION)

COST-N (CONDITION)

COST-P (CONDITION)

COST-R (CONDITION)

DECRYPT-WITH-MODE (CIPHER MODE CIPHERTEXT PLAINTEXT CIPHERTEXT-START CIPHERTEXT-END PLAINTEXT-START HANDLE-FINAL-BLOCK)

DIGEST (CONDITION)

ENCRYPT-WITH-MODE (CIPHER MODE PLAINTEXT CIPHERTEXT PLAINTEXT-START PLAINTEXT-END CIPHERTEXT-START HANDLE-FINAL-BLOCK)

INSUFFICIENT-BUFFER-SPACE-BUFFER (CONDITION)

INSUFFICIENT-BUFFER-SPACE-LENGTH (CONDITION)

INSUFFICIENT-BUFFER-SPACE-START (CONDITION)

INVALID-PADDING-BLOCK (CONDITION)

INVALID-PADDING-PADDING-NAME (CONDITION)

VALID-MODE-FOR-CIPHER-P (CIPHER MODE)

SLOT-ACCESSOR

Public

Undocumented

DSA-KEY-X (OBJECT)

DSA-KEY-Y (OBJECT)

DSA-SIGNATURE-R (OBJECT)

DSA-SIGNATURE-S (OBJECT)

Private

Undocumented

%BLOCK-LENGTH (OBJECT)

%CLASS-NAME (OBJECT)

%KEY-LENGTHS (OBJECT)

ARCFOUR-SBOX (OBJECT)

SETFARCFOUR-SBOX (NEW-VALUE OBJECT)

ARCFOUR-X (OBJECT)

SETFARCFOUR-X (NEW-VALUE OBJECT)

ARCFOUR-Y (OBJECT)

SETFARCFOUR-Y (NEW-VALUE OBJECT)

BUFFER (OBJECT)

SETFBUFFER (NEW-VALUE OBJECT)

BUFFER-INDEX (OBJECT)

SETFBUFFER-INDEX (NEW-VALUE OBJECT)

CIPHER (CONDITION)

CMAC-BUFFER (OBJECT)

CMAC-BUFFER-INDEX (OBJECT)

SETFCMAC-BUFFER-INDEX (NEW-VALUE OBJECT)

CMAC-CIPHER (OBJECT)

CMAC-SUBKEY1 (OBJECT)

CMAC-SUBKEY2 (OBJECT)

DECRYPT-FUNCTION (OBJECT)

DECRYPTION-KEYS (OBJECT)

SETFDECRYPTION-KEYS (NEW-VALUE OBJECT)

DECRYPTION-KEYS-1 (OBJECT)

SETFDECRYPTION-KEYS-1 (NEW-VALUE OBJECT)

DECRYPTION-KEYS-2 (OBJECT)

SETFDECRYPTION-KEYS-2 (NEW-VALUE OBJECT)

DECRYPTION-KEYS-3 (OBJECT)

SETFDECRYPTION-KEYS-3 (NEW-VALUE OBJECT)

DECRYPTION-ROUND-KEYS (OBJECT)

SETFDECRYPTION-ROUND-KEYS (NEW-VALUE OBJECT)

ENCRYPT-FUNCTION (OBJECT)

ENCRYPTION-KEYS (OBJECT)

SETFENCRYPTION-KEYS (NEW-VALUE OBJECT)

ENCRYPTION-KEYS-1 (OBJECT)

SETFENCRYPTION-KEYS-1 (NEW-VALUE OBJECT)

ENCRYPTION-KEYS-2 (OBJECT)

SETFENCRYPTION-KEYS-2 (NEW-VALUE OBJECT)

ENCRYPTION-KEYS-3 (OBJECT)

SETFENCRYPTION-KEYS-3 (NEW-VALUE OBJECT)

ENCRYPTION-ROUND-KEYS (OBJECT)

SETFENCRYPTION-ROUND-KEYS (NEW-VALUE OBJECT)

END (OBJECT)

SETFEND (NEW-VALUE OBJECT)

GROUP (OBJECT)

GROUP-GVAL (OBJECT)

GROUP-PVAL (OBJECT)

GROUP-QVAL (OBJECT)

INDEX (OBJECT)

SETFINDEX (NEW-VALUE OBJECT)

INITIALIZED-P (OBJECT)

SETFINITIALIZED-P (NEW-VALUE OBJECT)

INNER-DIGEST (OBJECT)

IV (OBJECT)

IV-POSITION (OBJECT)

SETFIV-POSITION (NEW-VALUE OBJECT)

KDF-DIGEST (OBJECT)

KEY (OBJECT)

SETFKEY (NEW-VALUE OBJECT)

MASK-VECTOR (OBJECT)

SETFMASK-VECTOR (NEW-VALUE OBJECT)

MODE (CONDITION)

SETFMODE (NEW-VALUE OBJECT)

N-ROUNDS (OBJECT)

SETFN-ROUNDS (NEW-VALUE OBJECT)

NULL-KEY (OBJECT)

SETFNULL-KEY (NEW-VALUE OBJECT)

NULL-KEY-INDEX (OBJECT)

SETFNULL-KEY-INDEX (NEW-VALUE OBJECT)

OUTER-DIGEST (OBJECT)

P-ARRAY (OBJECT)

SETFP-ARRAY (NEW-VALUE OBJECT)

ROTATE-VECTOR (OBJECT)

SETFROTATE-VECTOR (NEW-VALUE OBJECT)

ROUND-KEYS (OBJECT)

SETFROUND-KEYS (NEW-VALUE OBJECT)

RSA-KEY-EXPONENT (OBJECT)

RSA-KEY-MODULUS (OBJECT)

S-BOXES (OBJECT)

SETFS-BOXES (NEW-VALUE OBJECT)

SCRYPT-KDF-N (OBJECT)

SCRYPT-KDF-P (OBJECT)

SCRYPT-KDF-R (OBJECT)

STREAM-BUFFER (OBJECT)

STREAM-BUFFER-POSITION (OBJECT)

STREAM-CIPHER (OBJECT)

STREAM-DIGEST (OBJECT)

STREAM-N-BYTES-VALID (OBJECT)

STREAM-PADDING (OBJECT)

STREAM-WRAPPED-STREAM (OBJECT)

SUB-MODE (OBJECT)

VARIABLE

Public

*PRNG*

Default pseudo-random-number generator for use by all crypto functions; the user must initialize it, e.g. with (setf crypto:*prng* (crypto:make-prng :fortuna)).

Undocumented

FORTUNA

Private

+FORTUNA-CIPHER-BLOCK-SIZE+

Fortuna is only defined for 128-bit (16-byte) cyphers

+MIN-POOL-SIZE+

Minimum pool size before a reseed is allowed. This should be the number of bytes of pool data that are likely to contain 128 bits of entropy. Defaults to a pessimistic estimate of 1 bit of entropy per byte.

Undocumented

*BINARY-INPUT-STREAM-CLASS*

*BINARY-OUTPUT-STREAM-CLASS*

*INTERNAL-BYTE*

*LEAF-BYTE*

*STREAM-CLEAR-OUTPUT-FUNCTION*

*STREAM-ELEMENT-TYPE-FUNCTION*

*STREAM-FINISH-OUTPUT-FUNCTION*

*STREAM-FORCE-OUTPUT-FUNCTION*

*STREAM-READ-BYTE-FUNCTION*

*STREAM-READ-SEQUENCE-FUNCTION*

*STREAM-WRITE-BYTE-FUNCTION*

*STREAM-WRITE-SEQUENCE-FUNCTION*

*SUPPORTED-MODES*

*T*

CLASS

Public

FORTUNA-PRNG

A Fortuna random number generator. Contains 32 entropy pools which are used to reseed GENERATOR.

PSEUDO-RANDOM-NUMBER-GENERATOR

A pseudo random number generator. Base class for other PRNGs; not intended to be instantiated.

Undocumented

3DES

ADLER32

AES

ARCFOUR

BLOWFISH

CAST5

CRC24

CRC32

DES

IDEA

MD2

MD4

MD5

MISTY1

NULL

PBKDF1

PBKDF2

RC2

RC5

RC6

RIPEMD-128

RIPEMD-160

SCRYPT-KDF

SHA1

SHA224

SHA256

SHA384

SHA512

SQUARE

STREAM

TEA

TIGER

TREE-HASH

TWOFISH

WHIRLPOOL

XTEA

Private

GENERATOR

Fortuna generator. KEY is the key used to initialise CIPHER as an instance of CIPHER-NAME (which must be a valid NAME recognised by MAKE-CIPHER).

POOL

A Fortuna entropy pool. DIGEST contains its current state; LENGTH the length in bytes of the entropy it contains.

Undocumented

16-BYTE-BLOCK-MIXIN

8-BYTE-BLOCK-MIXIN

CBC-MODE

CFB-MODE

CFB8-MODE

CIPHER (CONDITION)

CIPHER-INFO

CMAC

CRYPTING-STREAM

CTR-MODE

DECRYPTING-INPUT-STREAM

DECRYPTING-OUTPUT-STREAM

DIGESTING-STREAM

DISCRETE-LOGARITHM-GROUP

DSA-KEY

DSA-PRIVATE-KEY

DSA-PUBLIC-KEY

DSA-SIGNATURE

ECB-MODE

ENCRYPTING-INPUT-STREAM

ENCRYPTING-OUTPUT-STREAM

ENCRYPTION-MODE

HMAC

INITITIALIZATION-VECTOR-MIXIN

MDX

OCTET-INPUT-STREAM

OCTET-OUTPUT-STREAM

OCTET-STREAM

OFB-MODE

PADDED-CIPHER-MODE

PADDING

PKCS7-PADDING

RSA-KEY

RSA-PRIVATE-KEY

RSA-PUBLIC-KEY

STREAM-CIPHER (OBJECT)

STREAM-MODE

CONDITION

Public

INITIALIZATION-VECTOR-NOT-SUPPLIED

Signaled when an initialization vector is required for a particular mode of operation but not supplied.

INSUFFICIENT-BUFFER-SPACE

Signaled when insufficient buffer space exists for an operation.

INVALID-INITIALIZATION-VECTOR

Signaled when an invalid initialization vector is supplied to MAKE-CIPHER.

INVALID-KEY-LENGTH

Signaled when a key is not the proper length for a cipher.

INVALID-PADDING

Signaled when padding in a block is determined to be invalid.

KEY-NOT-SUPPLIED

Signaled when a key is not provided at the initialization of a cipher.

UNSUPPORTED-CIPHER

Signaled when an invalid cipher name is provided to MAKE-CIPHER.

UNSUPPORTED-DIGEST

Signaled when an invalid digest name is provided to MAKE-DIGEST.

UNSUPPORTED-MODE

Signaled when an invalid mode name is provided to MAKE-CIPHER.

UNSUPPORTED-SCRYPT-COST-FACTORS

Signaled when a invalid cost factors are provided to MAKE-SCRYPT-KDF.

Undocumented

IRONCLAD-ERROR

CONSTANT

Private

+WHIRLPOOL-ROUNDS+

The number of rounds. The default is 10.

Undocumented

+BLOWFISH-N-ROUNDS+

+BUFFER-SIZE+

+C-EVEN+

+C-ODD+

+CAST5-SBOX0+

+CAST5-SBOX1+

+CAST5-SBOX2+

+CAST5-SBOX3+

+CAST5-SBOX4+

+CAST5-SBOX5+

+CAST5-SBOX6+

+CAST5-SBOX7+

+CRC24-TABLE+

+CRC32-TABLE+

+DSA-MESSAGE-LENGTH+

+K1+

+K2+

+K3+

+K4+

+MD2-PERMUTATION+

+MISTY1-S7TABLE+

+MISTY1-S9TABLE+

+NULL-BLOCK-LENGTH+

+P-ARRAY+

+PRISTINE-MD4-REGISTERS+

+PRISTINE-MD5-REGISTERS+

+PRISTINE-RIPEMD-128-REGISTERS+

+PRISTINE-RIPEMD-160-REGISTERS+

+PRISTINE-SHA1-REGISTERS+

+PRISTINE-SHA224-REGISTERS+

+PRISTINE-SHA256-REGISTERS+

+PRISTINE-SHA384-REGISTERS+

+PRISTINE-SHA512-REGISTERS+

+PRISTINE-TIGER-REGISTERS+

+PRISTINE-WHIRLPOOL-REGISTERS+

+RC+

+RC2-PITABLE+

+RC5-B+

+RC5-BB+

+RC5-W+

+RC5-WW+

+RC5/32-P+

+RC5/32-Q+

+RC6/32-P+

+RC6/32-Q+

+S-BOX-0+

+S-BOX-1+

+S-BOX-2+

+S-BOX-3+

+SHA256-ROUND-CONSTANTS+

+SHA512-ROUND-CONSTANTS+

+SMALL-PRIMES+

+TEA-DELTA+

+TEA-N-ROUNDS+

+TIGER-BLOCK-COPY-FN+

+TIGER-BLOCK-N-WORDS+

+TIGER-WORDSIZE+

+TWOFISH-EXP-TO-POLY+

+TWOFISH-MDS0+

+TWOFISH-MDS1+

+TWOFISH-MDS2+

+TWOFISH-MDS3+

+TWOFISH-POLY-TO-EXP+

+TWOFISH-Q0+

+TWOFISH-Q1+

+TWOFISH-RS+

+WHIRLPOOL-REGS-HASH-OFFSET+

+WHIRLPOOL-REGS-K-OFFSET+

+WHIRLPOOL-REGS-L-OFFSET+

+WHIRLPOOL-REGS-STATE-OFFSET+

+XTEA-DELTA+

+XTEA-N-ROUNDS+

ADLER32-MODULO

ALOGTABLE

DES-SBOX0

DES-SBOX1

DES-SBOX2

DES-SBOX3

DES-SBOX4

DES-SBOX5

DES-SBOX6

DES-SBOX7

G-MATRIX

INVERSE-G-MATRIX

LOGTABLE

PERMUTATION1

PERMUTATION2

ROUND-CONSTANTS

S-DECRYPTION-TABLE

S-ENCRYPTION-TABLE

T-DECRYPTION-TABLE

T-ENCRYPTION-TABLE

TD0

TD1

TD2

TD3

TD4

TE0

TE1

TE2

TE3

TE4

TIGER-T1

TIGER-T2

TIGER-T3

TIGER-T4

TOTAL-ROTATIONS