This article explores how PSL leverages SCL to securely execute workloads inside enclaves, using sandboxed JavaScript for isolation, attestation protocols for trust, and hierarchical deterministic (HD) wallet-style key management for scalable cryptographic control. With enclaves handling runtime environments, PSL ensures keys are uniquely derived, rotated efficiently, and protected against leakage. The result: a secure, flexible framework for serverless computing that reduces the trusted computing base while enabling scalable, encrypted, and verified workloads.This article explores how PSL leverages SCL to securely execute workloads inside enclaves, using sandboxed JavaScript for isolation, attestation protocols for trust, and hierarchical deterministic (HD) wallet-style key management for scalable cryptographic control. With enclaves handling runtime environments, PSL ensures keys are uniquely derived, rotated efficiently, and protected against leakage. The result: a secure, flexible framework for serverless computing that reduces the trusted computing base while enabling scalable, encrypted, and verified workloads.

Inside PSL: Key Management, Sandboxing, and Secure Enclaves Explained

2025/10/03 05:15
7 min read
For feedback or concerns regarding this content, please contact us at crypto.news@mexc.com

Abstract and I. Introduction

II. Background

III. Paranoid Stateful Lambda

IV. SCL Design

V. Optimizations

VI. PSL with SCL

VII. Implementation

VIII. Evaluation

IX. Related Work

X. Conclusion, Acknowledgment, and References

VI. PSL WITH SCL

We discuss the experience and implementation effort to use SCL for PSL. Every PSL worker is started with a Worker Enclave in SCL, and attested by In-Enclave FaaS Leader. The code for PSL is directly executed on sandboxed Javascript engine. Our key distribution and management protocol provides every worker enclave with unique private keys derived from a master key by the FaaS Leader. The keys can be easily generated, verified and rotated to prevent potential key leakage.

\ A. Sandboxing

\ To isolate in-enclave applications from the PSL infrastructure, we use a sandboxed Javascript interpreter, Duktape, to dynamically interpret the Lambda program at runtime. In order for sandboxed Javascript program communicate with its other counterparts, we modify the Duktape and introduce two functions put and get to interact with SCL. We note that the program is transparent with and sandboxed from the underlying cryptographic schemes, so that it cannot observe and unintentionally leak the cryptographic secrets.

\ B. Attestation

\ PSL builds its attestation protocol on top of the Asylo’s attestation primitives. For each worker or FaaS leader that requires code running in the enclave, it starts with an Assertion Generation Enclave(AGE) as a Quoting Enclave(QE) that helps generates quotes on behalf of the enclave. The QE is certified by the Provisioning Certification Enclave (PCE), which uses Provisioning Certification Key (PCK) that is written, and distributed by Intel to sign QE’s hardware REPORT. The PCK certificate chain can be traced back to Intel SGX Root Certificate Authority(CA). After receiving an assertion request from a remote attester, the worker or FaaS leader establishes bi-directional local attestation with AGE to forward the assertion request from the remote attester and to get the assertion from the AGE. After the remote attester verifies the assertion, they establish a secure gRPC channel and the remote attester sends confidential information, such as crypographic keys, to the worker or FaaS leader.

\ C. Launching Process

\ Each PSL worker node starts a lambda runtime in the enclave, which is registered with a third-party job scheduler. To launch a PSL workload, the user contacts the job scheduler with an encrypted program and corresponding launching configurations, such as how many lambdas are needed. The job scheduler contacts idle worker nodes within its registry and forwards the encrypted program to the potential worker nodes. To prevent malicious worker nodes, the user sends cryptographic keys via a separate channel through FaaS leader that runs in an enclave. After verifies the identity of the FaaS leader using remote attestation, the worker distributes the keys to the FaaS leader. The workers which receive the encrypted program also verify itself with remote attestaion with the FaaS leader. After the workers are authenticated, the FaaS leader forwards the cryptographic keys to the worker nodes, and the worker nodes can decrypt and run the program. When the PSL workload is finished, all the user-related confidential information, such as the content of the memtable, is cleared by a RESET command by the FaaS leader, because restarting the lambda runtime may take longer time. The FaaS leader keeps track of the idleness of the workers and only distribute keys to the idle workers. The workers after RESET need to be re-attested for the next PSL workload.

