class EstablishState
extends java.lang.Object
Alice contacts Bob ========================================================= Message 1 (Session Request): X+(H(X) xor Bob.identHash)-----------------------------> Message 2 (Session Created): <----------------------------------------Y+E(H(X+Y)+tsB, sk, Y[239:255]) Message 3 (Session Confirm A): E(sz+Alice.identity+tsA+padding+S(X+Y+Bob.identHash+tsA+tsB), sk, hX_xor_Bob.identHash[16:31])---> Message 4 (Session Confirm B): <----------------------E(S(X+Y+Alice.identHash+tsA+tsB)+padding, sk, prev) Key: X, Y: 256 byte DH keys H(): 32 byte SHA256 Hash E(data, session key, IV): AES256 Encrypt S(): 40 byte DSA Signature tsA, tsB: timestamps (4 bytes, seconds since epoch) sk: 32 byte Session key sz: 2 byte size of Alice identity to followAlternately, when Bob receives a connection, it could be a check connection (perhaps prompted by Bob asking for someone to verify his listener). check connections are formatted per isCheckInfo() NOTE: Check info is unused.
修飾子とタイプ | フィールド | 説明 |
---|---|---|
protected net.i2p.router.transport.ntcp.EstablishState.State |
_state |
|
static net.i2p.router.transport.ntcp.EstablishState.FailedEstablishState |
FAILED |
|
static net.i2p.router.transport.ntcp.EstablishState.VerifiedEstablishState |
VERIFIED |
コンストラクタ | 説明 |
---|---|
EstablishState(RouterContext ctx,
NTCPTransport transport,
NTCPConnection con) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
void |
close(java.lang.String reason,
java.lang.Exception e) |
Release resources on timeout.
|
java.lang.String |
getError() |
|
java.lang.Exception |
getException() |
|
byte[] |
getExtraBytes() |
if complete, this will contain any bytes received as part of the
handshake that were after the actual handshake.
|
boolean |
getFailedBySkew() |
Was this connection failed because of clock skew?
|
boolean |
isComplete() |
If synchronized on this, fails with
deadlocks from all over via CSFI.isEstablished().
|
boolean |
isCorrupt() |
did the handshake fail for some reason?
|
void |
prepareOutbound() |
We are Alice.
|
void |
receive(java.nio.ByteBuffer src) |
parse the contents of the buffer as part of the handshake.
|
java.lang.String |
toString() |
public static final net.i2p.router.transport.ntcp.EstablishState.VerifiedEstablishState VERIFIED
public static final net.i2p.router.transport.ntcp.EstablishState.FailedEstablishState FAILED
protected net.i2p.router.transport.ntcp.EstablishState.State _state
public EstablishState(RouterContext ctx, NTCPTransport transport, NTCPConnection con)
public void receive(java.nio.ByteBuffer src)
public boolean getFailedBySkew()
public boolean isCorrupt()
public boolean isComplete()
public void prepareOutbound()
public byte[] getExtraBytes()
public void close(java.lang.String reason, java.lang.Exception e)
e
- may be nullpublic java.lang.String getError()
public java.lang.Exception getException()
public java.lang.String toString()
toString
クラス内 java.lang.Object