Class PredefinedHybridParameters


  • public final class PredefinedHybridParameters
    extends java.lang.Object
    Pre-generated Parameter objects for HybridEncrypt and HybridDecrypt keys.

    Note: if you want to keep dependencies small, consider inlining the constants here.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static EciesParameters ECIES_P256_HKDF_HMAC_SHA256_AES128_CTR_HMAC_SHA256
      A KeyTemplate that generates new instances of EciesAeadHkdfPrivateKey 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
      static EciesParameters ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM
      A KeyTemplate that generates new instances of EciesAeadHkdfPrivateKey with the following parameters: KEM: ECDH over NIST P-256 DEM: AES128-GCM KDF: HKDF-HMAC-SHA256 with an empty salt
      static EciesParameters ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM_COMPRESSED_WITHOUT_PREFIX
      A KeyTemplate that generates new instances of EciesAeadHkdfPrivateKey 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 OutputPrefixType: RAW
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM

        public static final EciesParameters ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM
        A KeyTemplate that generates new instances of EciesAeadHkdfPrivateKey with the following parameters:
        • KEM: ECDH over NIST P-256
        • DEM: AES128-GCM
        • KDF: HKDF-HMAC-SHA256 with an empty salt

        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.

      • ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM_COMPRESSED_WITHOUT_PREFIX

        public static final EciesParameters ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM_COMPRESSED_WITHOUT_PREFIX
        A KeyTemplate that generates new instances of EciesAeadHkdfPrivateKey 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
        • OutputPrefixType: RAW

        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.

      • ECIES_P256_HKDF_HMAC_SHA256_AES128_CTR_HMAC_SHA256

        public static final EciesParameters ECIES_P256_HKDF_HMAC_SHA256_AES128_CTR_HMAC_SHA256
        A KeyTemplate that generates new instances of EciesAeadHkdfPrivateKey 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