crypto: basic crypto functions

Added some basic crypto functions