public class NTRULPRimeTest
extends junit.framework.TestCase
| Constructor and Description |
|---|
NTRULPRimeTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
testImplicitRejection()
A ciphertext changed anywhere decapsulates, by implicit rejection, to the secret the reference derives from rho
and the received ciphertext, SHA-512(0 | rho | ciphertext)[0:32], rather than the encapsulated one.
|
void |
testKEM() |
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toStringpublic void testKEM()
throws java.lang.Exception
java.lang.Exceptionpublic void testImplicitRejection()
The secret used to be derived with prefix 1, as for a valid ciphertext, and from the re-encrypted ciphertext, which depends only on the decrypted r, so ciphertexts that decrypt to the same r - such as two that differ only in the confirmation hash - shared a rejection secret, telling an attacker so.