public class MuxedPQSKM extends SessionKeyManager
| Constructor and Description |
|---|
MuxedPQSKM(RatchetSKM ec,
RatchetSKM pq)Combines ECIES and PQ SKMs with adaptive decrypt ordering. |
| Modifier and Type | Method and Description |
|---|---|
RatchetEntry | consumeNextAvailableTag(PublicKey target)EC/PQ |
SessionTag | consumeNextAvailableTag(PublicKey target,
SessionKey key)ElG only |
SessionKey | consumeTag(SessionTag tag)Tries ECIES tag lookup first, falls back to PQ lookup. |
SessionKey | createSession(PublicKey target)ElG only |
void | createSession(PublicKey target,
SessionKey key)ElG only |
void | failTags(PublicKey target,
SessionKey key,
TagSetHandle ts)ElG only |
int | getAvailableTags(PublicKey target,
SessionKey key)Delegates to the appropriate key manager by encryption type. |
long | getAvailableTimeLeft(PublicKey target,
SessionKey key)Delegates to the appropriate key manager by encryption type. |
SessionKey | getCurrentKey(PublicKey target)ElG only |
SessionKey | getCurrentOrNewKey(PublicKey target)ElG only |
RatchetSKM | getECSKM()Return the eCSKM |
int | getLowThreshold()Get the low threshold for tag sending. |
RatchetSKM | getPQSKM()Return the pQSKM |
int | getTagsToSend()Get the number of tags to send. |
(package private) boolean | preferRatchet()Should we try the Ratchet slow decrypt before PQ slow decrypt?
Adaptive test based on previous mix of traffic for this SKM,
as reported by reportDecryptResult(). |
void | renderStatusHTML(Writer out)Renders debug status for both key managers. |
(package private) void | reportDecryptResult(boolean isRatchet,
boolean success)Report the result of a slow decrypt attempt. |
boolean | shouldSendTags(PublicKey target,
SessionKey key)ElG only |
boolean | shouldSendTags(PublicKey target,
SessionKey key,
int lowThreshold)ElG only |
void | shutdown()Shuts down both ECIES and PQ key managers. |
void | tagsAcked(PublicKey target,
SessionKey key,
TagSetHandle ts)ElG only |
TagSetHandle | tagsDelivered(PublicKey target,
SessionKey key,
Set<SessionTag> sessionTags)ElG only |
void | tagsReceived(SessionKey key,
RatchetSessionTag tag,
long expire)EC only. |
void | tagsReceived(SessionKey key,
Set<SessionTag> sessionTags)ElG only |
void | tagsReceived(SessionKey key,
Set<SessionTag> sessionTags,
long expire)ElG only |
failTagspublic MuxedPQSKM(RatchetSKM ec, RatchetSKM pq)
public RatchetEntry consumeNextAvailableTag(PublicKey target)
public SessionTag consumeNextAvailableTag(PublicKey target, SessionKey key)
consumeNextAvailableTag in class SessionKeyManagerpublic SessionKey consumeTag(SessionTag tag)
consumeTag in class SessionKeyManagerpublic SessionKey createSession(PublicKey target)
createSession in class SessionKeyManagerpublic void createSession(PublicKey target, SessionKey key)
createSession in class SessionKeyManagerpublic void failTags(PublicKey target, SessionKey key, TagSetHandle ts)
failTags in class SessionKeyManagertarget - the targetkey - the session keyts - the tag set handlepublic int getAvailableTags(PublicKey target, SessionKey key)
getAvailableTags in class SessionKeyManagerpublic long getAvailableTimeLeft(PublicKey target, SessionKey key)
getAvailableTimeLeft in class SessionKeyManagerpublic SessionKey getCurrentKey(PublicKey target)
getCurrentKey in class SessionKeyManagerpublic SessionKey getCurrentOrNewKey(PublicKey target)
getCurrentOrNewKey in class SessionKeyManagerpublic RatchetSKM getECSKM()
public int getLowThreshold()
SessionKeyManagergetLowThreshold in class SessionKeyManagerpublic RatchetSKM getPQSKM()
public int getTagsToSend()
SessionKeyManagergetTagsToSend in class SessionKeyManagerboolean preferRatchet()
public void renderStatusHTML(Writer out) throws IOException
renderStatusHTML in class SessionKeyManagerout - the writer to render toIOException - if an I/O error occursvoid reportDecryptResult(boolean isRatchet,
boolean success)isRatchet - true for EC, false for PQsuccess - true for successful decryptpublic boolean shouldSendTags(PublicKey target, SessionKey key)
shouldSendTags in class SessionKeyManagertarget - the targetkey - the session keypublic boolean shouldSendTags(PublicKey target, SessionKey key, int lowThreshold)
shouldSendTags in class SessionKeyManagertarget - the targetkey - the session keylowThreshold - the low thresholdpublic void shutdown()
shutdown in class SessionKeyManagerpublic void tagsAcked(PublicKey target, SessionKey key, TagSetHandle ts)
tagsAcked in class SessionKeyManagertarget - the targetkey - the session keyts - the tag set handlepublic TagSetHandle tagsDelivered(PublicKey target, SessionKey key, Set<SessionTag> sessionTags)
tagsDelivered in class SessionKeyManagerpublic void tagsReceived(SessionKey key, RatchetSessionTag tag, long expire)
expire - time from nowpublic void tagsReceived(SessionKey key, Set<SessionTag> sessionTags)
tagsReceived in class SessionKeyManagerpublic void tagsReceived(SessionKey key, Set<SessionTag> sessionTags, long expire)
tagsReceived in class SessionKeyManagersessionTags - modifiable; NOT copiedexpire - time from now