### anf2weight

This program computes the weight of a Boolean function, given its Algebraic Normal Form. Explanation of the algorithm can be found here.

### FolderHash

FolderHash
tool is used to generate footprints of folders. It generates a hash
value by processing all subfolders and the files in them. This
footprint (hash value) is sensitive to any change in the structure
of the folder including file/folder names and file contents. In
order to accomplish this, **SHA-256** and** HMAC
**algorithms are used. In thoery, it should be as hard as to
find a collison in SHA-256 for someone to come up with two different
folders having the same hash value. A brief description of how the
hash value of a folder is calculated is
here.

This tool can be useful in the following situations:

- You created a copy of a folder and you want to be sure that the folder is copied successfully.
- You want to make sure that a folder content is not changed during some time period.

Of course, you can pack the file contents into a single file and then calculate the hash of the packed file instead. However, this requires more disk space and time (since a copy of the folder is generated), especially if the folder in question is large sized.

### Multi-stream and Constant-time SHA-3 Implementations

I've implemented some of the SHA-3 competition finalists using **
vperm, bitslicing**
and **multi-stream** techniques in software. **
vperm** and **bitslicing**
techniques make the implementation resistant against **
cache-timing attacks** by eliminating table lookups for the
s-box'es. Plus, the implementation may even perform better than the
lookup version sometimes. The **vperm** implementation
can be easily converted to **aes-ni** implementation,
so these were benchmarked as well.
**Multi-stream** implementations make use of the **
SIMD** architecture of the modern cpu's to process multiple
instances of an algorithm simultaneously. Below table lists the
implementation methods and the algorithms which they're applied.

Hash Function | Implementation |
---|---|

BMW-256 | 4x |

BMW-512 | 2x |

ECHO-256 | bitslice, vperm, aes-ni |

ECHO-512 | bitslice, vperm, aes-ni |

Fugue-256 | vperm, aes-ni |

Fugue-512 | vperm, aes-ni |

Grostl-256 | 4x-bitslice, vperm, aes-ni |

Grostl-512 | 4x-bitslice, vperm, aes-ni |

Skein-256-256 | 2x |

Skein-512-512 | 2x |

SHA-256 | 4x |

SHA-512 | 2x |

### Fugue Implementation

This is the vperm implementation of hash function Fugue based on
Mike Hamburg's
vperm AES implementation. It has slightly better performance than
the SIMD implementation by Fugue authors. I presented this work in **
Second SHA-3 Candidate Conference** in Santa Barbara. Details
can be found here.

### CIDAT

CIDAT (Ciper Design and Analysis Tool) was developed to visually design systems based on common building blocks such as Feedback Shift Registers, boolean functions, s-box, logical operators, etc. Although the application as is may not be well-fit for a cryptographer who wishes to design a cipher, it can be used for educational purposes, for instance demonstrating basic properties of a stream cipher (linear complexity, period, correlation). I did not have time to write a detailed documentation, however there are various examples that you can play with.

### BFW

Given the truth table or ANF of a boolean function, this application
computes the walsh spectrum, nonlinearity, degree, number of terms,
weight, bent-ness and correlation immunity of it. Trivially, it
converts ANF to truth table and vice versa.

### Boolean Function Search

This command line tool finds boolean functions matching the criteria you specify. The search is performed by complementing the specified number of truth table entries of a given boolean function. The resulting boolean functions are filtered according to their properties (nonlinearity, weight, etc.) and saved to a file.

### De Bruijn Sequence Search

This program searches feedback functions of a specified length which
produce maximum length sequences (**De
Bruijn Sequences**). Output contains the algebraic normal
form, term count and the nonlinearity of the feedback function. If
you have enough computation power, you can enumerate all such
feedback functions of desired length.

### QC

This application was written while we were working on the quadratic
complexities of binary sequences. Despite the name, it only
calculates linear complexity correctly. If you're working on linear
complexity of binary sequences, this might be of help to you.

### Frequency Analyzer

This application counts the occurence of blocks of characters of an
alphabet in a file. It can be used to detect the most frequent
appearing patterns in a file. Custom alphabets can be defined, where
you can restrict your search to a limited number of characters.

### Windiff Helper

If you're using **Windiff** to compare folders, this
tool may help you by invoking Windiff after you drag-drop the
folders on its window. (You need to have Windiff utility in order to
use this program)

### 371

This application renders curves and surfaces based on their
parametrized descriptions and calculates some related quantities
such as tangent, curvature, torsion, area and Gauss map. The hardest
part of this project was to write a symbolic expression processor
which can both evaluate and take derivative of functions of a single
variable. The rendering was done with **OpenGL**.

### Memory Game

In a job application in year 2000, I was asked to write a game with Macromedia Director. I decided to write the classical memory game, where you try to match people's faces.

I went to make a demonstration after a couple of weeks. Unfortunately, the game did not run. Years after, I tracked down the error; a non-standard font used in the game had caused the application to crash.