Technical Field
This invention pertains to the digital currency sector, specifically addressing a hardware-based method for implementing digital currency wallets and the associated hardware wallet.
Background Technology
Existing digital currency wallets rely solely on software, storing private keys on computers or mobile devices. This approach leaves them vulnerable to attacks, increasing the risk of theft. Additionally, loss of a mobile device or data corruption can render key recovery impossible.
Invention Summary
The present invention introduces a hardware-based method for digital currency wallets, comprising:
Step S1: Instruction Handling
The hardware wallet awaits instructions from a host device:
- Upon receiving a balance query, proceed to Step S2.
- Upon receiving a transaction request, proceed to Step S3.
Step S2: Balance Query Execution
- Derive a sub-key pair using a master key (stored securely) and a predefined sub-key index via a key derivation algorithm.
- Generate an account address from the sub-public key.
- Bind the address to the sub-key index and return it to the host.
Step S3: Transaction Execution
- Generate a sub-key pair using the master key and the sub-key index from the transaction request.
- Sign the transaction data with the sub-private key.
- Generate a transaction receipt using the sub-public key and signature, then return it to the host.
The invention also provides a hardware wallet comprising:
- Receiver module: Processes host instructions.
- Secure storage: Stores the master key.
- Key generation modules: Derive sub-key pairs for balance queries/transactions.
- Address generator: Creates account addresses from sub-public keys.
- Signing module: Signs transaction data.
- Transaction receipt generator: Produces receipts for verified transactions.
- Sender module: Communicates results to the host.
Key Benefits
- Enhanced Security: Private keys remain confined within the hardware, mitigating exposure risks.
- Internal Operations: All cryptographic operations occur within the hardware, eliminating external key exposure.
Detailed Implementation
Example Workflows
Balance Query (Step S2)
- Verify the master key’s presence in secure storage.
- Generate a public key from the master key.
- Derive a sub-key pair using the current sub-key index.
- Create an account address via SHA-256 and RIPEMD-160 hashing of the sub-public key.
- Update the sub-key index and return the address-index pair.
Transaction (Step S3)
- Extract the sub-key index and transaction data (e.g., recipient address, amount).
- Generate a sub-key pair and sign the transaction using the sub-private key.
- Assemble a transaction receipt with the sub-public key and signature.
Wallet Creation/Recovery
- Creation: Generate a random seed, convert it to a mnemonic phrase, derive the master key, and store it securely.
- Recovery: Convert a mnemonic phrase back to the seed, regenerate the master key, and restore access.
Security Checks
- Mnemonic Validation: Verify checksums during recovery to ensure integrity.
- Language Support: Use language-specific dictionaries for mnemonic conversion (e.g., English, Chinese).
FAQ
Q1: How does the hardware wallet protect against physical theft?
A: The master key never leaves the device. Even if compromised, the attacker cannot extract the key due to secure storage mechanisms.
Q2: Can I recover my wallet if I lose the hardware device?
A: Yes, using the mnemonic phrase generated during setup. It allows key regeneration on a new device.
Q3: What happens if the transaction data is tampered with?
A: The signature validation will fail, as any alteration invalidates the cryptographic proof.
Conclusion
This hardware wallet solution combines robust security with user convenience, ensuring private keys remain isolated while supporting seamless transactions.
👉 Explore secure hardware wallets for enhanced digital asset protection.