Encryption functions for knife