Class RSA_KEMParameters
java.lang.Object
de.hda.fbi.ucs.eucrite.parameters.RSA_KEMParameters
- All Implemented Interfaces:
AlgorithmParameters
public class RSA_KEMParameters extends Object implements AlgorithmParameters
The parameters required for the hybrid RSA (KEM = Key Encapsulation Mechanism) scheme.
An asymmetric RSA key is used to encapsulate a randomly generated
AES
key which in turn in used to encrypt and decrypt
the data.
Since symmetric schemes are much more efficient than asymmetric schemes, this is in general more efficient than encrypting the data directly with the asymmetric key.
If you want to encrypt/decrypt data at rest with no need to exchange the key with other parties, a symmetric encryption scheme
like AES
can be used.
- Author:
- Alexander Zeier
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.hda.fbi.ucs.eucrite.parameters.AlgorithmParameters
AlgorithmParameters.Algorithm, AlgorithmParameters.Template, AlgorithmParameters.Type
-
Constructor Summary
Constructors Constructor Description RSA_KEMParameters(RSAParameters.Keysize rsaKeysize, AESParameters.Keysize aesKeysize, AESParameters.Mode mode, AESParameters.Padding padding)
-
Method Summary
Modifier and Type Method Description int
getAesKeysize()
Get the key size of the AES key.String
getMode()
Get the mode for the AES scheme.String
getPadding()
Get the padding for the AES scheme.int
getRsaKeysize()
Get the key size of the RSA key.AlgorithmParameters.Type
getType()
Return the type of the cryptographic scheme.
-
Constructor Details
-
RSA_KEMParameters
public RSA_KEMParameters(RSAParameters.Keysize rsaKeysize, AESParameters.Keysize aesKeysize, AESParameters.Mode mode, AESParameters.Padding padding)Creates a newRSA_KEMParameters
object with the givenrsaKeysize
,aesKeysize
, mode andpadding
. RSA KEM (Key Encapsulation Mechanism) is an hybrid encryption scheme using the asymmetrical RSA scheme to encrypt a symmetrical key which in turn encrypts the data.- Parameters:
rsaKeysize
- The size of the RSA key. It can be 2048, 3072 or 4096 bit.aesKeysize
- The size of the AES key. It can be 128, 192 or 256 bit.mode
- The mode used for the AES encryption.padding
- The padding used for the AES 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.
-
getRsaKeysize
public int getRsaKeysize()Get the key size of the RSA key.- Returns:
- The RSA key size.
-
getAesKeysize
public int getAesKeysize()Get the key size of the AES key.- Returns:
- The AES key size.
-
getMode
Get the mode for the AES scheme.- Returns:
- The AES mode.
-
getPadding
Get the padding for the AES scheme.- Returns:
- The AES padding.
-