Nearly three years after the Federal Bureau of Investigation abandoned an effort to force Apple Inc. to extract data from an encrypted iPhone, technology companies are facing several new efforts from governments fighting for access to digital secrets.

Australia and the U.K. have passed laws that make it easier for law enforcement to compel tech companies to turn over data, although the impact of those measures has yet to be tested. India is considering a sweeping law that would give authorities access to some data from the...