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 in TestFlight, and the build cleared without any document. Six days later I pulled Lightning from Winnow before 0.8.0 ever shipped, so we never turned France off on the App Store. Looking back, having to pull France was a smell: if you have to turn off France, you are writing too much crypto. China is off for different reasons, and stays off.
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 a Lightning node 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 |
Lightning put Winnow in the middle row. Its algorithms are public standards (secp256k1, SHA-256, HKDF, ChaCha20-Poly1305), and the Lightning code ran its transport and onion encryption in Winnow's own Swift rather than through 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.
If you have to pull France, you are writing too much crypto
Turning France off got build 0.8.0 into TestFlight, and it was a warning sign I should have read sooner.
An on-chain Bitcoin wallet does not encrypt the network. Bitcoin transactions, blocks, and compact filters are public data. What the wallet has to supply outside iOS is hashing and digital signatures (SHA-256 and secp256k1), which authenticate and check integrity; they do not hide anything. Even France's Article 30 exempts cryptography that only authenticates or checks integrity. Where Winnow does encrypt, for the Keychain, iCloud recovery, and system HTTPS connections, it uses the encryption built into iOS. That is the top row of Apple's table: nothing to file.
Winnow only landed in the middle row because I had written a Lightning implementation in Swift inside the app, and with it my own transport and onion encryption outside iOS. That was the same lesson Tor taught me the day before, and the one Lightning taught me six days later. Embedding Tor meant carrying a 400-crate Rust networking stack inside the wallet; moving Tor to a SOCKS gateway let Winnow stay a Bitcoin client. Embedding a custom Lightning engine meant carrying peer encryption, onion routing, and channel-closing machinery inside the on-chain app.
Needing an export-compliance exemption was an architectural smell. If you have to pull France, you are writing too much crypto. When I pulled Lightning out of Winnow, the custom encryption left with it. We never shipped Lightning, so we never turned France off.
China
China is not a form I can fill in, and it does not depend on how much cryptography the app writes.
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
If you live in France, Winnow is on the French App Store and updates normally. Because Lightning came out before 0.8.0 shipped, France never had to be turned off on the shipping app. When I build a separate Lightning wallet later, France's Article 30 declaration will be waiting for that app unless the law changes first. 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 China, both the crypto ban and real-name app filing would have to go before Winnow could ship there. For a future Lightning wallet in France, one change would settle it: supplying standard, public encryption without a declaration, the step after 1999 and 2004. Until then, keeping Winnow focused on on-chain Bitcoin keeps it out of the Prime Minister's inbox.