Class LeaseSetKeys


  • public class LeaseSetKeys
    extends Object
    Wrap up the keys given to the router when a destination connects to it. Used by KeyManager, ClientMessageEventListener, GarlicMessageReceiver.
    • Field Detail

      • SET_ELG

        public static final Set<EncType> SET_ELG
        Unmodifiable, ElGamal only
        Since:
        0.9.44
      • SET_EC

        public static final Set<EncType> SET_EC
        Unmodifiable, ECIES-X25519 only
        Since:
        public since 0.9.46
      • SET_BOTH

        public static final Set<EncType> SET_BOTH
        Unmodifiable, ElGamal and ECIES-X25519.
        Since:
        public since 0.9.48
    • Constructor Detail

      • LeaseSetKeys

        public LeaseSetKeys​(Destination dest,
                            SigningPrivateKey revocationKey,
                            PrivateKey decryptionKey)
        Client with a single key
        Parameters:
        dest - unused
        revocationKey - unused, may be null
        decryptionKey - non-null
      • LeaseSetKeys

        public LeaseSetKeys​(Destination dest,
                            SigningPrivateKey revocationKey,
                            List<PrivateKey> decryptionKeys)
        Client with multiple keys
        Parameters:
        dest - unused
        revocationKey - unused, may be null
        decryptionKeys - non-null, non-empty
        Since:
        0.9.44
    • Method Detail

      • getRevocationKey

        public SigningPrivateKey getRevocationKey()
        Key with which a LeaseSet can be revoked (by republishing it with no Leases) Deprecated, unused
      • getDecryptionKey

        public PrivateKey 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

        public PrivateKey getDecryptionKey​(EncType type)
        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:
        key of the specified type or null if the LS does not support that type
        Since:
        0.9.44
      • isSupported

        public boolean isSupported​(EncType type)
        Do we support this type of encryption?
        Since:
        0.9.44
      • getSupportedEncryption

        public Set<EncType> getSupportedEncryption()
        What types of encryption are supported?
        Since:
        0.9.44