1. In Linux, Both dev/random and /dev/urandom could generate pseudo-random number. But before properly seeding, /dev/random will block on your read, while /dev/urandom not do so. Though /dev/urandom run faster and has no risk of hanging applications, only /dev/random is security.
The major differences between these two device, is that dev/random will calculate the entropy of pseudo-random number, and only keep those good enough numbers.
2. Seed value must be as random as possible.
since we cannot detect the decay of atom, we can collect following information instead.
3. Hash function used in cryptographic should fulfill three criteria:
Q: What is the difference between the second one and the third one.
A: In second pre-image the 'x' is fixed, and in collision resistance, we can freely choose both x and x'.
4. Passwords must be hashed, not encrypted.
5. S-box and P-box has some value in it. It was used to realize confusion and diffusion.
6. CBC is better than ECB, because in ECB, same input has same output. In CBC we need an initialization vector, which should transfer along with tag and ciphertext to the object entity.
7. In counter mode, we have a ctri(ctr1 ctr2 ...) which similar to seeds. In Galois Counter Mode, we calculate a tag to realize authentication.
8. IV should never be used again. Because:
if
c1=p1 XOR encryption func1; c2=p2 XOR encryption func1
than
c1 XOR c2 = p1 XOR p2
so
it is really dangerous to reuse IV
* The image comes from teachers slides.