public class ECGKeyExchangeTest
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private ECKey |
aliceKey |
private ECPrivateKeyParameters |
alicePriKey |
private ECPublicKeyParameters |
alicePubKey |
private ECKey |
bobKey |
private ECPrivateKeyParameters |
bobPriKey |
private ECPublicKeyParameters |
bobPubKey |
private ECKeyParam |
param |
private APrioriInfo |
priorInfo |
Constructor and Description |
---|
ECGKeyExchangeTest() |
Modifier and Type | Method and Description |
---|---|
void |
KeyExchangeInitiator()
A test which verifies that the recipient receives the signed public key
from the initiator correctly and that the public key received matches
the original key sent.
|
void |
keyExchangeRecipient()
A test which verifies that the initiator receives the signed public key
from the recipient correctly and that the public key received matches the
original key sent.
|
void |
manInMiddleAttackVer1()
"Man in the middle attack" test version 1, where an attacker intercepts Alice's key
and tries to sign it using his own shared information S1/S2.
|
void |
manInMiddleAttackVer2()
"Man in the middle attack" test version 2, where an attacker intercepts Alice's key
and tries to sign it using his own shared information S1/S2.
|
void |
setUp()
Setup the key exchange test:
- set default a priori shared info, S1/S2
- create alice's public/private keypair
- create bob's public/private keypair
|
void |
signNoSharedInfo()
Test which verifies that an exception is thrown when the a priori shared information
S1 and S2 is not specified (empty)
Depends on APrioriInfoTest.noSharedInfo, APrioriInfoTest.oneSharedInfo
|
private APrioriInfo priorInfo
private ECKeyParam param
private ECKey aliceKey
private ECKey bobKey
private ECPublicKeyParameters alicePubKey
private ECPublicKeyParameters bobPubKey
private ECPrivateKeyParameters alicePriKey
private ECPrivateKeyParameters bobPriKey
public void setUp() throws java.lang.Exception
java.lang.Exception
public void KeyExchangeInitiator()
public void keyExchangeRecipient()
public void signNoSharedInfo()
public void manInMiddleAttackVer1()
public void manInMiddleAttackVer2()