public class MuxedSKM
extends net.i2p.crypto.SessionKeyManager
| Constructor and Description |
|---|
MuxedSKM(TransientSessionKeyManager elg,
RatchetSKM ec) |
| Modifier and Type | Method and Description |
|---|---|
RatchetEntry |
consumeNextAvailableTag(net.i2p.data.PublicKey target)
EC only
|
net.i2p.data.SessionTag |
consumeNextAvailableTag(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key)
ElG only
|
net.i2p.data.SessionKey |
consumeTag(net.i2p.data.SessionTag tag) |
net.i2p.data.SessionKey |
createSession(net.i2p.data.PublicKey target)
ElG only
|
void |
createSession(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key)
ElG only
|
void |
failTags(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key,
net.i2p.crypto.TagSetHandle ts)
ElG only
|
int |
getAvailableTags(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key) |
long |
getAvailableTimeLeft(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key) |
net.i2p.data.SessionKey |
getCurrentKey(net.i2p.data.PublicKey target)
ElG only
|
net.i2p.data.SessionKey |
getCurrentOrNewKey(net.i2p.data.PublicKey target)
ElG only
|
RatchetSKM |
getECSKM() |
TransientSessionKeyManager |
getElgSKM() |
int |
getLowThreshold() |
int |
getTagsToSend() |
(package private) boolean |
preferRatchet()
Should we try the Ratchet slow decrypt before ElG slow decrypt?
Adaptive test based on previous mix of traffic for this SKM,
as reported by reportDecryptResult().
|
void |
renderStatusHTML(Writer out) |
(package private) void |
reportDecryptResult(boolean isRatchet,
boolean success)
Report the result of a slow decrypt attempt.
|
boolean |
shouldSendTags(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key)
ElG only
|
boolean |
shouldSendTags(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key,
int lowThreshold)
ElG only
|
void |
shutdown() |
void |
tagsAcked(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key,
net.i2p.crypto.TagSetHandle ts)
ElG only
|
net.i2p.crypto.TagSetHandle |
tagsDelivered(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key,
Set<net.i2p.data.SessionTag> sessionTags)
ElG only
|
void |
tagsReceived(net.i2p.data.SessionKey key,
Set<net.i2p.data.SessionTag> sessionTags)
ElG only
|
void |
tagsReceived(net.i2p.data.SessionKey key,
Set<net.i2p.data.SessionTag> sessionTags,
long expire)
ElG only
|
public MuxedSKM(TransientSessionKeyManager elg, RatchetSKM ec)
public TransientSessionKeyManager getElgSKM()
public RatchetSKM getECSKM()
boolean preferRatchet()
void reportDecryptResult(boolean isRatchet,
boolean success)
isRatchet - true for EC, false for ElGsuccess - true for successful decryptpublic net.i2p.data.SessionKey getCurrentKey(net.i2p.data.PublicKey target)
getCurrentKey in class net.i2p.crypto.SessionKeyManagerpublic net.i2p.data.SessionKey getCurrentOrNewKey(net.i2p.data.PublicKey target)
getCurrentOrNewKey in class net.i2p.crypto.SessionKeyManagerpublic void createSession(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key)
createSession in class net.i2p.crypto.SessionKeyManagerpublic net.i2p.data.SessionKey createSession(net.i2p.data.PublicKey target)
createSession in class net.i2p.crypto.SessionKeyManagerpublic net.i2p.data.SessionTag consumeNextAvailableTag(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key)
consumeNextAvailableTag in class net.i2p.crypto.SessionKeyManagerpublic RatchetEntry consumeNextAvailableTag(net.i2p.data.PublicKey target)
public int getTagsToSend()
getTagsToSend in class net.i2p.crypto.SessionKeyManagerpublic int getLowThreshold()
getLowThreshold in class net.i2p.crypto.SessionKeyManagerpublic boolean shouldSendTags(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key)
shouldSendTags in class net.i2p.crypto.SessionKeyManagerpublic boolean shouldSendTags(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key,
int lowThreshold)
shouldSendTags in class net.i2p.crypto.SessionKeyManagerpublic int getAvailableTags(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key)
getAvailableTags in class net.i2p.crypto.SessionKeyManagerpublic long getAvailableTimeLeft(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key)
getAvailableTimeLeft in class net.i2p.crypto.SessionKeyManagerpublic net.i2p.crypto.TagSetHandle tagsDelivered(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key,
Set<net.i2p.data.SessionTag> sessionTags)
tagsDelivered in class net.i2p.crypto.SessionKeyManagerpublic void tagsReceived(net.i2p.data.SessionKey key,
Set<net.i2p.data.SessionTag> sessionTags)
tagsReceived in class net.i2p.crypto.SessionKeyManagerpublic void tagsReceived(net.i2p.data.SessionKey key,
Set<net.i2p.data.SessionTag> sessionTags,
long expire)
tagsReceived in class net.i2p.crypto.SessionKeyManagerpublic net.i2p.data.SessionKey consumeTag(net.i2p.data.SessionTag tag)
consumeTag in class net.i2p.crypto.SessionKeyManagerpublic void shutdown()
shutdown in class net.i2p.crypto.SessionKeyManagerpublic void renderStatusHTML(Writer out) throws IOException
renderStatusHTML in class net.i2p.crypto.SessionKeyManagerIOExceptionpublic void failTags(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key,
net.i2p.crypto.TagSetHandle ts)
failTags in class net.i2p.crypto.SessionKeyManagerpublic void tagsAcked(net.i2p.data.PublicKey target,
net.i2p.data.SessionKey key,
net.i2p.crypto.TagSetHandle ts)
tagsAcked in class net.i2p.crypto.SessionKeyManager