You can define referential integrity constraints between two encrypted columns when:
Both referencing and referenced columns are encrypted.
The referenced and referencing column are encrypted with the same key.
The key used to encrypt the columns specifies init_vector NULL and random pad NULL.
Referential integrity checks are efficient because they are performed on ciphertext values.