If you follow fintech, you’ve likely heard how dozens of banks want to transform the business of record-keeping with blockchain technology. The industry is going to take millions of transactions—settlements, transfers, swaps, and so on—and record them on a shared digital ledger.
The banks have already build a working prototype and blockchain adoption could go live by next year. But before it rolls out for real, the financial industry must overcome a major challenge: How will banks ensure the new tool doesn’t let competitors spot sensitive transactions involving them or their clients?
The dilemma arises from the fact a blockchain, by its nature, is a permanent record verified by those who use it. The blockchain’s transparency is one of its greatest features. But in the case of the banks, it also risks exposing confidential information to others who operate on the chain.
To understand how the banks will stop competitors and others from snooping on their transactions, I spoke to executives of R3, the company that is working with the financial industry to build a blockchain.
A Public Chain of Secrets
David Rutter is a former Wall Street guy who, as CEO of R3, has been tasked with building an ambitious piece of software that 53 banks plan to adopt as the basis for their blockchain project. If it works, the speed to clear transactions will increase dramatically, while the cost of record keeping could plummet.
R3 is not the only company working on blockchain for banks. Digital Assets is one notable rival. But due to the extent of its partnerships, R3 appears to be furthest out of the gate so far.
Sitting in a glass conference room called Ice-Man, which like others in R3’s midtown Manhattan office was named after the movie Top Gun, Rutter explained why blockchain poises a problem for secrecy.
“If I do a big settlement with Goldman Sachs (gs), I don’t want J.P. Morgan (jpm) to know that and front-run me,” said Rutter, citing a hypothetical example that shows the tension in building something that needs to both public and secretive.
To understand the dilemma Rutter describes, it’s helpful to recollect how blockchains work in the first place: They’re created through software that produces a tamper-proof record of various transactions, and that relies on multiple parties to confirm those transactions took place.
Get Data Sheet, Fortune’s technology newsletter.
The most famous blockchain is the one that underlies the crypto-currency bitcoin. Its ledger is entirely public and is recorded by miners, who can be anyone with a computer and are paid with a unit of bitcoin for running the software that verifies the information recorded on new blocks added to the chain.
The blockchain R3 is building is different. The banks who will use it, and who are contributing to its development, want transactions recorded on a ledger too. But they don’t want every Tom, Dick, and Harry to help in the verification process. What they’re building instead is a so-called “private chain” in which only trusted members—in this case the banks and financial regulators—can write to the chain and record those transactions.
The problem, however, is that the banks will depend on each other to verify what is written to the blockchain. But, as Rutter noted in the hypothetical Goldman Sachs example above, the process involves sharing important information with competitors. Fortunately, a solution appears to be at hand.
“We’re try to build in ultimate flexibility to the verification layer. If we need validators that are also competitors, there are cryptographic ways to cover it up,” said Rutter.
But what will this mean in practice?
Just Enough Data
Charley Cooper is a former regulator and lawyer who is tasked with working with R3’s engineers, and explaining what they do to the press and the public.
When it comes to the question of masking sensitive transactions on the banks’ blockchain, Cooper points out that similar discussions have occurred in relation to the bitcoin ledger. In that case, he says a popular proposed solution is encryption: specifically, this means those who record transactions to the blockchain would scramble it with a private key that could only be unlocked by authorized parties.
Such a solution, though, is a no-go for the banks’ blockchain for two reasons, according to Cooper. The first is a question of scale.
While the bitcoin ledger hums along with relatively few transactions, the blockchains the banks are building will utterly dwarf that number. Specifically, the bank blockchains are intended to record billions or even trillions of transactions—from stock trades to interest swaps to consumers credit card swipes. The idea of taking that gargantuan pool of data and encrypting it all before recording it to the blockchain is simply not practical.
Secondly, Cooper says security-obsessed banks don’t want the transaction data hanging out there even if it is encrypted.
“The bitcoin maximalists say security cannot fail. I’ve been around a while and I don’t know anything that can’t ever fail,” he said. “Even if there’s a small chance, why share with a non-party to a transaction? Why should Pimco be able to see a transaction between JP Morgan and BlackRock, even if is encrypted?”
The alternative solution, and the one R3 is adopting, is to develop the blockchain in such a way that the transactions that are published for verification purposes only contain a limited amount of data.
In the case of an interest swap, for instance, Cooper says that Dodd-Frank regulations require the two parties involved to record over 140 fields of data. But for the purposes of the blockchain, the other banks would only see a select series of data points—perhaps codes showing the nature of the transaction and a broad price band to show its value.
Meanwhile, the blockchain will also store a complete record of the transaction that can only be seen to the parties involved, and by any regulator who wants to inspect it.
Cooper sums up R3’s software, which is called Corda, this way: “Our platform, Corda, is inspired by blockchain technology, but is not technically a blockchain in the purest sense. We’re seeking to take the best attributes of blockchain technology (data storage with transactions/events, immutability, asset representation, cryptography, and distribution/consensus) and apply them to financial services in a way that a pure, public blockchain would be unable to do. ”
The upshot is that, by making the blockchain flexible in what it discloses, and to whom, the banks are creating an elegant new ledger to replace many legacy record keeping system. In the long run, they may also provide a template for the many other industries—land registries, mortgage companies, and so on—that aspire to make blockchains a part of their business.