Foundations Flashcards
(11 cards)
What is fermats little theorem
a^p = a mod p
a^(p-1) = 1 mod p
What is the public key pair for RSA
And what are they
(n, e)
n=pq
e is between 0 and (p-1)(q-1)
It is coprime of (p-1)(q-1)
What is the private key for RSA
d
de = 1 mod (p-1)(q-1)
How do you encrypt a message M
Encrypted message = M^e mod n
n is larger than M
How do you decrypt a message c
M = c^d mod n
What’s the difference between combinations and permutations
Permutations care about the order of the set, combinations don’t
Think of it like a permutation padlock
What is the equation for possible combinations of K numbers into a set size N if the order matters
(permutation)
n! / (n - k)!
What is the equation for picking a set of size n from k values when the order doesn’t matter
(combination)
n! / k!(n - k)!
How do you find the expected value of a random variable
For P(X=x)
Sun all the x(probability of x)
E.g 0(0.3) +1(0.25)+2(0.03) etc
What is the variance of a random variable
Var(x) = e(x2) - e(x)2
How do you find standard deviation of a random variable
Root(var(x))