Added cryptographic exception handling