Cryptology Programs

Disclaimer: I am interested in cryptology, but by no means an expert.

Source code

What's in the zip file?

Note: keygen.c is not portable - it requires console functions kbhit() and getch().

Monoalphabetic Substitution Cipher Cracking

msc1.c - MSC1 is a program for cracking a monoalphabetic substition cipher. Click here for a demonstration run.

CDX-2

The CDX-2 cryptographic algorithm works as follows:

sb.c contains the S-boxes for CDX-2.

sbgen.c will generate a set of random S-boxes (i.e. a new version of sb.c). Output is to stdout, so you'll need to redirect to a shiny new C file.

Key Generation

keygen.c generates a one-megabyte random(ish!) bitstream. It's not portable, I'm afraid. It was written for Borland C. The idea is to compile it, run it, and hit the keyboard like crazy. Just keep typing. Anything. Lots. Eventually, it'll come out the other end with this one meg file. Use whichever bits you like from that file. Don't feel you need to keep the rest of them, because you can generate a new file whenever you like.

If anyone feels like calculating the entropy involved, do feel free (and I'd be glad to hear from you).




A Simple Authentication Protocol

Authenticating yourself can be a real challenge. Here's one suggested solution (which has NOT been peer reviewed yet, as at 12 Jan 2001).





Cracking a substitution cipher - a case study

Cracking substitution ciphers like this one, however, is no challenge at all.





You are visitor number - call again soon!