major rework of cryptosystem