How Midnight Blockchain Keeps Your Private Data Off-Chain Using Witnesses
Midnight is a blockchain platform that allows private data — such as votes or scores — to remain on a user's device rather than being recorded publicly on-chain. It achieves this through a mechanism called a witness, a helper function that runs locally and reads secrets from a private state file stored on the user's device. Instead of publishing raw data, the system generates a cryptographic proof confirming the data is valid, and only that proof is submitted to the blockchain. Midnight's programming language, Compact, requires developers to explicitly use a disclose() function before any privately derived value can interact with public state, preventing accidental data leaks at the compiler level. The approach allows networks to verify claims about private information without ever seeing the underlying data itself.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in