Password combinatorics
- total number of possible passwords
- size of the character set
- password length in characters
Every formula across the unit, grouped by module. Every symbol is named — a formula with an unexplained variable is not revision material.
H, not N, is what the lecture and this site mean by "strength" - bits of uncertainty, not a raw count of passwords.
The same formula as password entropy, with a word standing in for a character and the wordlist standing in for the character set.
The same formula gives the leading special-bits digit, with r -> SUID (4), w -> SGID (2), x -> sticky (1).
There is no remainder when a is divided by b.
gcd(a, 0) = |a|, and gcd(0, 0) is defined to be 0.
For negative a, q rounds toward negative infinity, not toward zero — that is what keeps r non-negative.
a ≡ 0 (mod n) if and only if n | a.
Reduce before combining or after — addition, subtraction and multiplication all give the same answer either way.
The smallest non-negative member of a class is the one normally used to name it.
x and y are not unique, but the algorithm always produces one valid pair.
A solution for x exists if and only if gcd(a, n) = 1.
This factorisation is unique: there is exactly one way to write a as a product of prime powers.
A special case of Euler's theorem below, with n = p and phi(p) = p - 1.
phi(p) = p - 1 for prime p, since every integer from 1 to p-1 is coprime to p.
This is the identity RSA key generation runs directly: n = pq, phi(n) = (p-1)(q-1).
Alternative form: a^{phi(n)+1} = a (mod n). Setting n = p prime recovers Fermat's little theorem.
The order always divides phi(p) = p - 1.
A primitive root's powers g^1, g^2, ..., g^{p-1} run through every nonzero residue mod p exactly once before repeating.
Computing y from g, x, p is fast (square-and-multiply); recovering x from g, y, p has no known fast general method.
Closure, associativity, identity, inverse. Add commutativity (a+b=b+a) and the group is abelian.
Multiplication must be closed and associative, and distribute over addition. Neither a multiplicative identity nor multiplicative commutativity is required.
A ring where multiplication is also commutative.
A field is a commutative ring where every nonzero element has a multiplicative inverse. Z is not a field; Q is.
Also written F_p. Characteristic p is the smallest number of copies of any element that sum to 0.
Built from GF(p) by adjoining the roots of a degree-n irreducible polynomial over GF(p).
Cannot be factored into lower-degree polynomials with coefficients in GF(2), which is what makes it irreducible over GF(2).
In binary: 100011011, or 0x11B.
In symmetric cryptography k_e = k_d, or k_d is trivially derivable from k_e. In asymmetric cryptography neither holds.
Every letter uses the same shift n: one fixed rule for the whole message, which is exactly what frequency analysis exploits.
A 26-letter alphabet gives 26 possible shifts, of which the shift of 0 does nothing to the plaintext, so 25 keys actually change the message.
i mod L cycles the key to match however long the plaintext is; +26 before the mod in decryption keeps the result non-negative.
Grows exponentially with key length: a 3-letter key already gives 26^3 = 17,576 possible keys, far more than Caesar's 26, but still small enough that a short key is worth attacking directly, which is exactly what the Kasiski examination does.
XOR is its own inverse, so encryption and decryption are the same operation.
The key cancels out completely, because K XOR K is all zeros.
DES has eight S-boxes addressed this way. S[0] is worked in full below.
Worst case tries the full 2^56; on average a hit comes after trying half the keyspace.
The unit teaches these as the effective strengths. See the discrepancy noted below for what NIST rates instead.
The lecture works the AES-128 case only: w = 4(10+1) = 44 words, 176 bytes. The same formula gives 52 words for AES-192 and 60 for AES-256.
Every AES byte operation — SubBytes and MixColumns — is arithmetic in this field.
No chain-in at all. Every block is encrypted exactly as if it were the only block in the message.
The first block has no previous ciphertext, so C_{-1} is replaced by the IV.
Every block of ciphertext is already available before decryption starts, unlike encryption, which must run in order.
Every block's keystream depends only on the nonce and its own counter value, never on another block's ciphertext. This is what lets CTR parallelise.
Every output has a unique inverse; computing it just is not feasible without extra information.
Every public-key cryptosystem in this module is one instance of this idea.
Finding x given p, g and y is believed infeasible for a large enough p.
Finding m given c, e and n is believed infeasible for certain n.
Public key PU = {e, n}. Private key PR = {d, n}.
The shortcut used throughout RSA key generation — see 04-04 for the general definition of phi.
The attacker never learns d and never sees m directly, but recovers m from the decrypted (c')^d by dividing out r.
K = g^(ab) mod p either way the exponents are applied, which is why the two sides agree without ever sending a or b.
Over the reals (no modulus) this is the same equation and gives the familiar smooth curve used for the geometric picture of point addition.
A different equation from the prime-field case, not the same one with a different modulus. Addition and subtraction in GF(2^m) both reduce to XOR.
Finding k given only P and Q is believed harder, bit for bit, than the classical discrete logarithm problem, which is why ECC keys are shorter than RSA or Diffie-Hellman keys for the same security level.
The same commutativity trick as classical Diffie-Hellman, with scalar point multiplication standing in for modular exponentiation.
A 256-bit key offers security comparable to a 128-bit key against a quantum adversary, per the lecture. Doubling key sizes is the stated mitigation.