code to implement some cryptographic algorithms and protocols.