implement crypto class along with data generation and tests
move data generation code out of data into datagen