Class EciesParameters


  • public final class EciesParameters
    extends HybridParameters
    Parameters for an ECIES primitive with HKDF and AEAD encryption.

    This API follows loosely ECIES ISO 18033-2 standard (Elliptic Curve Integrated Encryption Scheme, see http://www.shoup.net/iso/std6.pdf), but with some differences:

    • use of HKDF key derivation function (instead of KDF1 and KDF2) enabling the use of optional parameters to the key derivation function, which strenghten the overall security and allow for binding the key material to application-specific information (see RFC 5869)
    • use of modern AEAD/Deterministic AEAD schemes rather than "manual composition" of symmetric encryption with message authentication codes (as in DEM1, DEM2, and DEM3 schemes of ISO 18033-2)
    • Method Detail

      • getDemParameters

        public Parameters getDemParameters()
      • getSalt

        @Nullable
        public Bytes getSalt()
        Gets the salt value, which defaults to null if not set.

        This class does not store an RFC compliant default value and the converion must be done in the implementation (meaning that a null salt must be converted to a string of zeros that is of the length of the hash function output, as per RFC 5869).

      • hasIdRequirement

        public boolean hasIdRequirement()
        Description copied from class: Parameters
        Returns true if a key created with the parameters in this object has to have a certain ID when it is in a keyset.

        In Tink, certain keys change their behavior depending on the key id (for example, an Aead object can prefix the ciphertext with the big endian encoding of the key id). If this is the case, such a key should require a unique id in Key.getIdRequirementOrNull() and return true here.

        Specified by:
        hasIdRequirement in class Parameters
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object