Package | Description |
---|---|
net.i2p.crypto |
These classes provide a number of low-level cryptographic routines.
|
net.i2p.data |
These classes define the common data structures used by the various
I2P protocols.
|
net.i2p.data.i2np |
The Invisible Internet Network Protocol (I2NP) is only a part of how an
application can send messages over the network.
|
net.i2p.router |
The I2P router application handles the I2P network communication.
|
net.i2p.router.message | |
net.i2p.router.networkdb.kademlia | |
net.i2p.router.tunnel |
Modifier and Type | Method and Description |
---|---|
static PublicKey |
KeyGenerator.getPublicKey(PrivateKey priv)
Convert a PrivateKey to its corresponding PublicKey
|
Modifier and Type | Method and Description |
---|---|
SessionTag |
SessionKeyManager.consumeNextAvailableTag(PublicKey target,
SessionKey key)
Retrieve the next available session tag for identifying the use of the given
key when communicating with the target.
|
SessionTag |
TransientSessionKeyManager.consumeNextAvailableTag(PublicKey target,
SessionKey key)
Retrieve the next available session tag for identifying the use of the given
key when communicating with the target.
|
SessionKey |
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.
|
void |
TransientSessionKeyManager.createSession(PublicKey target,
SessionKey key)
Associate a new session key with the specified target.
|
byte[] |
ElGamalEngine.encrypt(byte[] data,
PublicKey publicKey)
encrypt the data to the public key
|
byte[] |
DummyElGamalEngine.encrypt(byte[] data,
PublicKey publicKey)
encrypt the data to the public key
|
byte[] |
ElGamalAESEngine.encrypt(byte[] data,
PublicKey target,
SessionKey key,
long paddedSize)
Deprecated.
unused
|
byte[] |
ElGamalAESEngine.encrypt(byte[] data,
PublicKey target,
SessionKey key,
Set tagsForDelivery,
long paddedSize)
Deprecated.
unused
|
byte[] |
ElGamalAESEngine.encrypt(byte[] data,
PublicKey target,
SessionKey key,
Set 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 tagsForDelivery,
SessionTag currentTag,
SessionKey newKey,
long paddedSize)
Encrypt the unencrypted data to the target.
|
void |
SessionKeyManager.failTags(PublicKey target)
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 |
TransientSessionKeyManager.failTags(PublicKey target)
Deprecated.
unused and rather drastic
|
void |
SessionKeyManager.failTags(PublicKey target,
SessionKey key,
TagSetHandle ts) |
void |
TransientSessionKeyManager.failTags(PublicKey target,
SessionKey key,
TagSetHandle ts)
Mark these tags as invalid, since the peer
has failed to ack them in time.
|
int |
SessionKeyManager.getAvailableTags(PublicKey target,
SessionKey key)
Determine (approximately) how many available session tags for the current target
have been confirmed and are available
|
int |
TransientSessionKeyManager.getAvailableTags(PublicKey target,
SessionKey key)
Determine (approximately) how many available session tags for the current target
have been confirmed and are available
|
long |
SessionKeyManager.getAvailableTimeLeft(PublicKey target,
SessionKey key)
Determine how long the available tags will be available for before expiring, in
milliseconds
|
long |
TransientSessionKeyManager.getAvailableTimeLeft(PublicKey target,
SessionKey key)
Determine how long the available tags will be available for before expiring, in
milliseconds
|
SessionKey |
SessionKeyManager.getCurrentKey(PublicKey target)
Retrieve the session key currently associated with encryption to the target,
or null if a new session key should be generated.
|
SessionKey |
TransientSessionKeyManager.getCurrentKey(PublicKey target)
Retrieve the session key currently associated with encryption to the target,
or null if a new session key should be generated.
|
void |
SessionKeyManager.tagsAcked(PublicKey target,
SessionKey key,
TagSetHandle ts) |
void |
TransientSessionKeyManager.tagsAcked(PublicKey target,
SessionKey key,
TagSetHandle ts)
Mark these tags as acked, start to use them (if we haven't already)
|
TagSetHandle |
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)
|
TagSetHandle |
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.
|
Modifier and Type | Field and Description |
---|---|
protected PublicKey |
KeysAndCert._publicKey |
Modifier and Type | Method and Description |
---|---|
static 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
|
PublicKey |
LeaseSet.getEncryptionKey() |
PublicKey |
KeysAndCert.getPublicKey() |
PublicKey |
PrivateKey.toPublic()
derives a new PublicKey object derived from the secret contents
of this PrivateKey
|
Modifier and Type | Method and Description |
---|---|
void |
LeaseSet.setEncryptionKey(PublicKey encryptionKey) |
void |
KeysAndCert.setPublicKey(PublicKey key) |
Modifier and Type | Method and Description |
---|---|
void |
BuildRequestRecord.encryptRecord(I2PAppContext ctx,
PublicKey toKey,
Hash toPeer,
byte[] out,
int outOffset)
Encrypt the record to the specified peer.
|
Modifier and Type | Method and Description |
---|---|
PublicKey |
KeyManager.getPublicKey() |
Modifier and Type | Method and Description |
---|---|
void |
KeyManager.setPublicKey(PublicKey key)
Configure the router's public key
|
Modifier and Type | Method and Description |
---|---|
PublicKey |
GarlicConfig.getRecipientPublicKey() |
Modifier and Type | Method and Description |
---|---|
static GarlicMessage |
GarlicMessageBuilder.buildMessage(RouterContext ctx,
GarlicConfig config,
SessionKey wrappedKey,
Set<SessionTag> wrappedTags,
PublicKey target,
SessionKey encryptKey,
SessionTag encryptTag)
used by TestJob and directly above
|
(package private) static GarlicMessage |
OutboundClientMessageJobHelper.createGarlicMessage(RouterContext ctx,
long replyToken,
long expiration,
PublicKey recipientPK,
PayloadGarlicConfig dataClove,
Hash from,
Destination dest,
TunnelInfo replyTunnel,
SessionKey wrappedKey,
Set<SessionTag> wrappedTags,
boolean requireAck,
LeaseSet bundledReplyLeaseSet)
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 GarlicMessage |
OutboundClientMessageJobHelper.createGarlicMessage(RouterContext ctx,
long replyToken,
long expiration,
PublicKey recipientPK,
Payload data,
Hash from,
Destination dest,
TunnelInfo replyTunnel,
SessionKey wrappedKey,
Set<SessionTag> wrappedTags,
boolean requireAck,
LeaseSet bundledReplyLeaseSet)
Build a garlic message that will be delivered to the router on which the target is located.
|
static int |
GarlicMessageBuilder.estimateAvailableTags(RouterContext ctx,
PublicKey key,
Hash local) |
void |
GarlicConfig.setRecipientPublicKey(PublicKey recipientPublicKey)
Public key of the router to receive and process this clove.
|
Constructor and Description |
---|
MessageWrapper.WrappedMessage(GarlicMessage msg,
SessionKeyManager skm,
PublicKey sentTo,
SessionKey sentKey,
TagSetHandle tsh) |
Modifier and Type | Method and Description |
---|---|
static void |
BuildMessageGenerator.createRecord(int recordNum,
int hop,
TunnelBuildMessage msg,
TunnelCreatorConfig cfg,
Hash replyRouter,
long replyTunnel,
I2PAppContext 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)
|