java.lang.Object
net.i2p.router.LeaseSetKeys
Wrap up the keys given to the router when a destination connects to it. Used by
KeyManager, ClientMessageEventListener, GarlicMessageReceiver.Field Summary
Modifier and TypeFieldDescriptionprivate final PrivateKeyThe ElGamal decryption key.private final PrivateKeyThe ECIES decryption key.private final PrivateKeyThe post-quantum decryption key.private final SigningPrivateKeyKey that revokes the lease set.Unmodifiable, ElGamal and ECIES-X25519.Unmodifiable, ECIES-X25519 only.Unmodifiable, ECIES-X25519 and PQ only.Unmodifiable, ECIES-X25519 and PQ only.Unmodifiable, ECIES-X25519 and PQ only.Unmodifiable, ECIES-X25519 and PQ only.Unmodifiable, ElGamal only.The empty set, for a lease set that accepts nothing.Unmodifiable, PQ only.Unmodifiable, PQ only.Unmodifiable, PQ only.Constructor Summary
ConstructorsConstructorDescriptionLeaseSetKeys(Destination dest, SigningPrivateKey revocationKey, List<PrivateKey> decryptionKeys) Client with multiple keysLeaseSetKeys(Destination dest, SigningPrivateKey revocationKey, PrivateKey decryptionKey) Client with a single key.Method Summary
All MethodsModifier and TypeMethodDescriptionDecryption key which can open up garlic messages encrypted to the LeaseSet's public key.getDecryptionKey(EncType type) Decryption key which can open up garlic messages encrypted to the LeaseSet's public key.The PQ decryption key of any type, or null if the LS does not support PQ.Key with which a LeaseSet can be revoked (by republishing it with no Leases)The types of encryption supported by this LeaseSet.booleanisSupported(EncType type) Do we support this type of encryption?
Field Details
_revocationKey
Key that revokes the lease set._decryptionKey
The ElGamal decryption key._decryptionKeyEC
The ECIES decryption key._decryptionKeyPQ
The post-quantum decryption key.SET_ELG
SET_EC
SET_BOTH
SET_NONE
SET_PQ1
SET_PQ2
SET_PQ3
SET_EC_PQ1
SET_EC_PQ2
SET_EC_PQ3
SET_EC_PQ_ALL
Constructor Details
LeaseSetKeys
Client with a single key.- Parameters:
dest- not read; the LeaseSetKeys constructor shares its signature with the server-side variantrevocationKey- unused, may be nulldecryptionKey- non-null
LeaseSetKeys
public LeaseSetKeys(Destination dest, SigningPrivateKey revocationKey, List<PrivateKey> decryptionKeys) Client with multiple keysThe ONLY valid combinations are X25519 + ElG or X25519 + (MLKEM512 OR MLKEM768 OR MLKEM1024). Other combinations will throw IllegalArgumentException.
- Parameters:
dest- not read; the LeaseSetKeys constructor shares its signature with the server-side variantrevocationKey- unused, may be nulldecryptionKeys- non-null, non-empty- Throws:
IllegalArgumentException- if the list is empty, holds two keys of the same encryption type, mixes ElGamal with a PQ key, or holds an unrecognized type
Method Details
getRevocationKey
Key with which a LeaseSet can be revoked (by republishing it with no Leases)Deprecated, unused.
- Returns:
- the revocation key
getDecryptionKey
Decryption key which can open up garlic messages encrypted to the LeaseSet's public key. This is used because the general public does not know on what router the destination is connected and as such can't encrypt to that router's normal public key.- Returns:
- ElGamal key or null if the LS does not support ElGamal
getDecryptionKey
Decryption key which can open up garlic messages encrypted to the LeaseSet's public key. This is used because the general public does not know on what router the destination is connected and as such can't encrypt to that router's normal public key.- Parameters:
type- encryption type whose matching key is wanted; a PQ type must match the stored key- Returns:
- key of the specified type or null if the LS does not support that type
getPQDecryptionKey
The PQ decryption key of any type, or null if the LS does not support PQ.- Returns:
- PQ key (any type) or null if the LS does not support PQ
isSupported
Do we support this type of encryption?- Parameters:
type- the encryption type to test; true comes back when a key of that type is present- Returns:
- true if a key of that type is held; false for an unrecognized type
getSupportedEncryption