Class EciesAeadHkdfPrivateKeyManager


  • public final class EciesAeadHkdfPrivateKeyManager
    extends java.lang.Object
    This key manager generates new EciesAeadHkdfPrivateKey keys and produces new instances of EciesAeadHkdfHybridDecrypt.
    • Method Detail

      • registerPair

        public static void registerPair​(boolean newKeyAllowed)
                                 throws java.security.GeneralSecurityException
        Registers the EciesAeadHkdfPrivateKeyManager and the EciesAeadHkdfPublicKeyManager with the registry, so that the the EciesAeadHkdfKeys can be used with Tink.
        Throws:
        java.security.GeneralSecurityException
      • eciesP256HkdfHmacSha256Aes128GcmTemplate

        public static final KeyTemplate eciesP256HkdfHmacSha256Aes128GcmTemplate()
        Returns:
        a KeyTemplate that generates new instances of ECIES-AEAD-HKDF key pairs with the following parameters:

        Unlike other key templates that use AES-GCM, the instances of HybridDecrypt generated by this key template has no limitation on Android KitKat (API level 19). They might not work in older versions though.

      • rawEciesP256HkdfHmacSha256Aes128GcmCompressedTemplate

        public static final KeyTemplate rawEciesP256HkdfHmacSha256Aes128GcmCompressedTemplate()
        Returns:
        a KeyTemplate that generates new instances of ECIES-AEAD-HKDF key pairs with the following parameters:
        • KEM: ECDH over NIST P-256
        • DEM: AES128-GCM
        • KDF: HKDF-HMAC-SHA256 with an empty salt
        • EC Point Format: Compressed
        • Prefix type: KeyTemplate.OutputPrefixType.RAW (no prefix)

        Unlike other key templates that use AES-GCM, the instances of HybridDecrypt generated by this key template has no limitation on Android KitKat (API level 19). They might not work in older versions though.

      • eciesP256HkdfHmacSha256Aes128CtrHmacSha256Template

        public static final KeyTemplate eciesP256HkdfHmacSha256Aes128CtrHmacSha256Template()
        Returns:
        a KeyTemplate that generates new instances of ECIES-AEAD-HKDF key pairs with the following parameters:
        • KEM: ECDH over NIST P-256
        • DEM: AES128-CTR-HMAC-SHA256 with the following parameters
          • AES key size: 16 bytes
          • AES CTR IV size: 16 bytes
          • HMAC key size: 32 bytes
          • HMAC tag size: 16 bytes
        • KDF: HKDF-HMAC-SHA256 with an empty salt
        • EC Point Format: Uncompressed
        • Prefix type: KeyTemplate.OutputPrefixType.TINK
      • rawEciesP256HkdfHmacSha256Aes128CtrHmacSha256CompressedTemplate

        public static final KeyTemplate rawEciesP256HkdfHmacSha256Aes128CtrHmacSha256CompressedTemplate()
        Returns:
        a KeyTemplate that generates new instances of ECIES-AEAD-HKDF key pairs with the following parameters:
        • KEM: ECDH over NIST P-256
        • DEM: AES128-CTR-HMAC-SHA256 with the following parameters
          • AES key size: 16 bytes
          • AES CTR IV size: 16 bytes
          • HMAC key size: 32 bytes
          • HMAC tag size: 16 bytes
        • KDF: HKDF-HMAC-SHA256 with an empty salt
        • EC Point Format: Compressed
        • Prefix type: KeyTemplate.OutputPrefixType.RAW (no prefix)