how to encrypt and integrity-check with only one key