From the archive

Why Winnow Won't Ship in China or France

Lightning has to encrypt. France wants that declared to its Prime Minister, and China wants a registered operator for an app it calls illegal. Winnow will ship to neither.

On October 1 the first build of Winnow with Lightning, 0.8.0, sat in TestFlight marked Missing Compliance. Nobody could install it, me included. Apple wanted a document from the French government.

I turned France off, and the build cleared without any document. China is off too, for different reasons. Neither is coming back while the rules stand, and this is why.

The paperwork Apple asked for

Lightning encrypts, and it has to. Every channel runs over an encrypted, authenticated connection to its peer, and every payment travels as an onion: layers of ChaCha20 that each node on the route peels one at a time, so no node learns more than its neighbors. Without it, the route would learn who paid whom. It is not a feature I can switch off.

Apple sorts encryption into three bins (Apple's table):

What the app uses What Apple asks for
Only the encryption built into iOS Nothing
Standard algorithms implemented outside iOS A French encryption declaration, if the app is sold in France
Proprietary algorithms A US export classification, plus the French declaration if sold in France

Winnow is in the middle row. Its algorithms are public standards (secp256k1, SHA-256, HKDF, ChaCha20-Poly1305, AES-GCM), and some of them run in Winnow's own code and a third-party library rather than in iOS. For an app like that, the only government whose paperwork Apple asks for is France's.

The document is an attestation from ANSSI, France's national cybersecurity agency. Article 30 of France's 2004 digital economy law opens with a sentence I like: "L'utilisation des moyens de cryptologie est libre." Using encryption is free. The next sentence takes it back from anyone who hands encryption to someone else. Supplying a means of cryptology that does more than authenticate requires a prior declaration to the Prime Minister, and the supplier must keep a description of its technical characteristics, and its source code, at the Prime Minister's disposal. Article 35 makes failing to declare punishable by a year in prison and a €15,000 fine. ANSSI answers a complete declaration within a month.

That would have been a month with no TestFlight for any tester, in any country, to get a letter for one of them.

Why I didn't just file

I could have. Plenty of companies do. Three things stopped me.

There is nothing to disclose. The algorithms are published standards. Winnow is MIT licensed on GitHub. The source code the law asks me to hold for the Prime Minister is already held for everyone. A declaration would tell the French state nothing it can't read today. What it adds is the idea that shipping public math needs the state's leave, with prison for not filing.

It is the wrong first move for this app. A self-custody wallet makes one promise: nobody stands between you and your money. Asking the Prime Minister's office for leave before I may hand anyone that promise sets the wrong precedent.

France already knows the answer. Until 1999, France required authorization for encryption stronger than 40 bits. That year Lionel Jospin's government raised the free threshold to 128 bits and replaced authorization with declaration, and the 2004 law made use free outright. The declaration is what is left of the old system. I hope France finishes the job. Until it does, Winnow waits at the border.

China

China is not a form I can fill in.

Since the Ministry of Industry and Information Technology's August 2023 notice, every app in mainland China that connects to the internet needs an ICP filing number. The filing puts the operator's identity and the app's domains on record with the ministry, and app stores must remove apps that lack one (Linklaters). A foreign developer can file only through a Chinese company or a local publisher. Separately, on September 24, 2021, ten agencies led by the People's Bank of China declared crypto business "illegal financial activities" (China Briefing).

So Winnow in China would need a state-registered Chinese operator for an app whose core function the state calls illegal. There is no form for that. There is only a different app, and I won't build it.

If you live there

French law says using encryption is free; supplying it is what needs the declaration. Winnow's source is public, and you can build it yourself. If you already have Winnow from the French App Store, you keep the version you have, but 0.8.0 and later won't reach you through it. I am a programmer, not a lawyer, so take none of this as legal advice.

Winnow is not on the App Store in mainland China, and it won't be.

What would change my mind

For France, one change: supplying standard, public encryption without a declaration, the step after 1999 and 2004. For China, both the crypto ban and real-name app filing would have to go. I'm not holding my breath for the second.

← All writing