Using a Versioned Key to Decrypt, SignV, and MACV
When data is encrypted, signed, or MACed using a versioned key, the resulting ciphertext contains information in its header indicating which version of the key was used. This header is 3 bytes long. During decryption or verification process, the CipherTrust Manager parses this information and applies the correct key version.
To get version 1 of the key, run:
SymmetricAlgorithm symmetricAlgorithmKeyVersion1 = (NaeRijndaelKey)nkm.GetKey(keyname + "#1");
Note
If data requires a retired key version, you will get an exception.