Skip to content

Commit 6e8053a

Browse files
pinalikefruitPatrickAlphaC
authored andcommitted
feat: overhaul of the Wallet Security section (security-alliance#164)
* docs: update README for new structure * docs: update documentation on custodial vs non-custodial and hot vs cold wallets * docs: add user security guides for beginners and intermediates * docs: add advanced security guides * docs: add key management * docs: add tools and resources * docs: add signing and verifation section * docs: improvements in AA and EIP7701 * docs: improves the entire section * docs: deletion of obsolete sections * docs: add new item hardwallet * docs: fixed typo * docs: Refine wallet security guides for accuracy and clarity * docs: Apply light content adjustments and add 'reviewed' tag. * archive Developer Key Management section for later * small format changes * docs: refactor updated navigation * docs: Update contribution and documentation configuration
1 parent ead29cf commit 6e8053a

18 files changed

Lines changed: 559 additions & 263 deletions

src/config/SUMMARY.md.develop

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,18 @@
3636
- [Integration & Mapping to Other Frameworks]()
3737
- [Appendices]()
3838
- [Wallet Security](./wallet-security/README.md)
39-
- [Cold vs Hot Wallet](./wallet-security/cold-vs-hot-wallet.md)
4039
- [Custodial vs Non-Custodial](./wallet-security/custodial-vs-non-custodial.md)
41-
- [Hardware Wallets](./wallet-security/hardware-wallets.md)
42-
- [Signing Schemes](./wallet-security/signing-schemes.md)
43-
- [Software Wallets](./wallet-security/software-wallets.md)
44-
- [Secure Multisig Best Practices](./wallet-security/secure-multisig-best-practices.md)
45-
- [Secure Multisig Signing Process](./wallet-security/secure-multisig-signing-process.md)
40+
- [Cold vs Hot Wallet](./wallet-security/cold-vs-hot-wallet.md)
41+
- [Wallets For Beginners & Small Balances](./wallet-security/for-beginners-&-small-balances.md)
42+
- [Wallets For Intermediates & Medium Funds ](./wallet-security/intermediates-&-medium-funds.md)
43+
- [Multisig Wallets For Advanced Users & High Funds](./wallet-security/secure-multisig-best-practices.md)
44+
- [Account Abstraction Wallets](./wallet-security/account-abstraction.md)
45+
- [Signing & Verification](./wallet-security/signing-verification.md)
46+
- [Verifying Standard Transactions (EOA)](./wallet-security/verifying-standard-transactions.md)
47+
- [Multisig Signing Process](./wallet-security/secure-multisig-signing-process.md)
48+
- [Using EIP-7702](./wallet-security/verifying-7702.md)
49+
- [Private Key & Seed Phrase Management](./wallet-security/private-key-management.md)
50+
- [Tools & Resources](./wallet-security/tools-&-resources.md)
4651
- [External Security Reviews](./external-security-reviews/README.md)
4752
- [Expectation](./external-security-reviews/expectation.md)
4853
- [Preparation](./external-security-reviews/preparation.md)

src/config/contributors.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,16 @@
8686
"description": "Creator and maintainer of the ENS framework",
8787
"company": "JustaLab",
8888
"website": "https://justalab.co"
89+
},
90+
"pinalikefruit": {
91+
"name": "Piña",
92+
"avatar": "https://github.com/pinalikefruit.png",
93+
"github": "https://github.com/pinalikefruit",
94+
"twitter": "https://x.com/pinalikefruit",
95+
"features": ["steward"],
96+
"role": "Security Researcher",
97+
"description": "Creator and maintainer of Wallet Security Framework",
98+
"company": "Coinspect",
99+
"website": "https://www.coinspect.com/"
89100
}
90101
]

src/wallet-security/README.md

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,40 @@
11
---
2-
tags:
3-
- Engineer/Developer
4-
- Security Specialist
2+
contributors:
3+
- role: wrote
4+
users: [pinalikefruit]
5+
- role: reviewed
6+
users: [Coinspect]
57
---
68

79
# Wallet Security
810

11+
In cryptocurrency, the security of digital assets is directly tied to how control over the funds is protected. This section provides a technical deep-dive into wallet security, covering the range from fundamental concepts to advanced practices for safeguarding assets against theft, loss, and unauthorized access.
912

