Package com.microej.crypto.test
Class RSACipherTest
- java.lang.Object
-
- com.microej.crypto.test.RSACipherTest
-
public class RSACipherTest extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description RSACipherTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidkeyPairArrayGeneration()Generate the RSA key pair list.voidtestRSA_OAEP_params()Test the "RSA/ECB/OAEPWithdigestAndMGF1Padding" cipher with a single-part operation containing 1 byte of input data and explicit OAEP encryption parameters.voidtestRSA_OAEPWithSHA1AndMGF1Padding_MultiPart_16bytes()Test the "RSA/ECB/OAEPWithSHA-1AndMGF1Padding" cipher with a multi-part operation containing 16 bytes of input data.voidtestRSA_OAEPWithSHA1AndMGF1Padding_SinglePart_16bytes()Test the "RSA/ECB/OAEPWithSHA-1AndMGF1Padding" cipher with a single-part operation containing 16 bytes of input data.voidtestRSA_OAEPWithSHA1AndMGF1Padding_SinglePart_1byte()Test the "RSA/ECB/OAEPWithSHA-1AndMGF1Padding" cipher with a single-part operation containing 1 byte of input data.voidtestRSA_OAEPWithSHA1AndMGF1Padding_SinglePart_lengthError()Test the "RSA/ECB/OAEPWithSHA-1AndMGF1Padding" cipher with a single-part operation containing a big input data that is expected to throw an exception.voidtestRSA_OAEPWithSHA1AndMGF1Padding_SinglePart_maxBytes()Test the "RSA/ECB/OAEPWithSHA-1AndMGF1Padding" cipher with a single-part operation containing max bytes of input data.voidtestRSA_OAEPWithSHA256AndMGF1Padding_MultiPart_16bytes()Test the "RSA/ECB/OAEPWithSHA-256AndMGF1Padding" cipher with a multi-part operation containing 16 bytes of input data.voidtestRSA_OAEPWithSHA256AndMGF1Padding_SinglePart_16bytes()Test the "RSA/ECB/OAEPWithSHA-256AndMGF1Padding" cipher with a single-part operation containing 16 bytes of input data.voidtestRSA_OAEPWithSHA256AndMGF1Padding_SinglePart_1byte()Test the "RSA/ECB/OAEPWithSHA-256AndMGF1Padding" cipher with a single-part operation containing 1 byte of input data.voidtestRSA_OAEPWithSHA256AndMGF1Padding_SinglePart_lengthError()Test the "RSA/ECB/OAEPWithSHA-256AndMGF1Padding" cipher with a single-part operation containing a big input data that is expected to throw an exception.voidtestRSA_OAEPWithSHA256AndMGF1Padding_SinglePart_maxBytes()Test the "RSA/ECB/OAEPWithSHA-256AndMGF1Padding" cipher with a single-part operation containing max bytes of input data.voidtestRSA_PKCS1Padding_MultiPart_16bytes()Test the "RSA/ECB/PKCS1Padding" cipher with a multi-part operation containing 16 bytes of input data.voidtestRSA_PKCS1Padding_SinglePart_16bytes()Test the "RSA/ECB/PKCS1Padding" cipher with a single-part operation containing 16 bytes of input data.voidtestRSA_PKCS1Padding_SinglePart_1byte()Test the "RSA/ECB/PKCS1Padding" cipher with a single-part operation containing 1 byte of input data.voidtestRSA_PKCS1Padding_SinglePart_lengthError()Test the "RSA/ECB/PKCS1Padding" cipher with a single-part operation containing a big input data that is expected to throw an exception.voidtestRSA_PKCS1Padding_SinglePart_maxBytes()Test the "RSA/ECB/PKCS1Padding" cipher with a single-part operation containing max bytes of input data.
-
-
-
Method Detail
-
keyPairArrayGeneration
public static void keyPairArrayGeneration() throws java.lang.ExceptionGenerate the RSA key pair list.- Throws:
java.lang.Exception- if the generation fails.
-
testRSA_PKCS1Padding_SinglePart_1byte
public void testRSA_PKCS1Padding_SinglePart_1byte() throws java.lang.ExceptionTest the "RSA/ECB/PKCS1Padding" cipher with a single-part operation containing 1 byte of input data.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
testRSA_PKCS1Padding_SinglePart_16bytes
public void testRSA_PKCS1Padding_SinglePart_16bytes() throws java.lang.ExceptionTest the "RSA/ECB/PKCS1Padding" cipher with a single-part operation containing 16 bytes of input data.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
testRSA_PKCS1Padding_MultiPart_16bytes
public void testRSA_PKCS1Padding_MultiPart_16bytes() throws java.lang.ExceptionTest the "RSA/ECB/PKCS1Padding" cipher with a multi-part operation containing 16 bytes of input data.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
testRSA_PKCS1Padding_SinglePart_maxBytes
public void testRSA_PKCS1Padding_SinglePart_maxBytes() throws java.lang.ExceptionTest the "RSA/ECB/PKCS1Padding" cipher with a single-part operation containing max bytes of input data.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
testRSA_PKCS1Padding_SinglePart_lengthError
public void testRSA_PKCS1Padding_SinglePart_lengthError() throws java.lang.ExceptionTest the "RSA/ECB/PKCS1Padding" cipher with a single-part operation containing a big input data that is expected to throw an exception.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
testRSA_OAEPWithSHA1AndMGF1Padding_SinglePart_1byte
public void testRSA_OAEPWithSHA1AndMGF1Padding_SinglePart_1byte() throws java.lang.ExceptionTest the "RSA/ECB/OAEPWithSHA-1AndMGF1Padding" cipher with a single-part operation containing 1 byte of input data.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
testRSA_OAEPWithSHA1AndMGF1Padding_SinglePart_16bytes
public void testRSA_OAEPWithSHA1AndMGF1Padding_SinglePart_16bytes() throws java.lang.ExceptionTest the "RSA/ECB/OAEPWithSHA-1AndMGF1Padding" cipher with a single-part operation containing 16 bytes of input data.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
testRSA_OAEPWithSHA1AndMGF1Padding_MultiPart_16bytes
public void testRSA_OAEPWithSHA1AndMGF1Padding_MultiPart_16bytes() throws java.lang.ExceptionTest the "RSA/ECB/OAEPWithSHA-1AndMGF1Padding" cipher with a multi-part operation containing 16 bytes of input data.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
testRSA_OAEPWithSHA1AndMGF1Padding_SinglePart_maxBytes
public void testRSA_OAEPWithSHA1AndMGF1Padding_SinglePart_maxBytes() throws java.lang.ExceptionTest the "RSA/ECB/OAEPWithSHA-1AndMGF1Padding" cipher with a single-part operation containing max bytes of input data.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
testRSA_OAEPWithSHA1AndMGF1Padding_SinglePart_lengthError
public void testRSA_OAEPWithSHA1AndMGF1Padding_SinglePart_lengthError() throws java.lang.ExceptionTest the "RSA/ECB/OAEPWithSHA-1AndMGF1Padding" cipher with a single-part operation containing a big input data that is expected to throw an exception.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
testRSA_OAEPWithSHA256AndMGF1Padding_SinglePart_1byte
public void testRSA_OAEPWithSHA256AndMGF1Padding_SinglePart_1byte() throws java.lang.ExceptionTest the "RSA/ECB/OAEPWithSHA-256AndMGF1Padding" cipher with a single-part operation containing 1 byte of input data.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
testRSA_OAEPWithSHA256AndMGF1Padding_SinglePart_16bytes
public void testRSA_OAEPWithSHA256AndMGF1Padding_SinglePart_16bytes() throws java.lang.ExceptionTest the "RSA/ECB/OAEPWithSHA-256AndMGF1Padding" cipher with a single-part operation containing 16 bytes of input data.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
testRSA_OAEPWithSHA256AndMGF1Padding_MultiPart_16bytes
public void testRSA_OAEPWithSHA256AndMGF1Padding_MultiPart_16bytes() throws java.lang.ExceptionTest the "RSA/ECB/OAEPWithSHA-256AndMGF1Padding" cipher with a multi-part operation containing 16 bytes of input data.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
testRSA_OAEPWithSHA256AndMGF1Padding_SinglePart_maxBytes
public void testRSA_OAEPWithSHA256AndMGF1Padding_SinglePart_maxBytes() throws java.lang.ExceptionTest the "RSA/ECB/OAEPWithSHA-256AndMGF1Padding" cipher with a single-part operation containing max bytes of input data.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
testRSA_OAEPWithSHA256AndMGF1Padding_SinglePart_lengthError
public void testRSA_OAEPWithSHA256AndMGF1Padding_SinglePart_lengthError() throws java.lang.ExceptionTest the "RSA/ECB/OAEPWithSHA-256AndMGF1Padding" cipher with a single-part operation containing a big input data that is expected to throw an exception.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
testRSA_OAEP_params
public void testRSA_OAEP_params() throws java.lang.ExceptionTest the "RSA/ECB/OAEPWithdigestAndMGF1Padding" cipher with a single-part operation containing 1 byte of input data and explicit OAEP encryption parameters.- Throws:
java.lang.Exception- if the encryption or decryption fails.
-
-