Wrap deserialization into try/catch.
Add helper to generate key messages.
Generate dh1 init message for simulation test.