The key is not stored (apart from being used in RAM to decrypt the volume).
The encryption algorithm is chosen when the volume is created. There are many encryption modules to choose from, including aes and twofish, and a number of passphrase hash functions, including ripemd160:
Code:
ls /lib/modules/$(uname -r)/kernel/crypto
The passphrase is not stored; it is used to mount the volume. There is no need to compare the passphrase (or actual key) with anything; if it is incorrect, then the volume will not mount because the decryption will produce invalid data.
The key could be stored as a way of automating the mount, but this would seem to defeat the purpose of encrypting the drive.