Generate master secret and identity key.
Updated phone registration code.