
for both encrypted and plaintext queries, signicantly reduces the
complexity for developers new to the system.
•
Execution Safety in Trusted Environments: EncChain and its
associated LLMs are deployable within trusted execution environ-
ments, leveraging advanced hardware security features to safeguard
virtual machine memory privacy and integrity. This setup ensures
that sensitive data is shielded from both the host operating system
and the virtual machine manager, enhancing operational security.
•
Remote Attestation for Enhanced Trust: EncChain enables
the use of remote attestation technologies to conrm the security
and trustworthiness of the execution environments for itself and
the deployed LLM, providing users with additional condence in
the security measures of LLM applications.
2 PRELIMINARIES
Retrieval Augmented Generation. RAG [
3
] architecture rep-
resents a signicant advancement in addressing the challenge of
hallucination in LLMs, emerging as a dominant pattern in devel-
oping LLM applications, particularly enhancing logical reasoning
and data comprehension from private knowledge bases to augment
question-answering (QA) capabilities. It is pivotal in scenarios like
knowledge-based questioning and intelligent assistance. The RAG
framework involves segmenting private knowledge into embedding
vectors stored in a database. Upon receiving a question, the system
converts it into a vector, retrieves the most relevant knowledge via
vector similarity search, and merges this with the question to form
a comprehensive prompt for LLMs.
Trusted Execution Environment. TEEs [
4
,
5
] provide a corner-
stone technology by oering secure and isolated execution spaces
within processors, enhancing the security of data and code against
potential threats from compromised operating systems or hypervi-
sors in the complex landscape of cybersecurity and data privacy.
Within this spectrum, Intel’s Trust Domain Extensions [
2
] (TDX)
serve as an evolved form of TEEs, tailored to bring their benets
into the realm of virtualization. TDX introduces the concept of
trusted domains, in which virtual machines operate in isolation
with hardware-level protections. This innovation directly addresses
the intricate challenges of maintaining data privacy and security in
environments such as cloud computing and data centers.
3 EncChain SOLUTION
3.1 Threat Model
The RAG architecture in QA leads to two primary threats: unautho-
rized access and data exltration. Firstly, its reliance on plaintext
storage of knowledge bases and user queries permits developers un-
fettered access, creating a vector for data leaks in cases of malicious
intent or system compromise. Secondly, the architecture lacks rigor-
ous access controls, enabling users to potentially retrieve sensitive
information beyond their clearance through intentionally designed
queries. These threats collectively jeopardize data integrity and
condentiality, necessitating an immediate implementation of en-
hanced security protocols to mitigate the risks of unauthorized
access and ensure the privacy protection of LLM applications.
3.2 Architecture Overview
The EncChain architecture, delineated in Figure 1 for LLM appli-
cation deployment, emphasizes security and operational integrity.
Web Browser
Confidential VM
EncChain
Service
LLM
Service
Guest OS
3rd-party
Application
Legacy VM
Guest OS
Firmware
Other
Hardware
Intel TDX
CPU
Hypervisor
Host OS
Client Terminal
GPT-4
Chatbot
Figure 1: The architecture of the EncChain demonstration.
It treats the client terminal as secure, encrypting data before it ex-
its, protecting it during transmission. Third-party applications are
hosted on virtual machines (VMs), establishing a clear operational
divide. EncChain and its models operate within secure virtual
environments utilizing advanced VM technologies like TDX for
enhanced runtime security. These environments are reinforced by
hardware security extensions, safeguarding virtual memory from
unauthorized access by the host OS and hypervisor. Third-party
applications leverage EncChain’s APIs for encrypted data interac-
tions and secure business logic development. Remote attestation
technology allows users to verify the security of EncChain and
LLM environments, adding a layer of trust. EncChain’s security
protocol includes data encryption at domain entry and exit, strict
access control, and the synergistic use of secure VMs and remote at-
testation, providing a robust framework for secure LLM application
deployment, addressing the critical need for data security.
3.3 Fine-grained Knowledge Control
EncChain enhances privacy attributes in LLM applications using
RAG-based private knowledge base inference through the key ac-
tion of leveraging ne-grained knowledge control. This innovation,
derived from Operon’s privacy-protected data management [
6
],
embodies the concept of the Behavior Control List (BCL). Speci-
cally, EncChain allows “knowledge owners” to establish a binary
relationship between the “questioners” and the “knowledge bases.”
Upon the questioner posing a question, triggering the LLM’s infer-
ence, EncChain ensures that the search for relevant knowledge
vectors occurs exclusively within an authorized subset of vector
databases, generating answers based on this relationship. It solves
the issue traditionally addressed either by employing multiple dis-
tinguished LLM instances to segregate knowledge for privacy pro-
tection (sacricing eciency and increasing costs) or by utilizing
a single system but facing privacy risks. EncChain’s innovation
lies in its ability to protect privacy while optimizing the retrieval
and integration process of knowledge, thereby nding an eective
equilibrium between privacy security and knowledge utilization.
3.4 System Workow
We present the procedural workow of EncChain through a spe-
cic example, as illustrated in Figure 2. In this scenario, we assume
four distinct roles:
A
knowledge base data owners;
B
question-
ers;
C
third-party software developers providing QA applications;
and
D
TEEs (e.g., cloud infrastructure) for deploying LLMs with
EncChain. We note that, in practical scenarios,
A
and
B
might
represent the same entity, or
B
could be a controlled party of
A
(for
4414
文档被以下合辑收录
相关文档
评论