10-
Cryptocurrency relies on cryptographic keys to secure transactions and manage ownership of digital assets. Proper wallet security is essential to protect these assets from theft, loss, and unauthorized access. This guide covers the fundamental aspects of wallet security, offering insights into different types of wallets, signing schemes, and best practices to ensure a high level of security.
13+
The goal is to move beyond introductory concepts and provide actionable, technical knowledge for securely managing crypto assets.
1114

1215
## Table of Contents
1316

14-
- [Cold vs Hot Wallet](./cold-vs-hot-wallet.md) - Understanding the differences between cold and hot wallets
15-
- [Custodial vs Non-Custodial](./custodial-vs-non-custodial.md) - Comparing custodial and non-custodial wallet solutions
16-
- [Hardware Wallets](./hardware-wallets.md) - Guide to hardware wallet security and best practices
17-
- [Signing Schemes](./signing-schemes.md) - Overview of different signing schemes and their security implications
18-
- [Software Wallets](./software-wallets.md) - Security considerations for software-based wallet solutions
19-
- [Secure Multisig Best Practices](./secure-multisig-best-practices.md) - Best practices for setting up and managing multisig wallets
20-
- [Secure Multisig Signing Process](./secure-multisig-signing-process.md) - Detailed guide for secure multisig transaction signing
21-
22-
In this section you can:
23-
24-
- Learn the differences between cold and hot wallets, their use cases, and how to choose the right one for your needs.
25-
- Understand the pros and cons of custodial and non-custodial wallets, and which type suits your security preferences.
26-
- Explore popular hardware wallets, their characteristics, and the importance of using them for secure key storage.
27-
- Get insights into different signing schemes such as EOAs, Multisig, Smart Contract Wallets, and more, including their use cases and security implications.
28-
- Discover various software wallets, their features, and how they can be used securely to manage cryptocurrency assets.
29-
30-
Effective wallet security is the cornerstone of cryptocurrency security, including taking physical attacks such as the wrench attack into consideration.
17+
- [Custodial vs Non-Custodial](./custodial-vs-non-custodial.md) - Comparing custodial and non-custodial wallet solutions.
18+
- [Cold vs Hot Wallet](./cold-vs-hot-wallet.md) - Understanding the security trade-offs of online and offline wallets.
19+
- [Wallets For Beginners & Small Balances](./for-beginners-&-small-balances.md) - Recommended setups for users with non-critical funds.
20+
- [Wallets For Intermediates & Medium Funds](./intermediates-&-medium-funds.md) - Security upgrades for users with significant assets.
21+
- [Multisig Wallets For Advanced Users & High Funds](./secure-multisig-best-practices.md) - Best practices for setting up and managing multisig wallets.
22+
- [Account Abstraction Wallets](./account-abstraction.md) - Exploring the security features of smart contract wallets.
23+
- [Signing & Verification](./signing-verification.md) - An overview of secure transaction signing and verification.
24+
- [Verifying Standard Transactions (EOA)](./verifying-standard-transactions.md) - How to safely verify transactions from standard wallets.
25+
- [Multisig Signing Process](./secure-multisig-signing-process.md) - Detailed guide for secure multisig transaction signing.
26+
- [Using EIP-7702](./verifying-7702.md) - Enabling smart contract features for EOAs and mitigating new risks.
27+
- [Private Key & Seed Phrase Management](./private-key-management.md) - Best practices for securing your seed phrase.
28+
- [Tools & Resources](./tools-&-resources.md) - A curated list of security tools and resources.
29+
30+
In this section you can learn:
31+
32+
- Explore wallet fundamentals, analyzing the security trade-offs of hot vs. cold wallets and the ownership implications of custodial vs. non-custodial models.
33+
- Receive guidance on choosing the right wallet for your threat model, from basic setups to advanced configurations like Multisignature (Multisig) and Account Abstraction wallets.
34+
- Master transaction verification techniques, from basic smart contract interactions to the advanced verification.
35+
- Implement security best practices for private key and seed phrase management.
36+
37+
Mastering wallet security is a critical skill for any developer, user, or organization operating in the web3 ecosystem.
3138

