Uses of Class
net.i2p.data.PublicKey
Package
Description
These classes provide a number of low-level cryptographic routines.
DH for X25519.
These classes define the common data structures used by the various
I2P protocols.
This package defines the low-level messages sent between routers,
called the Invisible Internet Network Protocol (I2NP).
The I2P router application handles the I2P network communication.
Classes formerly in net.i2p.crypto but moved here as they are only used by the router.
Implementation of ECIES-X25519-AEAD-Ratchet (proposal 144).
Creates and parses garlic messages.
The network database, including implementation of floodfills.
Tunnel creation, tunnel build message handling.
-
Uses of PublicKey in net.i2p.crypto
Modifier and TypeMethodDescriptionKeyPair.getPublic()
static PublicKey
KeyGenerator.getPublicKey
(PrivateKey priv) Convert a PrivateKey to its corresponding PublicKey.Modifier and TypeMethodDescriptionSessionKeyManager.consumeNextAvailableTag
(PublicKey target, SessionKey key) Retrieve the next available session tag for identifying the use of the given key when communicating with the target.SessionKeyManager.createSession
(PublicKey target) Generate a new session key and associate it with the specified target.void
SessionKeyManager.createSession
(PublicKey target, SessionKey key) Associate a new session key with the specified target.byte[]
encrypt the data to the public keyvoid
Mark all of the tags delivered to the target up to this point as invalid, since the peer has failed to respond when they should have.void
SessionKeyManager.failTags
(PublicKey target, SessionKey key, TagSetHandle ts) int
SessionKeyManager.getAvailableTags
(PublicKey target, SessionKey key) Determine (approximately) how many available session tags for the current target have been confirmed and are availablelong
SessionKeyManager.getAvailableTimeLeft
(PublicKey target, SessionKey key) Determine how long the available tags will be available for before expiring, in millisecondsSessionKeyManager.getCurrentKey
(PublicKey target) Retrieve the session key currently associated with encryption to the target, or null if a new session key should be generated.SessionKeyManager.getCurrentOrNewKey
(PublicKey target) Retrieve the session key currently associated with encryption to the target.boolean
SessionKeyManager.shouldSendTags
(PublicKey target, SessionKey key) boolean
SessionKeyManager.shouldSendTags
(PublicKey target, SessionKey key, int lowThreshold) void
SessionKeyManager.tagsAcked
(PublicKey target, SessionKey key, TagSetHandle ts) SessionKeyManager.tagsDelivered
(PublicKey target, SessionKey key, Set<SessionTag> sessionTags) Take note of the fact that the given sessionTags associated with the key for encryption to the target have definitely been received at the target (aka call this method after receiving an ack to a message delivering them) -
Uses of PublicKey in net.i2p.crypto.x25519
Modifier and TypeMethodDescriptionstatic SessionKey
X25519DH.dh
(PrivateKey priv, PublicKey pub) DH -
Uses of PublicKey in net.i2p.data
Modifier and TypeFieldDescriptionprotected PublicKey
LeaseSet._encryptionKey
protected PublicKey
KeysAndCert._publicKey
Modifier and TypeMethodDescriptionstatic PublicKey
PublicKey.create
(byte[] data, int off) Pull from cache or return new.static PublicKey
PublicKey.create
(InputStream in) Pull from cache or return new.EncryptedLeaseSet.getEncryptionKey
(Set<EncType> supported) If more than one key, return the first supported one.LeaseSet.getEncryptionKey()
LeaseSet.getEncryptionKey
(Set<EncType> supported) If more than one key, return the first supported one.LeaseSet2.getEncryptionKey()
If more than one key, return the first supported one.LeaseSet2.getEncryptionKey
(Set<EncType> supported) If more than one key, return the first supported one.KeysAndCert.getPublicKey()
Valid for RouterIdentities.PrivateKey.toPublic()
Derives a new PublicKey object derived from the secret contents of this PrivateKey.PublicKey.toTypedKey
(KeyCertificate kcert) Up-convert this from an untyped (type 0) PK to a typed PK based on the Key Cert given.Modifier and TypeMethodDescriptionEncryptedLeaseSet.getEncryptionKeys()
LeaseSet2.getEncryptionKeys()
This returns all the keys.Modifier and TypeMethodDescriptionvoid
LeaseSet2.addEncryptionKey
(PublicKey key) Add an encryption key.void
MetaLeaseSet.addEncryptionKey
(PublicKey key) void
LeaseSet.setEncryptionKey
(PublicKey encryptionKey) void
MetaLeaseSet.setEncryptionKey
(PublicKey key) void
KeysAndCert.setPublicKey
(PublicKey key) ModifierConstructorDescriptionKeyCertificate
(SigningPublicKey spk, PublicKey pk) A KeyCertificate with enc type from the given public key, and the signature type and extra data from the given public key.PrivateKey
(EncType type, byte[] data, PublicKey pubKey) PrivateKeyFile
(File file, PublicKey pubkey, SigningPublicKey spubkey, Certificate cert, PrivateKey pk, SigningPrivateKey spk) PrivateKeyFile
(File file, PublicKey pubkey, SigningPublicKey spubkey, Certificate cert, PrivateKey pk, SigningPrivateKey spk, byte[] padding) -
Uses of PublicKey in net.i2p.data.i2np
Modifier and TypeMethodDescriptionDatabaseLookupMessage.getRatchetPublicKey()
The included session key or null if unset.Modifier and TypeMethodDescriptionBuildRequestRecord.encryptECIESRecord
(RouterContext ctx, PublicKey toKey, Hash toPeer) Encrypt the record to the specified peer.BuildRequestRecord.encryptRecord
(I2PAppContext ctx, PublicKey toKey, Hash toPeer) Encrypt the record to the specified peer.void
DatabaseLookupMessage.setReplySession
(PublicKey pubKey) Ratchet. -
Uses of PublicKey in net.i2p.router
Modifier and TypeMethodDescriptionvoid
KeyManager.setKeys
(PublicKey key1, PrivateKey key2, SigningPublicKey key3, SigningPrivateKey key4) Configure the router's keys. -
Uses of PublicKey in net.i2p.router.crypto
Modifier and TypeMethodDescriptionTransientSessionKeyManager.consumeNextAvailableTag
(PublicKey target, SessionKey key) Retrieve the next available session tag for identifying the use of the given key when communicating with the target.void
TransientSessionKeyManager.createSession
(PublicKey target, SessionKey key) Associate a new session key with the specified target.byte[]
ElGamalAESEngine.encrypt
(byte[] data, PublicKey target, SessionKey key, long paddedSize) Deprecated.unusedbyte[]
ElGamalAESEngine.encrypt
(byte[] data, PublicKey target, SessionKey key, Set<SessionTag> tagsForDelivery, long paddedSize) Deprecated.unusedbyte[]
ElGamalAESEngine.encrypt
(byte[] data, PublicKey target, SessionKey key, Set<SessionTag> tagsForDelivery, SessionTag currentTag, long paddedSize) 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[]
ElGamalAESEngine.encrypt
(byte[] data, PublicKey target, SessionKey key, Set<SessionTag> tagsForDelivery, SessionTag currentTag, SessionKey newKey, long paddedSize) Encrypt the unencrypted data to the target.void
Deprecated.unused and rather drasticvoid
TransientSessionKeyManager.failTags
(PublicKey target, SessionKey key, TagSetHandle ts) Mark these tags as invalid, since the peer has failed to ack them in time.int
TransientSessionKeyManager.getAvailableTags
(PublicKey target, SessionKey key) Determine (approximately) how many available session tags for the current target have been confirmed and are availablelong
TransientSessionKeyManager.getAvailableTimeLeft
(PublicKey target, SessionKey key) Determine how long the available tags will be available for before expiring, in millisecondsTransientSessionKeyManager.getCurrentKey
(PublicKey target) Retrieve the session key currently associated with encryption to the target, or null if a new session key should be generated.TransientSessionKeyManager.getCurrentOrNewKey
(PublicKey target) Retrieve the session key currently associated with encryption to the target.boolean
TransientSessionKeyManager.shouldSendTags
(PublicKey target, SessionKey key, int lowThreshold) void
TransientSessionKeyManager.tagsAcked
(PublicKey target, SessionKey key, TagSetHandle ts) Mark these tags as acked, start to use them (if we haven't already) If the set was previously failed, it will be added back in.TransientSessionKeyManager.tagsDelivered
(PublicKey target, SessionKey key, Set<SessionTag> sessionTags) Take note of the fact that the given sessionTags associated with the key for encryption to the target have been sent. -
Uses of PublicKey in net.i2p.router.crypto.ratchet
Modifier and TypeMethodDescriptionstatic PublicKey
Elligator2.decode
(byte[] representative) From javascript version documentation: Returns an array with the point and the second argument of the corresponding call to the `encode` function.static PublicKey
Elligator2.decode
(AtomicBoolean alternative, byte[] representative) From javascript version documentation: Returns an array with the point and the second argument of the corresponding call to the `encode` function.RatchetTagSet.getRemoteKey()
The far-end's public key.SessionKeyAndNonce.getRemoteKey()
For inbound ES, else null.Modifier and TypeMethodDescription(package private) void
RatchetSKM.ackRequested
(PublicKey target, int id, int n) MuxedSKM.consumeNextAvailableTag
(PublicKey target) EC onlyMuxedSKM.consumeNextAvailableTag
(PublicKey target, SessionKey key) ElG onlyRatchetSKM.consumeNextAvailableTag
(PublicKey target) Outbound.RatchetSKM.consumeNextAvailableTag
(PublicKey target, SessionKey key) MuxedSKM.createSession
(PublicKey target) ElG onlyvoid
MuxedSKM.createSession
(PublicKey target, SessionKey key) ElG only(package private) boolean
RatchetSKM.createSession
(PublicKey target, Destination d, HandshakeState state, ReplyCallback callback) Inbound or outbound.void
RatchetSKM.createSession
(PublicKey target, SessionKey key) (package private) static final PrivateKey
ECIESAEADEngine.doDH
(PrivateKey privkey, PublicKey pubkey) byte[]
Use for on-the-wire.protected static byte[]
Use for unit tests.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.void
MuxedSKM.failTags
(PublicKey target, SessionKey key, TagSetHandle ts) ElG onlyvoid
Deprecated.unused and rather drasticvoid
RatchetSKM.failTags
(PublicKey target, SessionKey key, TagSetHandle ts) int
MuxedSKM.getAvailableTags
(PublicKey target, SessionKey key) int
RatchetSKM.getAvailableTags
(PublicKey target, SessionKey key) Determine (approximately) how many available session tags for the current target have been confirmed and are availablelong
MuxedSKM.getAvailableTimeLeft
(PublicKey target, SessionKey key) long
RatchetSKM.getAvailableTimeLeft
(PublicKey target, SessionKey key) Determine how long the available tags will be available for before expiring, in millisecondsMuxedSKM.getCurrentKey
(PublicKey target) ElG onlyRatchetSKM.getCurrentKey
(PublicKey target) MuxedSKM.getCurrentOrNewKey
(PublicKey target) ElG onlyRatchetSKM.getCurrentOrNewKey
(PublicKey target) (package private) Destination
RatchetSKM.getDestination
(PublicKey target) (package private) boolean
RatchetSKM.isDuplicate
(PublicKey pk) (package private) void
RatchetSKM.nextKeyReceived
(PublicKey target, NextSessionKey key) (package private) void
RatchetSKM.receivedACK
(PublicKey target, int id, int n) (package private) void
RatchetSKM.registerCallback
(PublicKey target, int id, int n, ReplyCallback callback) (package private) boolean
RatchetSKM.registerTimer
(PublicKey target, Destination d, SimpleTimer2.TimedEvent timer) Side effect - binds this session to the supplied destination.boolean
MuxedSKM.shouldSendTags
(PublicKey target, SessionKey key) ElG onlyboolean
MuxedSKM.shouldSendTags
(PublicKey target, SessionKey key, int lowThreshold) ElG onlyboolean
RatchetSKM.shouldSendTags
(PublicKey target, SessionKey key, int lowThreshold) void
MuxedSKM.tagsAcked
(PublicKey target, SessionKey key, TagSetHandle ts) ElG onlyvoid
RatchetSKM.tagsAcked
(PublicKey target, SessionKey key, TagSetHandle ts) MuxedSKM.tagsDelivered
(PublicKey target, SessionKey key, Set<SessionTag> sessionTags) ElG onlyRatchetSKM.tagsDelivered
(PublicKey target, SessionKey key, Set<SessionTag> sessionTags) (package private) boolean
RatchetSKM.updateSession
(PublicKey target, HandshakeState oldState, HandshakeState state, ReplyCallback callback, SplitKeys split) Inbound or outbound.ModifierConstructorDescriptionElg2KeyPair
(PublicKey publicKey, PrivateKey privateKey, byte[] enc) RatchetTagSet
(HKDF hkdf, SessionTagListener lsnr, PublicKey remoteKey, SessionKey rootKey, SessionKey data, long date, int tagsetid, int keyid, int minSize, int maxSize) Inbound ES TagsetSessionKeyAndNonce
(byte[] data, int id, int nonce, PublicKey remoteKey) For inbound Existing Session -
Uses of PublicKey in net.i2p.router.message
Modifier and TypeMethodDescriptionstatic GarlicMessage
GarlicMessageBuilder.buildMessage
(RouterContext ctx, GarlicConfig config, Set<SessionTag> wrappedTags, PublicKey target, SessionKey encryptKey, SessionTag encryptTag) ELGAMAL_2048 only.(package private) static GarlicMessage
OutboundClientMessageJobHelper.createGarlicMessage
(RouterContext ctx, long replyToken, long expiration, PublicKey recipientPK, PayloadGarlicConfig dataClove, Hash from, Destination dest, TunnelInfo replyTunnel, int tagsToSendOverride, int lowTagsOverride, SessionKey wrappedKey, Set<SessionTag> wrappedTags, boolean requireAck, LeaseSet bundledReplyLeaseSet, ReplyCallback callback) Allow the app to specify the data clove directly, which enables OutboundClientMessage to resend the same payload (including expiration and unique id) in different garlics (down different tunnels) This is called from OCMOSJ(package private) static boolean
GarlicMessageBuilder.needsTags
(RouterContext ctx, PublicKey key, Hash local, int minTagOverride) ELGAMAL_2048 only.void
GarlicConfig.setRecipientPublicKey
(PublicKey recipientPublicKey) Public key of the router to receive and process this clove. -
Uses of PublicKey in net.i2p.router.networkdb.kademlia
ModifierConstructorDescription(package private)
WrappedMessage
(GarlicMessage msg, SessionKeyManager skm, PublicKey sentTo, SessionKey sentKey, TagSetHandle tsh) -
Uses of PublicKey in net.i2p.router.tunnel.pool
Modifier and TypeMethodDescriptionstatic void
BuildMessageGenerator.createRecord
(int recordNum, int hop, TunnelBuildMessage msg, TunnelCreatorConfig cfg, Hash replyRouter, long replyTunnel, RouterContext ctx, PublicKey peerKey) Place the asymmetrically encrypted record in the specified record slot, containing the hop's configuration (as well as the reply info, if it is an outbound endpoint)