» Example Code

Some of the smaller bits of code I've written for various purposes. Code from the larger projects I have worked on can be found here.

C

rs-auth.tgz
Implements limited-use authentication codes via Reed-Solomon error correcting codes.

bias.tgz
Calculates the bias of a matrix whose entries are in GF(4).

entropy.c
Calculates the Shannon, Renyi, and min entropy of bytes in a file.

dlp-crack.c
Breaks a discrete log problem via Pollard's rho algorithm.

ecc-crack.c
Breaks an elliptic curve discrete log problem via Pollard's rho algorithm.

C++

nisangen.cxx
Implementation of Noam Nisan's PRNG which fools all statistical tests in logspace.

Perl

subdsakey.pl
Subliminally leaks a DSA signing key through a digital signature after a patch to GnuPG (or another OpenPGP-compliant program). subdsakey.pl does the recovery, and the patch included in the documentation does the leaking.

vanitykey.pl
Generates an OpenPGP v4 DSA key pair with a vanity key ID. This is accomplished by brute force, randomly selecting key pairs and computing the fingerprint until a matching pair is found. The program can run in standalone mode or in a distributed client/server mode.

v60.pl
Backs up the phonebook on a Motorola v60 (or compatible) phone. Currently only pulls down the phonebook into a text file, but is being updated to have more functionality.

NVIDIA ASM

score.vp
This is a vertex shader program, written by hand when the Cg spec had just been released and the compiler didn't work properly. The purpose of this program is to do three-symbol pattern matching for amino acids using the BLOSUM62 matrix.

Cg

score.cg
This is the simple Cg program which should have done what the above program in NVIDIA ASM did.

Maple

indexcalc.mws
A Maple 8 program that performs the index calculus attack against a discrete log problem.

[ return to main page ]