Bouncy Castle Cryptography Library 1.86

org.bouncycastle.pqc.crypto.test
Class FrodoKEMConcurrencyTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.bouncycastle.pqc.crypto.test.FrodoKEMConcurrencyTest
All Implemented Interfaces:
junit.framework.Test

public class FrodoKEMConcurrencyTest
extends junit.framework.TestCase

A FrodoKEMExtractor holds one FrodoKEMEngine for its lifetime, so the engine must not carry mutable state across a call. It used to keep a single SHAKE instance in a field: two threads extracting through one extractor interleaved their absorb/squeeze phases, which produced wrong shared secrets and threw . The digest is now built per call, as CMCEEngine's already was.

The generator side is exercised too, since FrodoKEMGenerator builds an engine per call but its KEM keys and parameters are shared.


Constructor Summary
FrodoKEMConcurrencyTest()
           
 
Method Summary
 void testConcurrentEncapsulation()
           
 void testConcurrentExtraction()
           
 
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

FrodoKEMConcurrencyTest

public FrodoKEMConcurrencyTest()
Method Detail

testConcurrentExtraction

public void testConcurrentExtraction()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testConcurrentEncapsulation

public void testConcurrentEncapsulation()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

Bouncy Castle Cryptography Library 1.86