\ D. Key Management

\ In PSL, key management is needed for worker enclaves to verify each other’s identity, and to satisfy the security guarantees of DataCapsules. Our key management design goals are: 1) Provenance: by providing a unique key pair per worker enclave; 2) Authentication: each worker enclave needs to sign with the (derived) DataCapsule owner identity; 3), PSL uses a hierarchical structure with a parent FaaS Leader and multiple child Lambda Enclaves. We want to design a key management scheme to efficiently manage hierarchically structured key pairs with low overhead.

\ To derive a each set of public/private key pairs from a master key, we use Hierarchical Deterministic (HD) Wallet from Bitcoin Wallet[30]. HD Wallet is a key management scheme that allows all the child public keys to be derived from a single parent public key. We use hardened derived child keys, a scheme of HD wallet to prevent the problem of HD Wallet that the leakage of the child private key leaks the private key of the parent. HD Wallet enables efficient key management in PSL as follows: 1) After attestation between the client and the FaaS Leader, the client sends its owner key to the FaaS Leader. 2) The FaaS Leader generates a child public/private key pair for the current running application. 3) The FaaS Leader uses the application child key pair to generate multiple grandchild key pairs, one per worker enclave. 4) The FaaS Leader attests and sends every enclave its grandchild key pair. 5) FaaS Leader multicasts the application public key to all enclaves. 6) Each worker enclave derives the other worker enclaves’ public keys using the application public key.

\

\ Key Leakage and Rotation We enable efficient key rotation scheme with SCL that can derive and distribute a new set of key pairs for the workers from the new hardened key pair. This prevents the cryptographic key leakage over time. This is done by (1) client deriving a new child hardened key pair and multicasting the public key to all enclave workers; (2) the FaaS Leader then derives a new set of key pairs for the workers from the new key pair. To handle lost multicasted messages or enclave worker failure, we can rely on SCL’s consistency coordinator and include the current parent public key in the SYNC reports. This ensures that any enclave worker can verify that they are using the correct signing keys in a given epoch by validating the keys against the consistency coordinator’s SYNC reports. The frequency in which key rotation occurs depends on the user’s threat model. Users may choose to rotate keys per function invocation. This ensures any new function invocations may not affect previous function invocations.

VII. IMPLEMENTATION

Our codebase contains 32,454 LoC in C++ excluding comments and 43,011 LoC code base in total counted by cloc[1]. The core SCL KVS code consisted of roughly 4,000 lines of code in C++, excluding the attestation, distributive application implementations, and experiment scripts. We implement the KVS directly on top of Asylo instead of on a containerized enclave environment. This yields a much smaller TCB than related works such as Speicher [9].

\ Asylo is a hardware-agnostic framework for TEEs, supporting Intel SGX(v1 and v2) and ARM TrustZone. It also provided a POSIX compliant library that made it easier to port existing applications into enclaves. We use ZeroMQ to implement network multicast and communications between Worker Enclaves. We use gRPC to create a secure FaaS Leader Enclave, which can generate HD Wallet keypairs and startup enclave workers. We use DukTape, an embedded JavaScript engine in C++, to sandbox enclave applications, now that enclaves can directly execute JavaScript code.

\ CapsuleDB is implemented in C++ and is 2200 LoC. It also uses several features of Asylo and the structures created in the PSL implementation. We use a similar memtable implementation, but leverage mutexes on each entry instead of a spinlock. Due to the implementation timeline, the current version of CapsuleDB writes data to disc rather than to a network attached DataCapsule using the Boost serialization library. The DataCapsule replication service contains about 1,000 LoC in C++ excluding comments. We use RocksDB as embedded persistent storage for each DataCapsule replica, ZeroMQ to implement network communication between DataCapsule replicas, and OpenSSL for signature and verification.

\

:::info Authors:

(1) Kaiyuan Chen, University of California, Berkeley (kych@berkeley.edu);

(2) Alexander Thomas, University of California, Berkeley (alexthomas@berkeley.edu);