3239
![security](https://github.com/security-alliance/frameworks/assets/84518844/12e2cba3-f69e-4fde-85f1-8a235b9808af)
3340

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
tags:
3+
- Engineer/Developer
4+
- Security Specialist
5+
- Operations & Strategy
6+
contributors:
7+
- role: wrote
8+
users: [pinalikefruit]
9+
- role: reviewed
10+
users: [Coinspect]
11+
---
12+
13+
## Account Abstraction Wallets
14+
15+
### User Profile
16+
17+
Advanced users, developers, and organizations interested in programmable security, customizable transaction rules, and moving beyond the limitations of standard Externally Owned Accounts (EOAs) to eliminate single points of failure like seed phrase loss.
18+
19+
### Primary Goal
20+
21+
To leverage the power of smart contracts at the account level, enabling features like social recovery, gas sponsorship, batch transactions, and flexible security policies that are not possible with an EOA.
22+
23+
### Core Concept: ERC-4337
24+
25+
Account Abstraction (AA) turns a user's account into a smart contract, making it programmable. Instead of being controlled directly by a single private key, the account's logic is defined by its code. This is achieved through **ERC-4337**, a standard that enables AA without requiring changes to the core Ethereum protocol. It introduces a higher-level pseudo-transaction system with several key components:
26+
27+
* **Smart Contract Account**: The user's wallet itself is a smart contract, containing custom logic for validating transactions.
28+
* **UserOperation**: A data structure that bundles the user's intent, calldata, and signature. This object is sent to a dedicated, alternative mempool.
29+
* **Bundlers**: Specialized nodes that package multiple `UserOperation` objects from the mempool into a single transaction and submit it to the `EntryPoint` contract.
30+
* **EntryPoint**: A singleton smart contract that acts as the central orchestrator. It verifies and executes the bundled `UserOperations`, ensuring that accounts and paymasters have sufficient funds to pay for gas.
31+
* **Paymasters**: Optional smart contracts that can sponsor gas fees on behalf of the user, enabling gasless transactions for the end-user or allowing fees to be paid in ERC-20 tokens.
32+
33+
### Key Benefits & Features
34+
35+
* **Enhanced Security**:
36+
* **Social Recovery**: Mitigate the risk of losing a primary key by designating trusted "guardians" (other accounts or devices) who can collectively approve an account recovery.
37+
* **Customizable Policies**: Implement robust security rules directly into the wallet, such as daily spending limits, whitelisting trusted contracts, or requiring multisig confirmation for transactions over a certain value.
38+
39+
* **Improved User Experience**:
40+
* **Gasless Transactions**: Enjoy a smoother experience where dApps can sponsor gas fees, or pay for transactions using ERC-20 tokens instead of needing the chain's native asset (e.g., ETH).
41+
* **Simplified Interactions**: Perform complex, multi-step actions (like `approve` and `swap`) in a single, atomic transaction, reducing clicks and potential points of failure.
42+
43+
44+
### Security Considerations & Best Practices
45+
46+
* **Smart Contract Risk**: The security of an AA wallet is entirely dependent on the quality and security of its underlying smart contract code. Bugs or vulnerabilities in the account's implementation can lead to a total loss of funds. **Thorough audits of the account logic are non-negotiable.**
47+
* **Guardian Selection and Security**: The strength of the social recovery model depends on the security and independence of the guardians. They should be diverse and not susceptible to a single common threat.
48+
* **EntryPoint Centralization**: The `EntryPoint` contract is a central trust point for the entire ERC-4337 ecosystem. A vulnerability in the official `EntryPoint` could have widespread consequences. Use only the canonical, heavily audited `EntryPoint` contract.
49+
* **Paymaster and Factory Security**: Malicious or poorly coded Paymasters and Factories can introduce DoS vectors or other risks. The ERC-4337 standard includes a reputation system and staking mechanisms to throttle or ban misbehaving entities, but users should only interact with trusted and audited Paymasters.
50+
* **Gas Overhead**: The added logic in a smart contract account means that transactions can be more expensive than those from a standard EOA. This trade-off between features and cost should be considered, though it can be offset by gas sponsorship.
51+
* **Key Revocation**: If the primary signing key is compromised, the recovery process allows you to swap it out for a new one without having to move all assets to a new wallet address.
52+
* **Advanced Guardian Setups**: For enhanced security, guardian roles can be implemented using **Multi-Party Computation (MPC)**. In an MPC-based recovery, guardians hold cryptographic shares that are used collectively to authorize a recovery action. This method allows guardians to produce a valid signature through a distributed computation using their individual shares, without ever reconstructing a single master key on any device.

src/wallet-security/cold-vs-hot-wallet.md

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,65 @@
22
tags:
33
- Engineer/Developer
44
- Security Specialist
5+
- Operations & Strategy
6+
contributors:
7+
- role: wrote
8+
users: [pinalikefruit]
9+
- role: reviewed
10+
users: [Coinspect]
511
---
612

713
# Cold vs. Hot Wallets
814

15+
The primary distinction between wallet types is their connectivity to the internet. This factor dictates their security threat model, risk profile, and ideal use cases.
916

1017
## Cold Wallets
1118

1219
### What Are They?
13-
Cold wallets are offline storage solutions for cryptocurrencies. They are not connected to the internet, which makes them highly secure against online attacks.
20+
21+
Cold wallets are cryptocurrency wallets that store private keys in an offline environment. By being disconnected from the internet, or "air-gapped," by default, they provide the highest level of security against online attacks like malware and phishing.
22+
23+
Transactions are signed offline and then broadcast to the network using a connected device, ensuring the private keys are stored on device with minimal connectivity.
1424

1525
### Types of Cold Wallets
16-
- **Hardware Wallets**: Physical devices that store private keys offline.
26+
27+
- **Hardware Wallets**: Dedicated physical devices that store private keys offline and sign transactions without exposing the keys to a connected internet device.
1728
- **Paper Wallets**: Physical printouts or handwritten notes of private keys and QR codes.
18-
- **Air-Gapped Computers**: Computers that are never connected to the internet.
29+
- **Software Wallets on Air-Gapped Devices**: Standard wallet software installed on a device that is permanently disconnected from the internet, used for offline transaction signing.
1930

2031
### Use Cases
32+
2133
- **Long-Term Storage**: Ideal for storing large amounts of cryptocurrency for extended periods.
22-
- **High Security Needs**: Suitable for users who prioritize security over convenience.
34+
- **High-Security Needs**: Essential for individuals securing significant value and operating with a low risk tolerance.
2335

2436
## Hot Wallets
2537

2638
### What Are They?
27-
Hot wallets are online storage solutions for cryptocurrencies. They are connected to the internet, making them more convenient but less secure than cold wallets.
39+
40+
Hot wallets are actively and consistently connected to the internet. This connectivity makes them highly convenient for daily use but also inherently more vulnerable to online attacks.
2841

2942
### Types of Hot Wallets
43+
44+
- **Browser Wallets (Extensions)**: Software that integrates directly into a web browser, allowing seamless interaction with dApps.
3045
- **Mobile Wallets**: Apps installed on smartphones.
31-
- **Desktop Wallets**: Software installed on computers.
32-
- **Web Wallets**: Online services accessible via web browsers.
3346

3447
### Use Cases
35-
- **Daily Transactions**: Ideal for users who need quick access to their funds for transactions.
36-
- **Small Balances**: Suitable for storing smaller amounts of cryptocurrency that are used regularly.
48+
49+
- **Daily Transactions & dApp Interaction**: Perfect for users who need quick and frequent access to their funds for interacting with applications.
50+
- **Small Balances**: Suitable for storing smaller, non-critical amounts of cryptocurrency that are used regularly.
3751

3852
## Comparison
3953

40-
| Feature | Cold Wallets | Hot Wallets |
41-
|--------------------|--------------------|-------------------|
42-
| Security | High | Moderate to Low |
43-
| Convenience | Low | High |
44-
| Internet Exposure | None | Constant |
45-
| Use Case | Long-term storage | Daily transactions|
54+
| **Feature** | **Cold Wallets** | **Hot Wallets** |
55+
| :--- | :--- | :--- |
56+
| **Convenience** | Low | High |
57+
| **Use Case** | Long-term storage | Daily transactions |
58+
| **Risk** | Physical loss/damage | Online attacks, malware |
59+
60+
61+
## **Key Security Considerations**
62+
63+
Regardless of the type, non-custodial wallets place the full burden of security on the user:
4664

47-
[^gemini]: https://www.gemini.com/cryptopedia/crypto-wallets-hot-cold
65+
- **Online Vulnerabilities**: If the device they are on (computer or phone) is compromised, your assets can be stolen.
66+
- **Supply Chain Attacks**: Be cautious of both software and hardware integrity. Always download wallet software from official sources and purchase hardware wallets directly from the manufacturer to avoid receiving a tampered device.

0 commit comments

Comments
 (0)