Added calls to set public and private keys when Message streams are created.