implementation of the simon cipher