John Kerry is to lead economic talks in Beijing, while legislation in Britain could force tech companies to share encrypted messages with the government.