adding key-exchange support to messages