Packages that use CloveSet
Package
Description
The Double Ratchet with X25519 key agreement and ECIES hybrid encryption, used by the NTCP2 and SSU transports for session encryption.
Garlic message creation, parsing and handling, and the outbound message jobs: one-shot sends, source routing and delivery status handling.
Uses of CloveSet in net.i2p.router.crypto.ratchet
Fields in net.i2p.router.crypto.ratchet declared as CloveSetModifier and TypeFieldDescriptionprivate static final CloveSetECIESAEADEngine.NO_CLOVESEmpty clove set returned on failure.Methods in net.i2p.router.crypto.ratchet that return CloveSetModifier and TypeMethodDescriptionECIESAEADEngine.decrypt(byte[] data, PrivateKey ecKey, PrivateKey pqKey, MuxedPQSKM keyManager) Try to decrypt the message with one or both of the given private keys.ECIESAEADEngine.decrypt(byte[] data, PrivateKey elgKey, PrivateKey ecKey, MuxedSKM keyManager) Try to decrypt the message with one or both of the given private keys.ECIESAEADEngine.decrypt(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) Decrypt the message using the given private key and using tags from the specified key manager.MuxedEngine.decrypt(byte[] data, PrivateKey elgKey, PrivateKey ecKey, MuxedSKM keyManager) Decrypt the message with the given private keys.MuxedPQEngine.decrypt(byte[] data, PrivateKey ecKey, PrivateKey pqKey, MuxedPQSKM keyManager) Decrypt the message with the given private keys.private CloveSetECIESAEADEngine.decryptExistingSession(byte[] tag, byte[] data, SessionKeyAndNonce key, PrivateKey _targetPrivateKey, RatchetSKM keyManager) Scenario 3: Existing Session Message.(package private) CloveSetECIESAEADEngine.decryptFast(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) NSR/ES only.private CloveSetECIESAEADEngine.decryptNewSession(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) Scenario 1: New Session Messageprivate CloveSetECIESAEADEngine.decryptNewSession_N(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) Scenario 1A: New Session Message Anonymous.private CloveSetECIESAEADEngine.decryptNewSessionReply(byte[] tag, byte[] data, HandshakeState oldState, RatchetSKM keyManager) Scenario 2: New Session Reply Message(package private) CloveSetECIESAEADEngine.decryptSlow(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) NS only.private CloveSetECIESAEADEngine.x_decrypt(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) Decrypts a received message into cloves.private CloveSetECIESAEADEngine.x_decryptFast(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) NSR/ES only.private CloveSetECIESAEADEngine.x_decryptSlow(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) NS only.private CloveSetECIESAEADEngine.xx_decryptFast(byte[] tag, RatchetSessionTag st, SessionKeyAndNonce key, byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) NSR/ES only.Methods in net.i2p.router.crypto.ratchet with parameters of type CloveSetModifier and TypeMethodDescriptionprivate byte[]ECIESAEADEngine.createPayload(CloveSet cloves, long expiration, boolean ackreq, NextSessionKey nextKey1, NextSessionKey nextKey2, List<Integer> acksToSend, int overhead) Create the payload from the given cloves and optional blocks.private byte[]ECIESAEADEngine.createPayload(CloveSet cloves, long expiration, int overhead) Create the payload, adding a DateTime block if expiration is greater than zero.byte[]Encrypt the data to the target using the given key from an anonymous source, for netdb lookups.byte[]ECIESAEADEngine.encrypt(CloveSet cloves, PublicKey target, Destination to, PrivateKey priv, RatchetSKM keyManager, ReplyCallback callback) Encrypt the data to the target using the given key and deliver the specified tags No new session key This is the one called from GarlicMessageBuilder and is the primary entry point.byte[]ECIESAEADEngine.encrypt(CloveSet cloves, SessionKey key, RatchetSessionTag tag) Create an Existing Session Message to an anonymous target using the given session key and tag, for netdb DSM/DSRM replies.private byte[]ECIESAEADEngine.encryptExistingSession(CloveSet cloves, PublicKey target, RatchetEntry re, ReplyCallback callback, RatchetSKM keyManager) Scenario 3: Existing Session Message.private byte[]ECIESAEADEngine.encryptNewSession(CloveSet cloves, PublicKey target) Scenario 1A: New Session Message from an anonymous source.private byte[]ECIESAEADEngine.encryptNewSession(CloveSet cloves, PublicKey target, Destination to, PrivateKey priv, RatchetSKM keyManager, ReplyCallback callback) Scenario 1: New Session Messageprivate byte[]ECIESAEADEngine.encryptNewSessionReply(CloveSet cloves, PublicKey target, HandshakeState state, RatchetSessionTag currentTag, RatchetSKM keyManager, ReplyCallback callback) Scenario 2: New Session Reply Messageprivate byte[]ECIESAEADEngine.x_encrypt(CloveSet cloves, PublicKey target, Destination to, PrivateKey priv, RatchetSKM keyManager, ReplyCallback callback) Encrypt the cloves to the target, selecting New Session, New Session Reply, or Existing Session encryption as appropriate.Uses of CloveSet in net.i2p.router.message
Methods in net.i2p.router.message that return CloveSetModifier and TypeMethodDescriptionprivate static CloveSetGarlicMessageBuilder.buildECIESCloveSet(RouterContext ctx, GarlicConfig config) Build the unencrypted CloveSet specified by the config.(package private) CloveSetGarlicMessageParser.getGarlicCloves(GarlicMessage message, PrivateKey encryptionKey, SessionKeyManager skm) Supports ELGAMAL_2048, ECIES_X25519, and PQ.(package private) CloveSetGarlicMessageParser.getGarlicCloves(GarlicMessage message, PrivateKey elgKey, PrivateKey ecKey, SessionKeyManager skm) Supports both ELGAMAL_2048 and ECIES_X25519.GarlicMessageParser.readCloveSet(byte[] data, int offset) ElGamal only.