Package com.microej.crypto.test
Class SignatureTest
- java.lang.Object
-
- com.microej.crypto.test.SignatureTest
-
public class SignatureTest extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SignatureTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidsetUpTime()voidtearDown()voidtestInvalidVerifySHA256withECDSA()Test invalid signature verification using SHA256withECDSA algorithm with every configured Elliptic Curve keyvoidtestInvalidVerifySHA256withRSA()Test invalid signature verification using SHA256withRSA algorithm with every configured RSA key sizevoidtestMalformedVerifySHA256withECDSA()Test malformed signature verification using SHA256withECDSA algorithm with every configured Elliptic Curve key: the signature is shorter than a valid one and is not DER encoded.voidtestMalformedVerifySHA256withRSA()Test malformed signature verification using SHA256withRSA algorithm with every configured RSA key size: the signature is one byte shorter than the modulus.voidtestSignSHA256withECDSA()Test signature creation using SHA256withECDSA algorithm with every configured Elliptic Curve keyvoidtestSignSHA256withRSA()Test signature creation using SHA256withRSA algorithm with every configured RSA key size.voidtestVerifySHA256withECDSA()Test signature verification using SHA256withECDSA algorithm with every configured Elliptic Curve keyvoidtestVerifySHA256withRSA()Test signature verification using SHA256withRSA algorithm with every configured RSA key size
-
-
-
Method Detail
-
setUpTime
public static void setUpTime()
-
testVerifySHA256withRSA
public void testVerifySHA256withRSA() throws java.lang.ExceptionTest signature verification using SHA256withRSA algorithm with every configured RSA key size- Throws:
java.lang.Exception
-
testInvalidVerifySHA256withRSA
public void testInvalidVerifySHA256withRSA() throws java.lang.ExceptionTest invalid signature verification using SHA256withRSA algorithm with every configured RSA key size- Throws:
java.lang.Exception
-
testMalformedVerifySHA256withRSA
public void testMalformedVerifySHA256withRSA() throws java.lang.ExceptionTest malformed signature verification using SHA256withRSA algorithm with every configured RSA key size: the signature is one byte shorter than the modulus.- Throws:
java.lang.Exception
-
testVerifySHA256withECDSA
public void testVerifySHA256withECDSA() throws java.lang.ExceptionTest signature verification using SHA256withECDSA algorithm with every configured Elliptic Curve key- Throws:
java.lang.Exception
-
testInvalidVerifySHA256withECDSA
public void testInvalidVerifySHA256withECDSA() throws java.lang.ExceptionTest invalid signature verification using SHA256withECDSA algorithm with every configured Elliptic Curve key- Throws:
java.lang.Exception
-
testMalformedVerifySHA256withECDSA
public void testMalformedVerifySHA256withECDSA() throws java.lang.ExceptionTest malformed signature verification using SHA256withECDSA algorithm with every configured Elliptic Curve key: the signature is shorter than a valid one and is not DER encoded.- Throws:
java.lang.Exception
-
testSignSHA256withRSA
public void testSignSHA256withRSA() throws java.lang.ExceptionTest signature creation using SHA256withRSA algorithm with every configured RSA key size.PKCS#1 v1.5 signing is deterministic, so the signature computed by the backend must match, byte for byte, the signature of the same data that the test material holds for the same private key.
- Throws:
java.lang.Exception
-
testSignSHA256withECDSA
public void testSignSHA256withECDSA() throws java.lang.ExceptionTest signature creation using SHA256withECDSA algorithm with every configured Elliptic Curve key- Throws:
java.lang.Exception
-
tearDown
public void tearDown()
-
-