Package net.i2p.router.crypto.ratchet
Class MuxedSKM
java.lang.Object
net.i2p.crypto.SessionKeyManager
net.i2p.router.crypto.ratchet.MuxedSKM
Both.
- Since:
- 0.9.44
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconsumeNextAvailableTag(PublicKey target) EC onlyconsumeNextAvailableTag(PublicKey target, SessionKey key) ElG onlyconsumeTag(SessionTag tag) Determine if we have received a session key associated with the given session tag, and if so, discard it (but keep track for frequent dups) and return the decryption key it was received with (via tagsReceived(...)).createSession(PublicKey target) ElG onlyvoidcreateSession(PublicKey target, SessionKey key) ElG onlyvoidfailTags(PublicKey target, SessionKey key, TagSetHandle ts) ElG onlyintgetAvailableTags(PublicKey target, SessionKey key) Determine (approximately) how many available session tags for the current target have been confirmed and are availablelonggetAvailableTimeLeft(PublicKey target, SessionKey key) Determine how long the available tags will be available for before expiring, in millisecondsgetCurrentKey(PublicKey target) ElG onlygetCurrentOrNewKey(PublicKey target) ElG onlygetECSKM()intintHow many to send, IF we need to.(package private) booleanShould 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().voidrenderStatusHTML(Writer out) (package private) voidreportDecryptResult(boolean isRatchet, boolean success) Report the result of a slow decrypt attempt.booleanshouldSendTags(PublicKey target, SessionKey key) ElG onlybooleanshouldSendTags(PublicKey target, SessionKey key, int lowThreshold) ElG onlyvoidshutdown()Called when the system is closing down, instructing the session key manager to take whatever precautions are necessary (saving state, etc)voidtagsAcked(PublicKey target, SessionKey key, TagSetHandle ts) ElG onlytagsDelivered(PublicKey target, SessionKey key, Set<SessionTag> sessionTags) ElG onlyvoidtagsReceived(SessionKey key, Set<SessionTag> sessionTags) ElG onlyvoidtagsReceived(SessionKey key, Set<SessionTag> sessionTags, long expire) ElG onlyvoidtagsReceived(SessionKey key, RatchetSessionTag tag, long expire) EC only One time sessionMethods inherited from class net.i2p.crypto.SessionKeyManager
failTags
-
Constructor Details
-
MuxedSKM
-
-
Method Details
-
getElgSKM
-
getECSKM
-
preferRatchet
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().- Since:
- 0.9.46
-
reportDecryptResult
void reportDecryptResult(boolean isRatchet, boolean success) Report the result of a slow decrypt attempt.- Parameters:
isRatchet- true for EC, false for ElGsuccess- true for successful decrypt- Since:
- 0.9.46
-
getCurrentKey
ElG only- Overrides:
getCurrentKeyin classSessionKeyManager
-
getCurrentOrNewKey
ElG only- Overrides:
getCurrentOrNewKeyin classSessionKeyManager- Returns:
- non-null
-
createSession
ElG only- Overrides:
createSessionin classSessionKeyManager
-
createSession
ElG only- Overrides:
createSessionin classSessionKeyManager
-
consumeNextAvailableTag
ElG only- Overrides:
consumeNextAvailableTagin classSessionKeyManager
-
consumeNextAvailableTag
EC only -
getTagsToSend
public int getTagsToSend()Description copied from class:SessionKeyManagerHow many to send, IF we need to.- Overrides:
getTagsToSendin classSessionKeyManager
-
getLowThreshold
public int getLowThreshold()- Overrides:
getLowThresholdin classSessionKeyManager
-
shouldSendTags
ElG only- Overrides:
shouldSendTagsin classSessionKeyManager- Returns:
- true if we have less than the threshold or what we have is about to expire
-
shouldSendTags
ElG only- Overrides:
shouldSendTagsin classSessionKeyManager- Returns:
- true if we have less than the threshold or what we have is about to expire
-
getAvailableTags
Description copied from class:SessionKeyManagerDetermine (approximately) how many available session tags for the current target have been confirmed and are available- Overrides:
getAvailableTagsin classSessionKeyManager
-
getAvailableTimeLeft
Description copied from class:SessionKeyManagerDetermine how long the available tags will be available for before expiring, in milliseconds- Overrides:
getAvailableTimeLeftin classSessionKeyManager
-
tagsDelivered
ElG only- Overrides:
tagsDeliveredin classSessionKeyManager
-
tagsReceived
ElG only- Overrides:
tagsReceivedin classSessionKeyManager
-
tagsReceived
ElG only- Overrides:
tagsReceivedin classSessionKeyManager- Parameters:
sessionTags- modifiable; NOT copiedexpire- time from now
-
tagsReceived
EC only One time session- Parameters:
expire- time from now- Since:
- 0.9.51
-
consumeTag
Description copied from class:SessionKeyManagerDetermine if we have received a session key associated with the given session tag, and if so, discard it (but keep track for frequent dups) and return the decryption key it was received with (via tagsReceived(...)). returns null if no session key matches- Overrides:
consumeTagin classSessionKeyManager
-
shutdown
public void shutdown()Description copied from class:SessionKeyManagerCalled when the system is closing down, instructing the session key manager to take whatever precautions are necessary (saving state, etc)- Overrides:
shutdownin classSessionKeyManager
-
renderStatusHTML
- Overrides:
renderStatusHTMLin classSessionKeyManager- Throws:
IOException
-
failTags
ElG only- Overrides:
failTagsin classSessionKeyManager
-
tagsAcked
ElG only- Overrides:
tagsAckedin classSessionKeyManager
-