bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 19쪽 중 17쪽
tc.
119
We characterize the security of an adapter in terms of the classic CIA (confiden-
tiality, integrity, availability) triad.
Of greatest importance in an oracle system is data integrity. Integrity here means
that an adversary cannot tamper with data relayed from the source to the DON (or
vice versa). In some circumstances, a channel should also provide confidentiality. Con-
fidentiality means that an adversary learns only the data that a protocol is designed to
send over the channel. (We provide more precise notions.) A channel should exhibit
availability, meaning that the channel is created and carries data in a timely way in
response to relying parties’ needs. Finally, as an addition to the triad, we note that
accountability is important to ensure the proper functioning of oracle systems: In cases
of failure, it should be possible to identify (and penalize) malfunctioning nodes.
B.1.1 Integrity
Transport Layer Security (TLS)—the dominant internet protocol for establishing a se-
cure channel between a client and a host—has a serious inherent limitation: It provides
integrity only for the two communicating parties . It does not digitally sign data in a
way that supports proof to a third party that data originated with the host (or client),
and proposals for this purpose, e.g., [9, 191], are currently seeing very limited adoption.
Some data of interest for blockchain systems may be digitally signed by its producers,
and we discuss approaches to support this potentially beneficial practice in Section 7.1.
Today, however, the vast majority of web data isn’t digitally signed.
DONs therefore incorporate purpose-built mechanisms for ensuring the integrity of
a report r communicated to the DON from one or more other sources. These come in
three forms, each with its own associated trust and operational model.
To describe the functioning of the three mechanisms, we consider a simple model
in which players aim to ensure the integrity of what we call an enhanced report r =
(˜r, sid,S ), where a basic report payload ˜r is tagged with: (1) sid, a session identifier
and (2) an identifier S for the source / entity with which the report originated. The
value sid provides a unique label for the protocol context in which ˜r is sent, and may
include such information as a unique identifier of the relying smart contract, an unique
identifier of the query to which the report corresponds, etc. We refer to an enhanced
report simply as a report where clear from context.
We denote by ρi = (r [,w ]) a report that an oracle node Oi writes toL, where w
denotes an (optional) witness. We refer to w (with or without a witness) as a recorded
report. Because players’ messages on L are authenticated, i.e., signed by the players
that post them, writing ρi can serve as an endorsement by Oi in a relying protocol.
DONs support three basic mechanisms for ensuring the integrity of queries and
reports, meaning their being relayed from claimed source S without tampering. They
are:
• Cryptographic proofs: Digital signing of r by a source S with public key pk,
i.e., ρ = (r,w = Sigpk[r]), provides a direct assurance of the integrity of the
message.
120
• Trusted execution environments (TEEs) / Town Crier: An application
instance A with public key pkA running in a fully featured TEE, such as Intel
SGX, can generate an attestation, that is, a digitally signed witnessw = SigpkA[r].
Assuming trust in the TEE, then, the recorded report ρA = (r,w = SigpkA[r])
ensures the integrity of r.
• Thresholding: Any subset of f + 1 players generating recorded reports ρi =
(r, Sigpki[r]) or combined or aggregate witness ρO = (r, SigO[r]) provides a collec-
tive view of r as originating correctly with source S.
Thresholding and TEEs are complementary. They can be used simultaneously for
a stronger combined security assurance, in the sense that integrity is assured if at least
one of the two mechanisms is sound.
We may extend our definition of integrity to encompass recording a transformation
conf(˜r) of ˜r, rather than ˜r itself. This extension is useful for confidentiality, as discussed
below.
Untrustworthy sources: A given data sourceS may, of course, provide untrustwor-
thy data. Adapter integrity in the sense we have defined it does not include mechanisms
to address corrupt sources. The predominant mechanism used in oracle systems is ag-
gregation over sources. For example, if an asset’s price reports r1,r 2,r 3 are fetched
from sources S1,S 2,S 3, an aggregate report r = median(r1,r 2,r 3), given one faulty
source, r will be the value reported by a correct source. Ensuring correct aggregation
is a problem of computation integrity, as discussed in Appendix B.2.
B.1.2 Confidentiality
We say that an adapter hasweak confidentiality ifO learns both the queryq and report
datar generated by the adapter. Weakly confidential protocols may still provide other
forms of confidentiality, however: the adapter may place only partial information about
(q,r ) onL and thus partially conceal (q,r ) from an observer, and auxiliary data in the
protocol may still be confidential.
We say an adapter has strong confidentiality, on the other hand, if q and r are
partially or fully concealed from O. It’s not obvious at first glance how to achieve
strong confidentiality: How, after all, can O process a hidden query and manage a
hidden report?
DONs can use DECO [234] and/or Town Crier [233] to achieve strong confidentiality
in adapters. See Appendix C for an example.
DECO and Town Crier are designed to provide legacy compatibility, i.e., the ability
to use existing data sources, in a confidentiality-preserving way. An alternative ap-
proach is to change the output of data sources by digitally signing it and providing
confidentiality features, as in TLS-N [191], a nicely complementary approach that we
will also explore, and to a limited extent in OpenID Connect [9], an identity-oriented
data-signing protocol that runs on top of OAuth 2.0.
121
B.1.3 Availability
The availability of an adapter depends on both the availability of the system to which it
is connecting as well as the availability of the DON nodes responsible for implementing
the adapter. While availability mechanisms may be adapter-specific, we expect that
they will commonly rely on a few basic techniques already used or slated for inclusion
in the current version of Chainlink. One, of course, is redundancy, i.e., having multiple
nodes operate the channel. Another is the use of cryptoeconomic incentives to reinforce
fast channel operation; for example, while redundant nodes receive payment for their
services, a premium may be paid for fast execution, e.g., a reward for the first node to
relay data to the DON from an off-chain system.
See Appendix B.1 for further details on adapters in DONs.
B.2 Computation
In their support of layer-2 scaling approaches—whether based on optimistic computing
or validity proofs—DONs offer the possibility of significant performance improvements
for smart contracts. By employing additional technologies, DONs can provide further
performance enhancement and also support various forms of confidentiality, whether
for oracle data as an adjunct to privacy-preserving layer-2 schemes (e.g., [217]), or to
provide privacy enhancement for schemes in which it isn’t present.
Zero-knowledge proof (argument) systems, such as zk-SNARKs [126], zk-STARKs [38],
and Bulletproofs [56, 66], are powerful tools for privacy and will play an important role
in the evolution of confidentiality-preserving smart contract systems [149], as they do,
for instance, in DECO. It is worth noting that the goal of proving statements in zero-
knowledge to an oracle node admits use of a new form of zero-knowledge proof with a
designated verifier (i.e., a proof that is verifiable only by a particular entity, not pub-
licly) [220]; such schemes can greatly outperform more general-purpose zero-knowledge
proof systems. We expect that zero-knowledge proofs will play an important role in
trustworthy and confidential relaying of oracle results, in both adapters and executa-
bles. But they have a critical limitation: They don’t conceal secrets from the prover.
To enable more general confidentiality-preserving functionality will require addi-
tional techniques. These same techniques can also enforce integrity, i.e., help ensure
that computation is performed correctly. We briefly discuss the roles of Trusted Exe-
cution Environments (TEEs) and Secure Multi-party Computation (MPC) in the evo-
lution of Chainlink.
B.2.1 Trusted Execution Environments (TEEs)
TEEs such as Intel SGX [229, 133] and Keystone [152] allow applications to exe-
cute within a protected environment, known as an enclave, that in principle protects
both their integrity and confidentiality. TEEs are designed to realize a powerful and
very general functionality [183], one that encompasses even powerful cryptographic
122
primitives such as virtual black-box obfuscation, that are provably unrealizable using
cryptography alone [27, 175].
The idea of leveraging TEEs for smart contracts was introduced in [139, 233] and
several general-purpose frameworks for this purpose have since emerged [58, 80, 99].
We expect that TEEs will eventually play a role in the Chainlink network, as
they are the basis for Town Crier [233], and Chainlink already supports TEE-based
blockchain systems, e.g., [8]. As the technology continues to mature, we believe it will
play an increasingly important role in blockchain systems in general, and Chainlink in
particular.
Concerns about TEE security have been one impediment to their adoption. We
therefore briefly discuss this issue.
B.2.2 TEE Security
Recent attacks against Intel SGX, the only commodity TEE with attestation capabil-
ities, e.g., [211, 212], have cast doubt on the security of TEEs in practice. We believe
that the technology will evolve, particularly with open source efforts emerging [152].
Mitigations: It is possible to deploy TEEs in ways that recognize their potential
for compromise. One is to employ them for defense-in-depth, that is, for harden-
ing systems. Town Crier may be viewed in this light: Trustworthy oracle operators
should provide their users with confidentiality and integrity, but use of Town Crier
strengthens this assurance. Similarly, TEEs can be deployed in ways that don’t rely
on perfect security. Sealed-glass proofs [207], for instance, use TEEs for integrity, but
not confidentiality (although recent side-channel attacks compromise both).
Finally, it is possible to design TEE-based protocols withforward security, such that
if a break becomes known: (1) Players can avoid use of the TEE and (2) The break
does not retroactively impact previous protocol invocations. This approach would
greatly limit the window of opportunity for adversaries to exploit TEE vulnerabilities.
For example, in protocols where a TEE controls users’ funds, users might move those
funds into addresses specifically for temporary, TEE-only use. In protocols where TEEs
enforce confidentiality for long-lived data, frequent key rotation would achieve a similar
goal.
For example, a TEE could be used to implement the ConfSwitch adapter for confi-
dential DeFi discussed in Appendix C.3. The TEE ingests ( q, switch) encrypted under
a public key pkT EE(t) for an epoch t lasting, e.g., a week, and generates the output
s = switch(r). It then purges all the data it has processed. At the beginning of
each new epoch, it deletes its old key, generates a new one, and publishes it to L or
MAINCHAIN. (Such publication could be facilitated by an executable on L with a
per-epoch initiator.) Players can additionally abort by agreement at any time.
Of course, users have exposure in this model to zero-day, i.e., unpublished, attacks.
There is a cost to using a zero-day attack, however, namely the risk of its exposure
and invalidation through publication of a patch.
123
B.2.3 Secure Multi-Party Computation (MPC)
MPC is a term for generic computation on secret-shared values by a set of nodes. MPC
enables realization of a “black box” functionality, i.e., computation of a function g on
confidential inputs x1,...,x z such that players learn only g(x1,...,x z), and learn no
information about the inputs to the function or intermediate computations. Inputs
can be secret-shared, and also represented in a binding but confidential way on chain
using a commitment scheme or encryption under a secret-shared key.
While quite flexible, and despite impressive recent advances, generic MPC—i.e.,
MPC that supports any functiong—incurs very high computation and communication
overhead by comparison with direct execution on a single node. For example, MPC
using fairly state-of-the-art tools operating in an adversarial model with malicious
players—such as EMP toolkit [218, 219]—require about 20 seconds of computation
for a single AES evaluation for 14 nodes on a WAN. (Only 250ms of computation is
online; the rest can be performed in a precomputation phase.) By comparison, an AES
evaluation on a modern, consumer-grade CPU requires around 2 µs [213].
In short, generic MPC is reasonably practical, but only for modest computations.
Practical implementations have tended to focus on relatively modest computational
tasks, such as auctions in Hyperledger Fabric [42].
Considerably more efficient protocols can be realized for certain functions g. One
example is threshold signing, which is especially practical for BLS signatures [54].
2PC, computation involving just two players can leverage special techniques (“garbled
circuits”) that makes it considerably more efficient than computation involving n> 2
players. DECO [234], for example, uses both custom and generic 2PC techniques.
Most MPC schemes and implementations have some important limitations. One is
that a single player can abort the protocol and learn its output, while (anonymously)
preventing other players from learning theirs’ . This means a failure ofrobustness (ability
to complete computation) but also fairness (in an MPC-specific sense), meaning that
all players receive outputs or none does.
Schemes that allow identification of aborting players (ID-MPC), e.g., [37] are one
approach to this problem. But MPC protocols also generally make the strong assump-
tion of network synchrony, without which they may experience both confidentiality
and integrity failures. A reasonably practical robust version of MPC that operates in
asynchronous networks is presented in [157].
Another limitation of most MPC protocols is their lack of public verifiability. This
isn’t problematic in a model that assumes a quorum of honest players, but would be
for the type of MAINCHAIN accountability discussed in Section 7.3 and Section 8.3.
To ensure correct MPC outputs in the case of a failure in a majority of nodes requires
use of publicly verifiable variants such as [37] with a public bulletin board—necessarily
MAINCHAIN in a majority-dishonest model—and is thus not terribly practical.
In summary, we expect that DONs will support MPC for specialized computations,
such as threshold signing and DECO, early in their development. We will track devel-
opments in the fast-moving field of MPC to determine where support for generic MPC
124
may be appropriate.
B.3 Storage
Data sent to blockchains can play a multifarious role. It may be consumed immediately
by contracts. It can alternatively be placed on chain for fast future access by contracts
or for purposes not related to contract execution, such as archival storage facilitating
the audit of off-chain systems. The quantities of data required for these last two
purposes greatly exceeds that consumed by contracts today, as well as the data-storage
capacity of most permissionless blockchains.
We envision DONs accommodating two forms of storage. The first is on-ledger
storage, achieved by inclusion within a DON’s ledger. The second option, particularly
attractive for bulk storage, is off-ledger storage.
Off-ledger storage may involve the use of off-chain systems that are innately de-
centralized, such as Filecoin [188], IPFS [40], Storj [226], or Sia [215]. Filecoin has a
built-in protocol called Proof of Replication (PoReps) [74, 112, 111, 188, 199], designed
to ensure storage of multiple copies of a file F (and prevent miners from gaming the
consensus protocol). The other three can only achieve this property by having an
end user encrypt F multiple times under different keys, creating distinct correspond-
ing ciphertexts ˜F1, ˜F2, ˜F3. A DON can perform such encryption on behalf of a user,
permitting proof of replication without native support in a target storage protocol.
Where compatible with users’ desired trust models, it is also possible to use existing
systems, such as conventional cloud storage providers. Replication across such services
is possible for robustness [57] and complementary to and composable with decentralized
storage services.
Confidentiality: DONs include the ability for O to store data encrypted under a
secret-shared key. They can perform confidentiality-preserving computation over such
data, as discussed above in Appendix B.2.
B.4 Resource Pricing
Accurate charging of users for resource use on blockchains remains a perennial chal-
lenge. Mispriced resources do not merely carry the risk of discouraging important ap-
plications within an ecosystem. They also constitute a security risk, as they can enable
denial-of-service attacks [184] and more subtle attacks such as drainage of funds [222].
Resource pricing of executable logic in a DON is a somewhat easier problem, as
DON nodes control resource usage and can apply whatever pricing strategies they
deem appropriate. Possible approaches include market-driven pricing, gas metering ` a la
Ethereum, which is supported in EVM and WASM [3], and language-driven approaches
such as non-Turing-complete languages [131]—potentially along with bounded code
sizes. Pricing of adapters, however, will certainly require application-specific pricing
125
strategies, as adapters access external resources, e.g., cloud storage, whose cost is
DON-independent.
C Adapter Examples
In this appendix, we give a few examples of adapters, to illustrate both the wide variety
that is desirable and achievable in practice and relevant notions of security and the
techniques to enforce them.
We use the notation Adapter(P,S) to denote an adapter that involves players inP
and a set of data sources (or a single data source) S. We let → T denote an input /
output to system T where there’s ambiguity. Otherwise inputs should be understood
as read by an adapter from L and outputs as written to L.
C.1 Oracle-Mediated Data-Source Access ( MediatedReport)
In some cases, certain nodes may have access to a data source S that the full set of
nodesO does not. For example, some nodes may have API keys or other credentials
that other nodes inO lack. Nodes with privileged access to a data sourceS can mediate
access on behalf of O using DECO (or Town Crier). Here we describe an adapter that
does so with weak confidentiality.
Technical approach: Using DECO, it is possible for a particular Oi to access S
using confidential credentials and prove to another node Oj that it correctly relayed a
report r from S, without revealing its credentials to Oj. This approach can be scaled
of course to proofs across subsets of nodes.
Adapter MediatedReport(O,S )
Input: q
Output:⟨medreport : (q,r );Oi⟩
Security:
• Availability: Oi must be available when invoked by players in O that
lack access to S.
• Integrity: r is correct under the cryptographic hardness assumptions of
DECO and assuming at least k honest nodes inO.
Example application: SupposeOi submits a report r from data source S whose
value is disputed by another node or nodes in O. This might occur, for instance, as
part of the dispute mechanism in a staking protocol.
126
The dispute might be arbitrated by invoking the full set of nodes inO. Some nodes
inO, however, may lack access to S, which may be a specialized data source. Using
DECO, it is possible forOi 프로젝트로 돌아가기