Appendix A
Cryptography Assumptions and Principles

File: crypto/secassume.tex, r1697

Cryptography is a large, complex topic. However even if the details are not understood, we can still apply concepts from cryptography to design secure systems. This chapter lists some common assumptions that are made about cryptographic techniques as well as some principles that are used in designing secure systems. Although in theory the assumptions do not always hold, they are true in many practical situations (and when they are not true, it will be made clear).

A.1 Assumptions

A.1.1 Encryption

  1. Symmetric key cryptography is also called conventional or secret-key cryptography.
  2. Public key cryptography is also called asymmetric key cryptography.
  3. In symmetric key crypto, the same secret key, K, is used for encryption, E(), and decryption, D(). The secret is shared between two entities, i.e. KAB.
  4. In public key crypto, there is a pair of keys, public (PU) and private (PR). One key from the pair is used for encryption, the other is used for decryption. Each entity has their own pair, e.g. (PUA,PRA).
  5. Encrypting plaintext (or a message), P or M, with a key, produces ciphertext C, e.g. C = E(KAB,P) or C = E(PUA,M).
  6. Decrypting ciphertext with the correct key will produce the original plaintext. The decrypter will be able to recognise that the plaintext is correct (and therefore the key is correct). E.g. P = D(KAB,C) or M = D(PRA,C).
  7. Decrypting ciphertext using the incorrect key will not produce the original plaintext. The decrypter will be able to recognise that the key is wrong, i.e. the decryption will produce unrecognisable output.

A.1.2 Knowledge of Attacker

  1. All algorithms used in cryptography, e.g. encryption/decryption algorithms, hash functions, are public.
  2. An attacker knows which algorithm is being used, and any public parameters of the algorithm.
  3. An attacker can intercept any message sent across a network.
  4. An attacker does not know secret values (e.g. symmetric secret key KAB or private key PRA).
  5. Brute force attacks requiring greater than 280 operations are impossible.

A.1.3 Authentication with Symmetric Key and MACs

  1. An entity receiving ciphertext that successfully decrypts with symmetric secret key KAB knows that the original message has not been modified and that it originated at one of the owners of the secret key (i.e. A or B).
  2. An entity receiving a message with attached MAC that successfully verifies, knows that the message has not been modified and originated at one of the owners of the MAC secret key.

A.1.4 Hash Functions

  1. A cryptographic hash function, H(), takes a variable sized input message, M, and produces a fixed size, small output hash, h, i.e. h = H(M).
  2. Given a hash value, h, it is impossible to find the original message M.
  3. Given a hash value, h, it is impossible to find another message M that also has a hash value of h.
  4. It is impossible to find two messages, M and M, that have the same hash value.

A.1.5 Digital Signatures

  1. A digital signature of a message M is the hash of that message encrypted with the signers private key, i.e. S = E(PR,H(M))
  2. An entity receiving a message with an attached digital signature knows that that message originated by the signer of the message.

A.1.6 Key Management and Random Numbers

  1. A secret key can be exchanged between two entities without other entities learning its value.
  2. Any entity can obtain the correct public key of any other entity.
  3. Pseudo-random number generators (PRNG) can generate effectively true random numbers.

A.2 Principles

  1. Experience: Algorithms that have been used over a long period are less likely to have security flaws than newer algorithms.
  2. Performance: Symmetric key algorithms are significantly faster than public key algorithms.
  3. Performance: The time to complete a cryptographic operation is linearly proportional with the input data size.
  4. Key Distribution: Keys should be distributed using automatic means.
  5. Key Re-use: The more times a key is used, the greater the chance of an attacker discovering that key.
  6. Multi-layer Security: Using multiple overlapping security mechanisms can increase the security of a system.