Aptos is a next-generation Layer 1 blockchain. Aptos’ breakthrough technology and programming language, Move, are designed to evolve, improve performance and strengthen user safeguards.
The Aptos Foundation ("Aptos", "we", or "us") welcomes feedback from security researchers and the general public to help improve the security of the Aptos Network, and, at its sole discretion, offers bounty rewards ("Rewards") for security reports that identify previously unknown, in-scope security vulnerabilities.
Target | Type | Severity | Reward |
---|---|---|---|
https://github.com/aptos-labs/keyless-zk-proofs Copy | Code | Critical | Bounty |
Keyless accounts on the Aptos blockchain enable account management using OpenID Connect (OIDC) identities (e.g., Google or Apple accounts) rather than traditional cryptographic keys.
Keyless accounts leverage OIDC protocols and zero-knowledge proofs (ZKPs) to provide a secure mechanism for account authentication and transaction signing without directly exposing or requiring cryptographic key handling by users. This approach is designed to maintain security and privacy while simplifying integration with existing identity providers.
For a broad overview of how keyless accounts work, see our zkSummit'11 Aptos Keyless slides and video.
For a more detailed view, refer to our "How keyless works" documentation.
For an in-depth view, see the initial Aptos Improvement Proposals (AIPs) describing keyless:
The discussion below assumes some familiarity with how keyless works.
Keyless accounts leverage a ZKP to prove the satisfiability of a complex relation, dubbed “the keyless relation” (see AIP-61). However, state-of-the-art ZKPs with efficient verifiers and practical proving times require the relation to be described as a so-called rank-1 constraint system (R1CS). This requires implementing the keyless relation in a domain-specific language (DSL) that compiles down to R1CS (e.g., circom
).
Keyless blockchain addresses are cryptographic commitments to the user’s OIDC identity (e.g., their email address) and the application’s identity (e.g., the OAuth client_id
). To ensure these commitments are hiding, they are blinded using a random blinding factor, called a pepper.
Since the goal of keyless accounts is for users to not have to remember anything, a pepper service (AIP-81) helps users remember their pepper. Specifically, users can authenticate to this service (also) using a valid JWT and the service can (re)compute their pepper for them.
The Aptos Keyless deployment includes a prover service (AIP-75) that helps users quickly compute their ZKPs, which are necessary to transact.
The prover service helps users maintain privacy from the blockchain, since the ZKP leaks nothing about the user-and-application identifiers, nor the pepper.
Currently, the user does not maintain their privacy from the prover service, which does learn the user-and-application identifiers and the pepper.
Training wheels (TW) mode (AIP-61, AIP-75) is a security extension which is currently enabled on the ZK prover service to mitigate against bugs in the ZK circuit implementation.
When enabled, all keyless transactions are required to have a training wheels signature over their ZKPs from the prover service. This ensures that the prover service always verifies the keyless relation manually before computing a ZKP, thereby vouching for the existence of a valid witness and thus preventing attackers from exploiting ZK circuit bugs by constructing a malicious witness.
If the prover service is offline with the training wheels feature enabled, then users with expired ZKPs could temporarily lose access to their keyless accounts.
Integrity: Guarantees that only the owner of the OIDC account behind a keyless account can transact on behalf of that keyless account.
Privacy: Privacy guarantees are two-fold.
On one hand, when keyless users sign into their OIDC accounts, a passive OIDC provider (e.g., Google) must not learn the user's keyless blockchain address nor their transaction activity.
On the other hand, a user’s keyless transaction should not leak the user's OIDC identifier (e.g., the JWT’s sub
or email
) nor the application's identifier. Naturally, this presumes that the application cannot be implicitly-identified from the transaction payload (e.g., the Move contracts being called).
Availability: Availability guarantees that the owning user of a keyless account can always transact and access their account, of course under the assumptions that (1) the OIDC provider is online, (2) the blockchain is live and, if training wheels are on, (3) the prover service is online.
Assuming that (1) the keyless validation logic on the blockchain is sound and (2) the MPC ceremony for the ZKP has been done securely, our discussion focuses on what can go wrong in any of the following:
To compromise a keyless account, an attacker must do all of the following:
To break privacy, an attacker must do any of the following:
The pepper service is trusted to secure its secret key. Otherwise, an attacker in possession of this key can unblind keyless addresses by brute forcing their otherwise low-entropy user identifier and application identifier.
The pepper service is NOT trusted for security of the keyless account. In other words, a malicious pepper service on its own cannot take over a user's keyless account (i.e., not without exploiting a circuit bug and breaking the training wheels). For example, while the pepper service receives a user's JWT in order to authenticate the user before giving them their pepper, it does NOT receive the user's ephemeral secret key (ESK) and therefore cannot steal the user's keyless account.
However, currently, the pepper service is trusted with privacy. For example, the pepper service could perform the brute-forcing attack described above and unblind keyless addresses. But, it is (for now) trusted not to.
As is, the pepper service incidentally happens to serve as an additional layer of security against a large class of soundness bugs in the ZK circuit implementation. For example, even if an attacker can forge a ZKP without having a valid JWT for a keyless address, the attacker would still need the victim user's pepper, which it can only get from the pepper service in exchange for a valid JWT, which it does not have.
The prover service is trusted to secure its training wheels secret key (TW SK). Otherwise, an attacker who is in possession of this key and identified a circuit soundness bug may be able to steal user funds (depending on whether the soundness bug affects the keyless address derivation from the pepper).
The prover service is trusted with privacy. The prover service receives the user's secret witness (e.g., the JWT, the pepper), learning who the user is and which keyless dapp they are using. For now, the prover service is trusted to not reveal this information.
Rewards are calculated based on the severity of the impact that the identified vulnerability would have on Aptos Keyless users. The following severity classifications include sample impacts per criticality, and potential Reward ranges. Aptos Foundation retains sole discretion to determine the severity classification of reported vulnerabilities and the amount of any Reward.
If you identify a security vulnerability impacting Aptos Keyless that does not fall under any of the above categories, we encourage you to report it for further analysis and we will consider a Reward as appropriate and within our sole discretion. Security issues impacting the Aptos Keyless having a root cause in external code dependencies are also in-scope for the program.
To be eligible for a Reward, you are required to:
Rewards for duplicate reports will be split among reporters with first to report taking priority using the following equation:
R: total reports
ri: report priority
bi: bounty share
bi = 2 ^ (R - ri) / ((2 ^ R) - 1)
Where report priority derives from the set of integers beginning at 1, where the first reporter has ri = 1, the second reporter ri = 2, and so forth.
Note, reports that come in after the issue has been fully triaged and resolved will not be eligible for a Reward..
Do not discuss or disclose any vulnerabilities, even resolved ones, outside of this Program without the Aptos Foundation’s written consent.
You ARE NOT eligible to participate in the Program if you are:
To receive a Reward, you will have to enter into an Agreement with Aptos Foundation and provide required information, which may include identity verification information and tax information or forms, such as a W-9 or W-8 for U.S. residents or citizens.
Rewards are managed by Aptos Foundation and are denominated in United States Dollars (USD). Rewards may be paid partially or fully in digital assets at the sole discretion of Aptos Foundation. If you receive digital assets as part of your Reward, the value of the digital assets in USD will be determined at the time you execute your Agreement with Aptos Foundation and after you have satisfied all eligibility criteria. Token-based rewards may be subject to a lock-up period.