Generate and use encryption keys using HSMs