|
Bouncy Castle Cryptography Library 1.86 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.bouncycastle.crypto.test.HPKETestVectors
| Constructor Summary | |
HPKETestVectors()
|
|
| Method Summary | |
void |
testAuthOneShotPairwise()
|
void |
testAuthPairwise()
|
void |
testBaseOneShotPairwise()
|
void |
testBasePairwise()
|
void |
testOpenFailureDoesNotAdvanceSequence()
RFC 9180 sec. 5.2 advances the sequence number only after a successful Seal/Open. |
void |
testPQKemAuthModesUnsupported()
|
void |
testPQKemBaseOneShotPairwise()
|
void |
testPQKemDeriveKeyPair()
|
void |
testPQKemPSKPairwise()
|
void |
testPQKemSerialization()
|
void |
testSealOnExportOnlyLeavesContextUsable()
The sender side has the same contract: a failed seal must not consume a sequence number. |
void |
testSendReceiveExportOnlySuite()
Export is the whole point of the export-only suite, which has no cipher to seal with, so the one-shot export pair has to work there. |
void |
testSendReceiveExportPairwise()
The one-shot secret export pair (RFC 9180 sec. 5.3), which had no caller anywhere in the tree and so no coverage at all: HPKE.sendExport(org.bouncycastle.crypto.params.AsymmetricKeyParameter, byte[], byte[], int, byte[], byte[], org.bouncycastle.crypto.AsymmetricCipherKeyPair) sets up a sender context and returns
the encapsulation alongside the exported secret, and HPKE.receiveExport(byte[], org.bouncycastle.crypto.AsymmetricCipherKeyPair, byte[], byte[], int, byte[], byte[], org.bouncycastle.crypto.params.AsymmetricKeyParameter) rebuilds the
matching context from that encapsulation and must produce the same bytes. |
void |
testVectors()
|
void |
testXWingHPKEVector()
|
| Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
| Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public HPKETestVectors()
| Method Detail |
public void testBaseOneShotPairwise()
throws java.lang.Exception
java.lang.Exception
public void testAuthOneShotPairwise()
throws java.lang.Exception
java.lang.Exception
public void testSendReceiveExportPairwise()
throws java.lang.Exception
HPKE.sendExport(org.bouncycastle.crypto.params.AsymmetricKeyParameter, byte[], byte[], int, byte[], byte[], org.bouncycastle.crypto.AsymmetricCipherKeyPair) sets up a sender context and returns
the encapsulation alongside the exported secret, and HPKE.receiveExport(byte[], org.bouncycastle.crypto.AsymmetricCipherKeyPair, byte[], byte[], int, byte[], byte[], org.bouncycastle.crypto.params.AsymmetricKeyParameter) rebuilds the
matching context from that encapsulation and must produce the same bytes. Both dispatch on
the mode the HPKE instance was built with, so all four are exercised here - the psk and
auth arguments are only consulted by the modes that need them.
java.lang.Exception
public void testSendReceiveExportOnlySuite()
throws java.lang.Exception
java.lang.Exception
public void testOpenFailureDoesNotAdvanceSequence()
throws java.lang.Exception
java.lang.Exception
public void testSealOnExportOnlyLeavesContextUsable()
throws java.lang.Exception
java.lang.Exception
public void testBasePairwise()
throws java.lang.Exception
java.lang.Exception
public void testAuthPairwise()
throws java.lang.Exception
java.lang.Exception
public void testPQKemBaseOneShotPairwise()
throws java.lang.Exception
java.lang.Exception
public void testPQKemPSKPairwise()
throws java.lang.Exception
java.lang.Exception
public void testPQKemSerialization()
throws java.lang.Exception
java.lang.Exception
public void testPQKemDeriveKeyPair()
throws java.lang.Exception
java.lang.Exception
public void testPQKemAuthModesUnsupported()
throws java.lang.Exception
java.lang.Exception
public void testXWingHPKEVector()
throws java.lang.Exception
java.lang.Exception
public void testVectors()
throws java.lang.Exception
java.lang.Exception
|
Bouncy Castle Cryptography Library 1.86 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||