SymmetricAlgorithmBase

SymmetricAlgorithmBase


Provides a common base of functionality for SymmetricAlgorithm derived classes.


Remarks

The base class implements many of the details necessary for implementing a Symmetric Cryptographic Algorithm. By utilizing the base class the implementor can quickly provide a new implementation that is consistent with the existing implementations without the need to manage lower level details.

See Also

Project VBCorLib Overview

Public:

Properties:

NameDescription
 BlockSize (get)Returns the currently set block size in bits. 
 BlockSize (let)Sets the current block size to be used. 
 FeedbackSize (get)Returns the current feedback size in bits. 
 FeedbackSize (let)Sets the current feedback size in bits to be used. 
 KeySize (get)Returns the currently set key size to be used. 
 KeySize (let)Sets the new key size value to be used. 
 LegalBlockSizes (get)Returns a list of legal block sizes. 
 LegalKeySizes (get)Returns a list of legal key sizes. 
 Mode (get)Returns the current cipher mode to be used. 
 Mode (let)Sets the cipher mode to be used. 
 Padding (get)Returns the current padding to be used. 
 Padding (let)Sets the padding mode to be used. 

Methods:

NameDescription
 AddLegalBlockSizeAdds a new KeySizes object with the supplied values to the list of legal block sizes. 
 AddLegalKeySizeAdds a new KeySizes object with the supplied values to the list of legal key sizes. 
 ClearClears the IV and Key values. 
 CloneRgbIVReturns a clone of an IV. 
 CloneRgbKeyReturns a clone of a key. 
 GenerateIVGenerates a random IV value. 
 GenerateKeyGenerates a new random key. 
 GetIVReturns the current IV value. 
 GetKeyReturns the current secret key. 
 SetIVSets the current IV value. 
 SetKeySets the current secret key. 
 ValidKeySizeChecks if a bit length is a valid key size in bits. 

Events:

NameDescription
 CheckForWeakKeyUsed for implementations that must check for some kind of weak or semi-weak key.