You can download them and do as you please. Consider these released under GNU license. You can use and modify but you must release any modified source back to public under GNU license. My additional requirement is that you NOT use any code not publicly available, for any use other than personal testing. That includes any use for profit. But you would be stupid to use this for anything but testing anyway, so I'm not worried.

All of the C programs must be compiled. Read the source code before doing anything else. Each of the C programs has a special commented line that give the compile command. For any of the C programs,

     grep ^comp filename.c.
The grep command will print the gcc command to compile. They are mostly just
gcc -o filename -Wall -O3 filename.c
but ecbscryptogen.c has a warning suppression switch for gcc that you might want to use. clang can also be used to compile them.


1. testecbs64.c - This is the ecbs64 algorithm wrapped in a C program with CLI options to control behavior and seeding,

VIEW the source code testecbs64.c

Download the source code testecbs64.c


2. testecbs8.c - This is the same ecbs function as in testecbs64.c except scaled down to use only 8 bit unsigned chars instead of 64 bit ints. There are some 32 bit ints but those are used only for dump function or logging, not for the algorithm itself. The code is slightly different to work around the power number for the setsize function, since it should normally be set to 2^20 or higher and we can only store 255 in a byte, so we have to 8 extra bytes to store this number.

VIEW the source code testecbs8.c

Download the source code testecbs8.c


3. ecbscrypto.c - This is a 64bit block cipher using ecbs64 function with all requirements in a self contained C program. ecbs64crypto encrypts or decrypts as specified and reads from STDIN and writes to STDOUT, so typically its used with pipes and redirects.

VIEW the source code ecbscrypto.c

Download the source code ecbscrypto.c


4. ecbscryptogen.c - This is basicaly the same 64bit block cipher as ecbscrypto.c except ecbscryptogen creates a random version of ecbscrypto and then executes that program to do the encryption or decryption. The randomly generated crypto program is deleted after execution leaving no trace of the specific algorithm used.

VIEW the source code ecbscryptogen.c

Download the source code ecbscryptogen.c


5. awkm - This is a simplified non-programmable utility like awk only simple and easy to use, and with multiple field separator characters possible. This is a perl script, so it can be very slow. awkm can read from STDIN or from a file and writes to STDOUT.

VIEW the source code awkm

Download the source code awkm


6. snip - This is a small utility written in perl to search and delete or replace strings in a file. snip uses perl pattern matching. snip reads STDIN and writes to STDOUT.

VIEW the source code snip

Download the source code snip


7. dump.c - This is a C program to dump a binary file to STDOUT as decimal or hex values, byte, short, long and long long formats.

VIEW the source code dump.c

Download the source code dump.c


8. findrepeat8.c - A C program that reads binary input and searches for a repeating sequence of bytes. findrepeat8 stores the first 8 bytes it reads and then continues reading the input until either it finds the same sequence of bytes or hits a CLI option limit, or end of input. Since some PRNGs can output extremely large amounts of data before hitting a short cycle, this can simply spin its wheels forever unless the pre short cycle data is dumped before passing to findrepeat8. So you can specify any number of initial bytes to skip before searching.

VIEW the source code findrepeat8.c

Download the source code findrepeat8.c


9. findin.pl - This is a perl script to find and print all identical lines in two files. This is used to compare before and after changes in config files, or source code or logfiles. Note that findin.pl and findnotin.pl and findnotinb.pl all only find identical lines and report them, or find unique lines and report them. They do not care how many there are or where they are, just that are in or NOT IN one file or the other.

VIEW the source code findin.pl

Download the source code findin.pl


10. finbdnotin.pl - This is a perl script to find and print all lines that are NOT in the first file, but ARE IN the second file. This is for comparing different versions of the same file or files that should generally contain unique lines. But it can find differences you might need to know about, even in source code with lots of duplicate lines. Unlike diff, the positions of the lines do not matter.

VIEW the source code findnotin.pl

Download the source code findnotin.pl


11. findnotinb.pl - This is the same as findnotin.pl (without the b), except that it reverses the filenames and makes a second pass for the reverse output. This one is the most useful. It can be used to find out what you did in C source code just now, but thats iffy because if you delete a line that exists more than once, it won't find it. findnotinb.pl is meant for files that should always be unique, such as logfiles, or configuration files where each line is supposed to be unique. DNS zone files are a prime example. They should never contain the same record twice, but comments and blank lines are Ok. But we don't care about comments and blanks we care about duplicate CNAME records that cause an error. But even so, usually when you modifiy your code, you generate a new line that didn't exist in the old file. If nothing else you might locate the part of the file you were editing when it went south.

VIEW the source code findnotinb.pl

Download the source code findnotinb.pl


12. skel.pl - This reads STDIN and writes to STDOUT. It searches for perl conditional and flow control statements and prints them, skipping variable assignments so you can see the structure of the program. skel.pl also works with C programs, but can't display comments in C. I should add C support but I haven't yet.

VIEW the source code skel.pl

Download the source code skel.pl



This link is a plain text file of all the help output from all the progrmas on one page. It will tell you what they programs do. You will have to read the source code to see how they do it. The programming style is very basic and clear. Nothing is really optimized, but as written the compiler will do a good job of getting close.

All the help output on one page.



Links to professional PRNG sites and a lot of discussion about ecbs

Explanation and detailed description of the algorithms and why they are as they are

How to use testecbs8 and testecbs64

A cryptographic cipher program that leaves no trace of itself after use. How ecbscryptogen works.

Back to main index page.