(3) Hanming Lu, University of California, Berkeley (hanming lu@berkeley.edu);

(4) William Mullen, University of California, Berkeley (wmullen@berkeley.edu);

(5) Jeff Ichnowski, University of California, Berkeley (jeffi@berkeley.edu);

(6) Rahul Arya, University of California, Berkeley (rahularya@berkeley.edu);

(7) Nivedha Krishnakumar, University of California, Berkeley (nivedha@berkeley.edu);

(8) Ryan Teoh, University of California, Berkeley (ryanteoh@berkeley.edu);

(9) Willis Wang, University of California, Berkeley (williswang@berkeley.edu);

(10) Anthony Joseph, University of California, Berkeley (adj@berkeley.edu);

(11) John Kubiatowicz, University of California, Berkeley (kubitron@berkeley.edu).

:::


:::info This paper is available on arxiv under CC BY 4.0 DEED license.

:::

\

Market Opportunity
Ambire Wallet Logo
Ambire Wallet Price(WALLET)
$0.0086
$0.0086$0.0086
-0.23%
USD
Ambire Wallet (WALLET) Live Price Chart
Disclaimer: The articles reposted on this site are sourced from public platforms and are provided for informational purposes only. They do not necessarily reflect the views of MEXC. All rights remain with the original authors. If you believe any content infringes on third-party rights, please contact crypto.news@mexc.com for removal. MEXC makes no guarantees regarding the accuracy, completeness, or timeliness of the content and is not responsible for any actions taken based on the information provided. The content does not constitute financial, legal, or other professional advice, nor should it be considered a recommendation or endorsement by MEXC.

You May Also Like

White House Publishes Trump’s New Strategy Against Cybercrimes

White House Publishes Trump’s New Strategy Against Cybercrimes

Key Takeaways: An executive order that was signed by Donald Trump instructed U.S. agencies to step up efforts to counter network-based frauds and crypto scams in
Share
Crypto Ninjas2026/03/08 00:43
Trump's new DHS pick can't stop embarrassing himself — and he hasn't even started

Trump's new DHS pick can't stop embarrassing himself — and he hasn't even started

There just might be a second reason — besides the constant fawning praise for Dear Leader — why Donald Trump chose Sen. Markwayne Mullin (R-OK) as his new Secretary
Share
Rawstory2026/03/08 00:16
We’re not being as forward-looking as normal

We’re not being as forward-looking as normal

The post We’re not being as forward-looking as normal appeared on BitcoinEthereumNews.com. Bank of Canada (BoC) Governor Tiff Macklem addressed reporters’ questions, offering insights into the central bank’s monetary policy outlook. His remarks came after the BoC lowered its interest rate by 25 basis points to 2.50%, a move that markets had broadly anticipated. BoC press conference key highlights Wage growth continued to ease. The preferred core inflation measures have been around 3.0%. Underlying inflation is running around 2.5%. Consensus to cut rates was clear. Attention now shifts to how exports perform. There are still some mixed signals on inflation. The Inflation picture hasn’t changed much since January. We’re not being as forward-looking as normal. The Bank of Canada considered holding the overnight rate steady. I have more comfort looking at the upward pressure on CPI. We will be assessing the impact of government announcements on targeted support and support for big projects. Inflationary pressures look somewhat more contained. If risks tilt further we are prepared to take more action. Will take it one meeting at a time. This section below was published at 13:45 GMT to cover the Bank of Canada’s policy announcements and the initial market reaction. In line with market analysts’ expectations, the Bank of Canada (BoC) trimmed its policy rate by 25 basis points, taking it to 2.50% on Wednesday. Investors’ attention will now shift to the usual press conference by Governor Tiff Macklem at 14:30 GMT. BoC policy statement key highlights Rate cut was appropriate given the weaker economy and less upside risk to inflation. On a monthly basis, upward momentum in core inflation seen earlier this year has dissipated. Disruption linked to trade shifts will continue to add costs even as they weigh on economic uncertainties. BoC says it will continue to support economic growth while ensuring inflation remains well controlled. Ottawa’s decision to scrap tariffs…
Share
BitcoinEthereumNews2025/09/18 05:17