Nightforce Learning Center

Hashes, keys, signatures, and encryption

Sign in with Discord

Introduction

Blockchains use several tools to check whether information changed, who approved it, and who can read it.

What you’ll learn

Tell hashes, signatures, and encryption apart and explain what each can establish.

Lesson

A hash is a fixed-size digest derived from data. You can hash a file now and compare the result with a digest saved earlier. Matching digests give evidence that the file bytes match under the assumptions of the hash function. The digest does not identify the author. If the possible inputs are easy to guess, someone can test guesses by hashing them. A password salt helps make precomputed guesses harder to reuse across accounts. Password storage also requires a purpose-built password hashing function and appropriate settings.

A key pair contains a secret private key and a mathematically related public key. With a signature scheme, the private key signs and the public key verifies. The signature gives evidence that someone with access to the key approved the exact message. Linking that key to a specific person or organization requires separate evidence. If a device or key was compromised, signature verification can still succeed.

Encryption serves a different purpose. An appropriate encryption scheme can protect a message so that a recipient with the right decryption key can read it. A signature can be verified while the signed content remains readable. A protocol may also use a nonce, such as a sequence number or one-time challenge, to distinguish operations. Replay protection requires rules that check when the nonce is valid or has already been used.

Worked example. Nightforce records a hash of the equipment agreement, signs the approved version, and sends a confidential copy to Artforce using encryption. A later reviewer can compare the file against the recorded digest, verify authorization against a trusted signing key, and assess separately who was given decryption access. A public timestamped hash can support evidence that matching data existed by the time it was recorded. It says little about who created the document or what happened to copies.

Practice quiz

Select one answer per question.

Answer key and explanations
  1. C. Verification fails because the signed bytes changed.
  2. A. Use encryption suited to the recipient and delivery method.
  3. B. An observer can hash candidate values and compare the results.

Sign in with Discord to take this quiz and earn your badge.