热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

Chapter 2

Cryptography Foundations: Hashing, Digital Signatures, Wallets, and Key Management

Understand the cryptographic building blocks that make blockchain systems verifiable, tamper-evident, and ownership-aware.

Inside this chapter

  1. Hash Functions and Data Integrity
  2. Public Keys, Private Keys, and Signatures
  3. Wallets, Custody, and Seed Phrases
  4. Practical Example and Best Practices

Series navigation

Study the chapters in order for the smoothest path from beginner blockchain concepts to advanced architecture and production practices. Use the navigation at the bottom of each page to move chapter by chapter.

Tutorial Home

Chapter 2

Hash Functions and Data Integrity

Hash functions convert input data into a fixed-length output called a hash or digest. In blockchain, hashes help detect tampering because even a tiny input change produces a completely different output. Blocks reference previous block hashes, transactions can be summarized into Merkle roots, and content addressing in some systems also relies on hashing.

Input:  "Alice pays Bob 5"
Hash:   0x9f...ab

Input:  "Alice pays Bob 6"
Hash:   0x17...4d

This avalanche effect makes hashes useful for integrity checks, but a hash alone does not prove who created the data. That is where digital signatures matter.

Chapter 2

Public Keys, Private Keys, and Signatures

A blockchain user typically controls a private key and derives a public key or address from it. The private key is secret and is used to sign transactions. Other network participants verify the signature using the corresponding public key or address-derived mechanism. This allows the network to confirm authorization without learning the private key itself.

  • Private key: proves control and must never be exposed
  • Public key or address: used for receiving assets and verification workflows
  • Digital signature: proves a transaction was authorized by the private-key holder
Chapter 2

Wallets, Custody, and Seed Phrases

A wallet is not the same thing as the blockchain account balance itself. Assets live on-chain, while the wallet stores or manages the keys needed to control them. Wallets may be custodial, where a service provider controls the keys, or non-custodial, where the user controls the keys directly. Many wallets use a seed phrase that can regenerate a family of keys.

Security lesson: If the private key or seed phrase is lost, access to the assets may be permanently lost. If it is stolen, the attacker can usually move the assets irreversibly.
Chapter 2

Practical Example and Best Practices

Imagine a student building a simple token-transfer app. The frontend asks the wallet to sign a transaction, the user reviews the details, and the signed payload is broadcast to the network. The application never needs direct access to the private key if wallet integration is designed correctly.

Advanced teams go beyond wallet connection alone. They use hardware wallets, multi-signature approvals, secret rotation, offline signing for treasury operations, and strong incident-response processes for key compromise scenarios.

版权所有 © 2026,WithoutBook。