Hashing in der Blockchain
Unveränderlichkeit durch Hashes
Hashing in der Blockchain ist eine kostenlose Web3 & DApp Development Fundamentals-Lektion auf CoddyKit. Dies ist Lektion 3 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Web3 & DApp Development Fundamentals-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Web3 & DApp Development Fundamentals-Kurs umfasst insgesamt 4 Lektionen.
Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.
What Is a Hash Function?
A hash function takes any input and produces a fixed-size output called a digest or hash.
Blockchains rely on cryptographic hash functions like SHA-256 (Bitcoin) and Keccak-256 (Ethereum).
sha256("hello") =
2cf24dba5fb0a30e26e83b2ac5b9e29e
1b161e5c1fa7425e73043362938b9824Deterministic Output
Hashing is deterministic: the same input always yields the same output.
This lets any node independently verify a hash and arrive at the identical result — essential for distributed agreement.
The Avalanche Effect
A tiny change in the input produces a completely different hash. This is the avalanche effect.
Notice how changing one letter changes the entire digest:
sha256("blockchain") -> ef7797e13d3a...
sha256("Blockchain") -> 3f1d8b9c2a04...
(totally different)Fixed Output Size
No matter how large the input, the output is always the same length. SHA-256 always returns 256 bits (64 hex characters).
This makes hashes convenient, compact identifiers for blocks, transactions, and state.
Preimage Resistance
A good hash function is one-way: given a hash, you cannot feasibly find the input that produced it.
This preimage resistance is why hashes can safely commit to data without revealing it.
Collision Resistance
Collision resistance means it is infeasible to find two different inputs with the same hash.
If collisions were easy, an attacker could swap one block or transaction for another that shares the same hash — destroying the chain's integrity.
Hashes Create the Chain Link
Recall that each block stores the hash of the previous block. Because hashing is deterministic and collision-resistant, this link is secure.
Altering an old block changes its hash, breaking the chain at that point.
block.hash = keccak256(
block.previousHash +
block.merkleRoot +
block.timestamp +
block.nonce
)Immutability Through Hashing
Immutability emerges from chained hashes. To change block 100, you must recompute block 100's hash, then 101, 102, and every block after it.
In a proof-of-work chain, that also means redoing all of their mining — practically impossible.
Hash Pointers
A hash pointer is a reference to data plus the hash of that data. If the data is tampered with, the stored hash no longer matches.
Blockchains are essentially linked lists built from hash pointers.
struct HashPointer {
location: address-of-block
hash: expected-hash-of-block
}Addresses and Hashing
Hashing also generates account addresses. An Ethereum address is derived by hashing the public key with Keccak-256 and keeping the last 20 bytes.
So hashing is woven through identity as well as integrity.
address = last20bytes(
keccak256(publicKey)
)Putting It Together
Cryptographic hashing gives blockchains their core guarantees: deterministic verification, tamper-evidence, compact identifiers, and immutability.
Every block link, Merkle root, and address depends on it.
Quick Check
Test your hashing knowledge.
Recap: Hashing in Blockchain
You learned that:
- Hash functions are deterministic and produce fixed-size output
- The avalanche effect means tiny changes alter the whole hash
- Preimage and collision resistance secure the chain
- Chained hashes create immutability
Next: how this data is shared across a distributed ledger.
Häufig gestellte Fragen
Ist die Lektion „Hashing in der Blockchain“ kostenlos?
Ja — der vollständige Text von „Hashing in der Blockchain“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Web3 & DApp Development Fundamentals-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Web3 & DApp Development Fundamentals-Kurs umfasst insgesamt 4 Lektionen.
Was lerne ich in „Hashing in der Blockchain“?
Unveränderlichkeit durch Hashes Du übst Web3 & DApp Development Fundamentals mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.
Brauche ich Erfahrung, um Web3 & DApp Development Fundamentals zu starten?
Keine Vorkenntnisse erforderlich. Web3 & DApp Development Fundamentals auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 3 von 4.
Wie lange dauert die Lektion „Hashing in der Blockchain“?
Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.
Kann ich in dieser Web3 & DApp Development Fundamentals-Lektion Code schreiben und ausführen?
Ja. Jede Web3 & DApp Development Fundamentals-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.
Alle Lektionen in diesem Kurs
- Blöcke und Chains
- Merkle-Bäume
- Hashing in der Blockchain
- Verteilte Ledger