Yahoo was ordered last year to search incoming emails for the digital “signature” of a communications method used by a state-sponsored, foreign terrorist organization, according to a government official familiar with the matter. The news story has opened a new chapter in a public debate over trade-offs between security needs and privacy rights that...