|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.logi.crypto.Crypto
org.logi.crypto.protocols.DHKeyEx
Ancestor of Diffie-Hellman key exchange objects
Field Summary | |
protected java.math.BigInteger |
g
|
protected java.math.BigInteger |
hisPublic
|
protected boolean |
keyDecided
|
protected java.math.BigInteger |
m
|
protected java.math.BigInteger |
myPrivate
|
protected java.math.BigInteger |
myPublic
|
protected Key |
sessionKey
|
Fields inherited from class org.logi.crypto.Crypto |
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO |
Constructor Summary | |
protected |
DHKeyEx(DHKey pri,
java.lang.String keyType)
Create a new DHKeyEx object which uses the private DH key from pri . |
protected |
DHKeyEx(int n,
java.lang.String keyType)
Create a new DHKeyEx object which uses an n bit modulus and the named key type. |
Method Summary | |
boolean |
completed()
Returns true iff this end of the protocol i completed. |
int |
maxMessageSize()
Returns the maximum expected size of a message for this protocol. |
Key |
sessionKey()
Returns the key if it has been decided upon, or null otherwise. |
Methods inherited from class org.logi.crypto.Crypto |
binString, binString, equal, equalRelaxed, equalSub, fromHexNibble, fromHexString, fromString, fromString, hexString, hexString, hexString, hexString, hexString, initRandom, initRandom, makeClass, makeInt, makeLong, makeSessionKey, pastSpace, pickBits, pickBits, readBlock, readInt, writeBytes, writeBytes, writeInt |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.math.BigInteger m
protected java.math.BigInteger g
protected java.math.BigInteger myPrivate
protected java.math.BigInteger myPublic
protected java.math.BigInteger hisPublic
protected boolean keyDecided
protected Key sessionKey
Constructor Detail |
protected DHKeyEx(DHKey pri, java.lang.String keyType) throws KeyException
pri
.
KeyException
- if the key is not private.protected DHKeyEx(int n, java.lang.String keyType)
n
bit modulus and the named key type.
There are pre-computed public modulus and gnerator pairs for
values these of n
: 256, 512, 1024 usig these values
speeds things up significantly. (I am calcualting the values for
2048)
Method Detail |
public Key sessionKey()
null
otherwise.
public boolean completed()
public int maxMessageSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |