Class AESParameters
java.lang.Object
de.hda.fbi.ucs.eucrite.parameters.AESParameters
- All Implemented Interfaces:
AlgorithmParameters
public class AESParameters extends Object implements AlgorithmParameters
The parameters required for the AES symmetrical encryption scheme. It can be used to encrypt and decrypt data
with a single, secret key. Whoever has this key is able to decrypt the encrypted data. Therefore, the key must be stored
in a secure way.
AES can be used for example to encrypt data on storage. If you want to encrypt messages, you should use a hybrid scheme
(see RSA_KEMParameters
or McEliece_KEMParameters
), where an asymmetric key is used in addition
to encrypt and share the secret key with the receiver of the message.
- Author:
- Alexander Zeier
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AESParameters.Keysize
The keysize determines the security of the AES encryption, but also the performance.static class
AESParameters.Mode
The operating mode determines how data that is longer than a single block is chained together.static class
AESParameters.Padding
The padding scheme determines how an incomplete block (that does not reach the full block length) is filled with additional bytes to make a complete block.Nested classes/interfaces inherited from interface de.hda.fbi.ucs.eucrite.parameters.AlgorithmParameters
AlgorithmParameters.Algorithm, AlgorithmParameters.Template, AlgorithmParameters.Type
-
Constructor Summary
Constructors Constructor Description AESParameters(AESParameters.Keysize keySize, AESParameters.Mode mode, AESParameters.Padding padding)
-
Method Summary
Modifier and Type Method Description int
getKeySize()
Returns the AES key size.String
getMode()
Returns the mode.String
getPadding()
Returns the padding scheme.AlgorithmParameters.Type
getType()
Return the type of the cryptographic scheme.
-
Constructor Details
-
AESParameters
public AESParameters(AESParameters.Keysize keySize, AESParameters.Mode mode, AESParameters.Padding padding)Creates a newAESParameters
object with the givenkeySize
,mode
andpadding
scheme. AES is an symmetrical encryption scheme.- Parameters:
keySize
- The size of the AES key. It can be 128, 192 or 256 bit.mode
- The mode used for encryption.padding
- The padding scheme used for encryption.
-
-
Method Details
-
getType
Description copied from interface:AlgorithmParameters
Return the type of the cryptographic scheme.- Specified by:
getType
in interfaceAlgorithmParameters
- Returns:
- The type of the cryptographic scheme.
-
getMode
Returns the mode.- Returns:
- The encryption mode.
-
getKeySize
public int getKeySize()Returns the AES key size.- Returns:
- The size of the AES key.
-
getPadding
Returns the padding scheme.- Returns:
- The padding scheme.
-