Security.Cryptography.AuthenticatedSymmetricAlgorithm
The AuthenticatedSymmetricAlgorithm abstract base class forms the base class for symmetric algorithms which support authentication as well as encryption. Authenticated symmetric algorithms produce an authentication tag in addition to ciphertext, which allows
data to be both authenticated and protected for privacy. For instance, AES with CCM or GCM chaining modes provides authentication, and therefore derive from AuthenticatedSymmetricAlgorithm.
AuthenticatedSymmetricAlgorithm derives from
System.Security.Cryptography.SymmetricAlgorithm , so all of the SymmetricAlgorithm APIs also apply to AuthenticatedSymmericAlgorithm objects.
Fields
LegalTagSizesValue 
The LegalTagSizes field is set by authenticated symmetric algorithm implementations to be the set of valid authentication tag sizes expressed in bits.

TagSizeValue 
The TagSizeValue field contains the current authentication tag size used by the authenticated symmetric algorithm, expressed in bits.

APIs
System.Byte[].aspx]
AuthenticatedData { get; set; }
Gets or sets the authenticated data buffer.
This data is included in calculations of the authentication tag, but is not included in the ciphertext. A value of null means that there is no additional authenticated data.
Get or set the IV (nonce) to use with transorms created with this object.
Exceptions:
Gets the ranges of legal sizes for authentication tags produced by this algorithm, expressed in bits.
Gets or sets the authentication tag to use when verifying a decryption operation. This value is only read for decryption operaions, and is not used for encryption operations. To find the value of the tag generated on encryption, check the Tag property of the
IAuthenticatedCryptoTransform encryptor object.
Exceptions:
int TagSize { get; set; }
Get or set the size (in bits) of the authentication tag
Exceptions:
Create an instance of the specified AuthenticatedSymmetricAlgorithm type. If the type cannot be found in
Security.Cryptography.CryptoConfig2 , Create returns null.
Parameters:
algorithm 
name of the authenticated symmetric algorithm to create 
Exceptions:
Create an authenticated encryptor using the specified key and nonce, and using the authenticated data from the property of this algorithm object.
Parameters:
rgbKey 
key to use for the encryption operation 
rgbIV 
nonce to use for the encryption operation 
Create an authenticated encryptor using the specified key, nonce, and authenticated data.
Parameters:
rgbKey 
key to use for the encryption operation 
rgbIV 
nonce to use for the encryption operation 
rgbAuthenticatedData 
optional extra authenticated data to use for the encryption operation 
Create a decryptor with the given key and nonce, using the authenticated data and authentication tag from the properties of the algorithm object.
Parameters:
rgbKey 
key to use for the decryption operation 
rgbIV 
nonce to use for the decryption operation 
Create a decryption transform with the given key, nonce, authenticated data, and authentication tag.
Parameters:
rgbKey 
key to use for the decryption operation 
rgbIV 
nonce to use for the decryption operation 
rgbAuthenticatedData 
optional extra authenticated data to use for the decryption operation 
rgbTag 
authenticated tag to verify while decrypting 
Create an encryptor using the given key and nonce, and the authenticated data from this algorithm.
Parameters:
bool ValidTagSize(int tagSize)
Determine if an authentication tag size (in bits) is valid for use with this algorithm.
Parameters:
tagSize 
authentication tag size in bits to check 