added encrypt(), decrypt() and keygen() and all these seems to work