SETR 03: Cryptography
SETR 03: Cryptography
CRYPTOGRAPHY
45
cyberattacks that exploit human and technical vulner- cryptography. It requires a secure key distribution,
abilities help to explain why cybersecurity will be an which is a method of distributing secret keys to all
ongoing challenge. parties who should have them—but preventing
those who shouldn’t from obtaining them.
Messages can also be digitally time-stamped. A A blockchain can be visualized as a chain of blocks
known authoritative time and date server—such as where each block contains a single transaction and
the Internet Time Servers operated by the National a cryptographic hash of the previous block, creating
Institute of Standards and Technology—accepts a a chain in which every block except the first is linked
message, appends the current date and time, and to the previous block. As more transactions occur,
then provides a digital signature for the stamped the blockchain gets longer because more blocks are
message. added to the chain.
Drew’s
Drew
Servers Taylor
Taylor’s
private private
key key
Send
me $ mi34fpe9501qk
Public Keys
Taylor’s Drew’s
public key public key Send
mi34fpe9501qk
me $
03 Cryptography 47
FIGURE 3.2 How a blockchain manages transactions
1 2 3
A wants to send The transaction is represented The block is broadcast to
money to B online as a “block” every party in the network
4 5 6
Those in the network The block then can be added The money moves
confirm the validity of the to the chain, which provides from A to B
transaction an indelible and transparent
record of transactions
The distributed nature of blockchain also increases are always available and whose execution cannot
security. A new transaction is broadcast to every party be reversed—once a smart contract processes
in the network, each of which has a replica of the entire an incoming request, that processing cannot be
blockchain (see figure 3.2). Each party tries to validate reversed. Smart contracts can be used to implement
the new transaction. It could happen that these repli- financial instruments, to record ownership of digital
cas may not be fully synchronized; some might have assets, and to create marketplaces where people
received the new transaction while others did not. To can buy and sell assets. Smart contracts are com-
ensure that all replicas are identical, blockchains have posable—one smart contract can use another—thus
mechanisms for coming to consensus on the correct creating a vibrant ecosystem of innovation where
information. Ethereum, for example, accepts transac- one project can make use of a service developed by
tions that have been validated by two-thirds of the another project. Once deployed, they are available
participants. Blockchains are designed with economic forever, running whenever someone interacts with
incentives for replicas to behave honestly. them. By contrast, cloud computing applications
are inherently transient—as soon as the application
Applications that run on a blockchain are called developer stops paying the cloud fees, the cloud
smart contracts. These are computer programs that provider kills the application.
03 Cryptography 49
computation enables data privacy during computa- many people were exposed to COVID in aggregate,
tion, ensuring that no party learns more information without learning who was exposed.
about the other parties’ inputs than what can be
inferred from the result alone. Secure computation
Zero-Knowledge Proofs
also allows users to prove they possess knowledge
of a statement without having to disclose the actual A zero-knowledge proof is a cryptographic method
content of that statement. that allows Paul (the prover) to prove to Vivian (the
verifier) that Paul knows a specific piece of informa-
To illustrate secure computation, consider the prob- tion without revealing to Vivian any details about
lem of determining the collective wealth of three that information. The term “zero-knowledge” indi-
people while keeping the individual wealth of each cates that Vivian gains zero new knowledge about
person secret. Alice chooses a large random number the information in question, apart from the fact that
and in secret adds her wealth to that number. Alice what Paul is saying is true.
then gives the sum to Bob privately, who adds his
wealth secretly to the number received from Alice. Consider a simplified example that demonstrates the
Bob secretly passes the total to Charlie, who does the logic: two people dealing with a locked safe. Let’s say
same computation and then passes the result to Alice. Paul wants to prove to Vivian that he knows the com-
Alice then in secret subtracts her original random bination to the safe, but he doesn’t want to reveal the
number from the number received from Charlie and combination to Vivian. With a zero-knowledge proof,
reveals the result to everyone else. That revealed Paul can convince Vivian that he knows the combina-
number is the sum of each party’s wealth but at no tion without exposing the combination itself.
time does anyone learn of anyone else’s wealth.5
To do so, Vivian writes something on a piece of
This example is oversimplified (in fact, there is a subtle paper and does not show it to Paul. Together, they
flaw in the procedure described). It’s not exactly how put the paper into the safe and spin the combination
a real-world secure computation works, but it sug- lock. Vivian now challenges Paul to say what is on the
gests how computation on secret data might be paper. Paul responds by asking Vivian to turn around
accomplished. True secure computation protocols (so that Vivian cannot see Paul) and then enters the
use more complex mathematics to defend against combination of the safe, opens it, looks at the paper
malicious behavior and to guarantee the privacy of and returns it to the safe, and closes it. When Vivian
each person’s input during the computation process. turns around, Paul tells her what was on the paper.
Paul has thus shown Vivian that he knows the com-
Applications of secure computation allow data ana- bination without revealing to Vivian anything about
lytics to be performed on aggregated data without the combination.
disclosing the data associated with any individual
element of the dataset. Banks can detect fraud with- In practice, of course, zero-knowledge proofs are
out violating the privacy of individual customers. A more complex, yet they already have seen real-
group of workers can calculate their average salary world implementations:
without revealing their colleagues’ personal pay.
A Stanford system called Prio allows for a network Banking A buyer may wish to prove to a seller
of connected computers to work together to com- the possession of sufficient funds for a transaction
pute statistics, with clients holding their individual without revealing the exact amount of those funds.
data privately.6 This was deployed, for example, This capability has been implemented in the Zcash
on mobile phones during COVID to calculate how cryptocurrency.7
Impact of Cryptography
Research is funded by both the US government and
The applications described above suggest a broad private industry, but funding from the US govern-
range of possibilities for cryptographically enabled ment is subject to many requirements that increase
data management services. Whether we will see the difficulty of proposal submission manyfold (as
their widespread deployment depends on compli- much as a factor of sixty). Thus, research faculty often
cated decisions about economic feasibility, costs, tend to prefer arrangements with the private sector,
regulations, and ease of use. which tend to be much simpler. On the other hand,
only the US government is able to fund research that
Misaligned incentives can affect how fast innovations may not pay off for many years (as in the case of
are deployed. Some of the applications described quantum computing).
above provide significant benefits for the parties
whose data can be better protected and kept more
Policy, Legal, and Regulatory Issues
private. But existing companies, having built their
business models on legacy systems that ingest all As a rule, public policy considerations are applica-
their customers’ data, have no incentive to change tion specific; there has been no push to regulate
their practices. They are the ones who would have basic research in cryptography for several decades.
03 Cryptography 51
Quantum-resistant algorithms are expected to be widely
available by the time quantum computing comes online.
Bitcoin, an older and today the dominant cryp- A second issue is that messages protected by
tocurrency, consumes an enormous amount of pre-quantum cryptography will be vulnerable in a
energy; Bitcoin mining uses more energy than the post-quantum world. If those messages had been
Netherlands.11 For this reason, newer blockchains— saved by adversaries (likely in the case of parties like
03 Cryptography 53