Source: worked there.
You could also maybe rotate the key once in a while, but only for videos created after the rotation, and indicate the "key version" with a third field in the video ID
w.r.t encryption cost, I think AES is very cheap on modern hardware compared to the cost of SQL or the overhead of writing your app in an interpreted language.
If your encrypted value is not unique, then your encryption algorithm is broken. You have to be able to turn the encrypted value back into the unencrypted value. if you have two unique unencrypted values that result in the same encrypted value, then that essentially makes it impossible to unencrypt.
Wrong. Flipping a single plaintext bit flips all ciphertext bits with 50% probability.
>Because you aren't guaranteed uniqueness
Wrong. Encryption is bijective.
>And because the overhead for doing it that way may be too high
Wrong. Symmetric ciphers are extremely fast.