Packages that use PrivateKey
Package
Description
Interfaces and factories for the base I2P SDK used to develop applications that communicate through I2P.
Internal implementation of the I2P client SDK - the client side of the Invisible Internet Client Protocol (I2CP), separating implementation from the interfaces in
net.i2p.client. Core cryptographic primitives used throughout I2P: symmetric ciphers (AES, ChaCha20), hashes (SHA-1, SHA-256, SHA-384, SHA-512), HMAC and HKDF key derivation, the ElGamal and DSA/EdDSA/RedDSA engines, key and certificate utilities, and the entropy harvester.
X25519 elliptic curve Diffie-Hellman key exchange (RFC 7748), wrapping Noise's Curve25519 operations with Java Security API parameter specifications.
Common data structures used by the I2P protocols: Destination, LeaseSet, PublicKey, Signature, Certificate and their friends.
The Invisible Internet Client Protocol (I2CP) allows applications simplified access to I2P network without requiring them to deal with the issues involved with the Invisible Internet Network Protocol (I2NP).
Low-level messages sent between routers - the Invisible Internet Network Protocol (I2NP).
The I2P router application handles I2P network communication.
Router-specific cryptography: ElGamal+AES garlic encryption (ElGamalAESEngine), session key and tag caching for repeated peer communication (TransientSessionKeyManager), router-family shared keys (FamilyKeyCrypto), and the ratchet and pqc subpackages.
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.
The I2P startup package loads configuration when I2P is started.
Tunnel pool management: pool lifecycle, peer selection, build scheduling and failure handling for client and exploratory tunnels.
Uses of PrivateKey in net.i2p.client
Methods in net.i2p.client that return PrivateKeyModifier and TypeMethodDescriptionI2PSession.getDecryptionKey()Retrieve the decryption PrivateKey associated with the Destination.Uses of PrivateKey in net.i2p.client.impl
Classes in net.i2p.client.impl that implement interfaces with type arguments of type PrivateKeyModifier and TypeClassDescriptionprivate static classReverse order by enc type.Fields in net.i2p.client.impl declared as PrivateKeyModifier and TypeFieldDescriptionprivate PrivateKeyI2PSessionImpl._privateKeyPrivate key for decryption.Fields in net.i2p.client.impl with type parameters of type PrivateKeyModifier and TypeFieldDescriptionprivate final List<PrivateKey> RequestLeaseSetMessageHandler.LeaseInfo._privKeysThe encryption private keys of the destination.Methods in net.i2p.client.impl that return PrivateKeyModifier and TypeMethodDescriptionRequestLeaseSetMessageHandler.LeaseInfo.getPrivateKey()First private key; returns the first when multiple are present.Methods in net.i2p.client.impl that return types with arguments of type PrivateKeyModifier and TypeMethodDescriptionRequestLeaseSetMessageHandler.LeaseInfo.getPrivateKeys()The blinded private keys.Methods in net.i2p.client.impl with parameters of type PrivateKeyModifier and TypeMethodDescriptionintRequestLeaseSetMessageHandler.LeaseInfo.PrivKeyComparator.compare(PrivateKey l, PrivateKey r) Compare two objects.Method parameters in net.i2p.client.impl with type arguments of type PrivateKeyModifier and TypeMethodDescriptionvoidI2CPMessageProducer.createLeaseSet(I2PSessionImpl session, LeaseSet leaseSet, SigningPrivateKey signingPriv, List<PrivateKey> privs) In response to a RequestLeaseSet Message from the router, send a CreateLeaseset Message back to the router.private voidRequestLeaseSetMessageHandler.parsePrivateKeys(String spkl, List<PrivateKey> privKeys, List<EncType> allowedTypes) Non-null [type:]b64[,[type:]b64]...Constructor parameters in net.i2p.client.impl with type arguments of type PrivateKeyModifierConstructorDescriptionLeaseInfo(List<PrivateKey> privKeys) Existing keys, LS2 only.LeaseInfo(List<PrivateKey> privKeys, Destination dest) Existing crypto keys, new signing key, LS1 only.LeaseInfo(List<PrivateKey> privKeys, SigningPrivateKey signingPrivKey) Existing keys, LS1 only.Uses of PrivateKey in net.i2p.crypto
Fields in net.i2p.crypto declared as PrivateKeyMethods in net.i2p.crypto that return PrivateKeyMethods in net.i2p.crypto with parameters of type PrivateKeyModifier and TypeMethodDescriptionbyte[]ElGamalEngine.decrypt(byte[] encrypted, PrivateKey privateKey) Decrypt the data.static PublicKeyKeyGenerator.getPublicKey(PrivateKey priv) Convert a PrivateKey to its corresponding PublicKey.Constructors in net.i2p.crypto with parameters of type PrivateKeyModifierConstructorDescriptionKeyPair(PublicKey publicKey, PrivateKey privateKey) Non-null, same EncType as privateKey.Uses of PrivateKey in net.i2p.crypto.x25519
Methods in net.i2p.crypto.x25519 with parameters of type PrivateKeyModifier and TypeMethodDescriptionstatic SessionKeyX25519DH.dh(PrivateKey priv, PublicKey pub) Curve25519 Diffie-Hellman: computes the shared secret for a private/public key pair.Uses of PrivateKey in net.i2p.data
Fields in net.i2p.data declared as PrivateKeyModifier and TypeFieldDescriptionprivate final PrivateKeyBlindData._authKeyThe key proving the authorization, if any.private PrivateKeyEncryptedLeaseSet._clientPrivateKeyClient private key for decryption.protected PrivateKeyPrivateKeyFile.privKeyThe private key.Methods in net.i2p.data that return PrivateKeyModifier and TypeMethodDescriptionBlindData.getAuthPrivKey()Gets the authentication private key.PrivateKeyFile.getPrivKey()Private key may be random data or all zeros for Destinations as of 0.9.57.Methods in net.i2p.data with parameters of type PrivateKeyModifier and TypeMethodDescriptionprivate voidEncryptedLeaseSet.decrypt(PrivateKey csk) Throws IllegalStateException if not initialized.voidEncryptedLeaseSet.setClientPrivateKey(PrivateKey privKey) Must be set before verify for per-client auth.booleanEncryptedLeaseSet.verifySignature(PrivateKey clientKey) Decrypt if possible, and verify inner sig also.private voidEncryptedLeaseSet.x_decrypt(PrivateKey csk) Throws IllegalStateException if not initialized.Constructors in net.i2p.data with parameters of type PrivateKeyModifierConstructorDescriptionBlindData(I2PAppContext ctx, Destination dest, SigType blindType, String secret, int authType, PrivateKey authKey) Creates a new BlindData instance for the given destination with authentication.BlindData(I2PAppContext ctx, SigningPublicKey spk, SigType blindType, String secret, int authType, PrivateKey authKey) Creates a new BlindData instance for the given signing public key with authentication.PrivateKeyFile(File file, Destination dest, PrivateKey pk, SigningPrivateKey spk) Create a new PrivateKeyFile with a destination and keys.PrivateKeyFile(File file, PublicKey pubkey, SigningPublicKey spubkey, Certificate cert, PrivateKey pk, SigningPrivateKey spk) Create a new PrivateKeyFile from individual key components.PrivateKeyFile(File file, PublicKey pubkey, SigningPublicKey spubkey, Certificate cert, PrivateKey pk, SigningPrivateKey spk, byte[] padding) Create a new PrivateKeyFile from individual key components with padding.Uses of PrivateKey in net.i2p.data.i2cp
Fields in net.i2p.data.i2cp declared as PrivateKeyModifier and TypeFieldDescriptionprotected PrivateKeyCreateLeaseSetMessage._privateKeyThe private key.private PrivateKeyBlindingInfoMessage._privkeyThe authorization private key, if any.Fields in net.i2p.data.i2cp with type parameters of type PrivateKeyModifier and TypeFieldDescriptionprivate List<PrivateKey> CreateLeaseSet2Message._privateKeysThe private keys, when the lease set is built from more than one.Methods in net.i2p.data.i2cp that return PrivateKeyModifier and TypeMethodDescriptionBlindingInfoMessage.getPrivateKey()Gets the private key for key-type endpoints.CreateLeaseSetMessage.getPrivateKey()ElGamal encryption key.Methods in net.i2p.data.i2cp that return types with arguments of type PrivateKeyMethods in net.i2p.data.i2cp with parameters of type PrivateKeyModifier and TypeMethodDescriptionvoidCreateLeaseSet2Message.addPrivateKey(PrivateKey key) Add a private key.voidCreateLeaseSetMessage.setPrivateKey(PrivateKey privateKey) ElGamal encryption key.Constructors in net.i2p.data.i2cp with parameters of type PrivateKeyModifierConstructorDescriptionBlindingInfoMessage(Destination d, SessionId id, int expiration, int authType, SigType blindType, PrivateKey privKey, String secret) Creates a BlindingInfoMessage for a destination.privateBlindingInfoMessage(SessionId id, long expiration, int authType, SigType blindType, PrivateKey privKey, String secret) Builds the message from its parsed parts.BlindingInfoMessage(SigningPublicKey s, SessionId id, int expiration, int authType, SigType blindType, PrivateKey privKey, String secret) Creates a BlindingInfoMessage for a signing public key.Uses of PrivateKey in net.i2p.data.i2np
Constructors in net.i2p.data.i2np with parameters of type PrivateKeyModifierConstructorDescriptionBuildRequestRecord(RouterContext ctx, PrivateKey ourKey, EncryptedBuildRecord encryptedRecord) Decrypts an encrypted build request record.Uses of PrivateKey in net.i2p.router
Fields in net.i2p.router declared as PrivateKeyModifier and TypeFieldDescriptionprivate final PrivateKeyLeaseSetKeys._decryptionKeyThe ElGamal decryption key.private final PrivateKeyLeaseSetKeys._decryptionKeyECThe ECIES decryption key.private final PrivateKeyLeaseSetKeys._decryptionKeyPQThe post-quantum decryption key.private PrivateKeyKeyManager._privateKeyOur router's private key.Methods in net.i2p.router that return PrivateKeyModifier and TypeMethodDescriptionLeaseSetKeys.getDecryptionKey()Decryption key which can open up garlic messages encrypted to the LeaseSet's public key.LeaseSetKeys.getDecryptionKey(EncType type) Decryption key which can open up garlic messages encrypted to the LeaseSet's public key.LeaseSetKeys.getPQDecryptionKey()The PQ decryption key of any type, or null if the LS does not support PQ.KeyManager.getPrivateKey()Router key.Methods in net.i2p.router with parameters of type PrivateKeyModifier and TypeMethodDescriptionvoidKeyManager.registerKeys(Destination dest, SigningPrivateKey leaseRevocationPrivateKey, PrivateKey endpointDecryptionKey) Client with a single key.voidKeyManager.setKeys(PublicKey key1, PrivateKey key2, SigningPublicKey key3, SigningPrivateKey key4) Configure the router's keys.Method parameters in net.i2p.router with type arguments of type PrivateKeyModifier and TypeMethodDescriptionvoidKeyManager.registerKeys(Destination dest, SigningPrivateKey leaseRevocationPrivateKey, List<PrivateKey> endpointDecryptionKeys) Client with multiple keys.Constructors in net.i2p.router with parameters of type PrivateKeyModifierConstructorDescriptionLeaseSetKeys(Destination dest, SigningPrivateKey revocationKey, PrivateKey decryptionKey) Client with a single key.Constructor parameters in net.i2p.router with type arguments of type PrivateKeyModifierConstructorDescriptionLeaseSetKeys(Destination dest, SigningPrivateKey revocationKey, List<PrivateKey> decryptionKeys) Client with multiple keysUses of PrivateKey in net.i2p.router.crypto
Methods in net.i2p.router.crypto with parameters of type PrivateKeyModifier and TypeMethodDescriptionbyte[]ElGamalAESEngine.decrypt(byte[] data, PrivateKey targetPrivateKey, SessionKeyManager keyManager) Decrypt the message using the given private key and using tags from the specified key manager.private byte[]ElGamalAESEngine.decryptExistingSession(byte[] data, SessionKey key, PrivateKey targetPrivateKey, Set<SessionTag> foundTags, SessionKey usedKey, SessionKey foundKey) Scenario 2: The data begins with 32 byte session tag, which also serves as the preIV.byte[]ElGamalAESEngine.decryptFast(byte[] data, PrivateKey targetPrivateKey, SessionKeyManager keyManager) Tags only.private byte[]ElGamalAESEngine.decryptNewSession(byte[] data, PrivateKey targetPrivateKey, Set<SessionTag> foundTags, SessionKey usedKey, SessionKey foundKey) Scenario 1: Begin with 222 bytes, ElG encrypted, containing:byte[]ElGamalAESEngine.decryptSlow(byte[] data, PrivateKey targetPrivateKey, SessionKeyManager keyManager) Full ElG only.Uses of PrivateKey in net.i2p.router.crypto.ratchet
Methods in net.i2p.router.crypto.ratchet that return PrivateKeyModifier and TypeMethodDescription(package private) static final PrivateKeyECIESAEADEngine.doDH(PrivateKey privkey, PublicKey pubkey) Compute the Curve25519 Diffie-Hellman shared secret for the given key pair.Methods in net.i2p.router.crypto.ratchet with parameters of type PrivateKeyModifier 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.(package private) CloveSetECIESAEADEngine.decryptSlow(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) NS only.(package private) static final PrivateKeyECIESAEADEngine.doDH(PrivateKey privkey, PublicKey pubkey) Compute the Curve25519 Diffie-Hellman shared secret for the given key pair.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.private byte[]ECIESAEADEngine.encryptNewSession(CloveSet cloves, PublicKey target, Destination to, PrivateKey priv, RatchetSKM keyManager, ReplyCallback callback) Scenario 1: New Session Messageprivate 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 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.private CloveSetECIESAEADEngine.xx_decryptFast(byte[] tag, RatchetSessionTag st, SessionKeyAndNonce key, byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) NSR/ES only.Constructors in net.i2p.router.crypto.ratchet with parameters of type PrivateKeyModifierConstructorDescriptionElg2KeyPair(PublicKey publicKey, PrivateKey privateKey, byte[] enc) Key pair from the given keys and the pre-encoded public key.Uses of PrivateKey in net.i2p.router.message
Methods in net.i2p.router.message with parameters of type PrivateKeyModifier and TypeMethodDescription(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.Uses of PrivateKey in net.i2p.router.startup
Fields in net.i2p.router.startup declared as PrivateKeyModifier and TypeFieldDescriptionfinal PrivateKeyLoadRouterInfoJob.KeyData.privateKeyElGamal private key for this router.Methods in net.i2p.router.startup with parameters of type PrivateKeyModifier and TypeMethodDescriptionprivate booleanLoadRouterInfoJob.shouldRebuild(PrivateKey privkey) Does our RI ElGamal private key length match the configuration? If not, return true.Constructors in net.i2p.router.startup with parameters of type PrivateKeyModifierConstructorDescriptionKeyData(RouterIdentity ri, PrivateKey pk, SigningPrivateKey spk) Pairs a router identity with the private keys that match it.Uses of PrivateKey in net.i2p.router.tunnel.pool
Methods in net.i2p.router.tunnel.pool with parameters of type PrivateKeyModifier and TypeMethodDescriptionBuildMessageProcessor.decrypt(TunnelBuildMessage msg, Hash ourHash, PrivateKey privKey) Decrypt the record targeting us, encrypting all of the other records with the included reply key and IV.