org.bouncycastle.crypto.test
Class XDHAgreementFailureTest
java.lang.Object
org.bouncycastle.util.test.SimpleTest
org.bouncycastle.crypto.test.XDHAgreementFailureTest
- All Implemented Interfaces:
- Test
- public class XDHAgreementFailureTest
- extends SimpleTest
An X25519 / X448 agreement with a low-order peer key yields the all-zero secret and is refused. The caller's output
buffer must be left as it was, so a caller that mishandles the exception does not end up holding an all-zero
"shared secret" that anyone can predict.
| Methods inherited from class org.bouncycastle.util.test.SimpleTest |
areEqual, areEqual, areEqual, fail, fail, fail, isEquals, isEquals, isEquals, isEquals, isEquals, isEquals, isEquals, isTrue, isTrue, perform, runTest, runTest, runTests, runTests, testException |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XDHAgreementFailureTest
public XDHAgreementFailureTest()
getName
public java.lang.String getName()
- Specified by:
getName in interface Test- Specified by:
getName in class SimpleTest
performTest
public void performTest()
throws java.lang.Exception
- Specified by:
performTest in class SimpleTest
- Throws:
java.lang.Exception
main
public static void main(java.lang.String[] args)