This is a reconstructon of the cipher engine used in iClass, an RFID techology developed by HID Global.
The implementation is based on the work performed by Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and Milosch Meriac in the paper "Dismantling IClass".
This implementation is not optimized at all, but is meant to serve as a reference implementation, and contains a lot of testcases.
Written by Martin Holst Swende 2014
Released as GPLV2 (or later).
THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY.
USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES.
THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS.