working on security flow for the message protocol