Public Key Cryptography, Digital Signatures

Demo: Signature Verification

  • Click the right arrow to verify the signature
  • Go back, change or remove any part of this (public key, content, signature), and verify again; the signature will be detected as INVALID.

Okay, but who said that?

Unless we know whose key that is, the whole thing is vapid. (A robot can sign, but a robot can't get me to vouch for its humanity;)

Crypto Keys are Cryptic

Unlike the usernames and passwords we're used to, public/private cryptographic key pairs are long and cryptic and can't practically be spoken or memorized. This is why we use QR codes (or occasionally copy/paste) to communicate them.

Sample public key

sample public key
{
  "crv": "Ed25519",
  "kty": "OKP",
  "x": "rHT5B3q3rBCtNUaSBwT7DxT2Y0Q6fgvmhNKbVhJ_BtQ"
}
        

Sample public/private key pair

(We don't scan each other's private keys)

{
  "crv": "Ed25519",
  "kty": "OKP",
  "x": "rHT5B3q3rBCtNUaSBwT7DxT2Y0Q6fgvmhNKbVhJ_BtQ",
  "d": "_MaCrtWx2jHTOrujWXVeihaBBJHF09QUxzwnk6GGiEQ"
}
        

They come in Pairs

Lose your private key and your public key is now abandoned. You'll have to get a new key pair, can't just replace the private key. (We address this with the "replace" statement.)

Hash codes, Tokens

Consider a hash code of data as a keyless signature. A hash is short regardless of the amount of data. That's why we use them as tokens for keys as well as of statements.
We hash keys to locate where their statements can be retrieved.
We hash statements to identify them uniquely when forming a chain of statements to prevent backdating and to identify the last valid statement signed by a revoked key.