Class ExtKeyUsage

java.lang.Object
org.jpos.security.KeyUsage
org.jpos.security.ExtKeyUsage
All Implemented Interfaces:
Serializable

public class ExtKeyUsage extends KeyUsage
Defines the primary usage of the key contained in the key block.

Each value repesents bytes 5-6 of the Keyblok Header.

This class defines proprietary specific key usages. In the great majority of cases, the ones defined by TR-31 KeyUsage will be sufficient. There are no strong reasons for separating e.g. KEK keys to ZMK and TMK, or PINENC keys to ZPK and TPK. KEK and PINENC should be enough.

However, when it is necessary to use, for example: private/public RSA keys or HMAC keys, the only option is to use the proprietary key usages.

The proprietary key usages for ExtKeyUsage are optional and can be defined in your resources at "META-INF/org/jpos/security/proprietary-hsm.properties". A file with the same name in the jPOS test resources can be used as an example.

See Also:
  • Field Details

    • DEK

      public static final KeyUsage DEK
      DEK - Data Encryption Key.
      API Note:
      It is proprietary specific version of KeyUsage.ENC
    • ZEK

      public static final KeyUsage ZEK
      ZEK - Zone Encryption Key.
      API Note:
      It is proprietary specific version of KeyUsage.ENC
    • TEK

      public static final KeyUsage TEK
      TEK - Terminal Encryption Key.
      API Note:
      It is proprietary specific version of KeyUsage.ENC
    • RSAPK

      public static final KeyUsage RSAPK
      RSA Public Key.
      API Note:
      It is proprietary specific, there is no equivalent in TR-31.
    • RSASK

      public static final KeyUsage RSASK
      RSA Private Key for signing or key management.
      API Note:
      It is proprietary specific, there is no equivalent in TR-31.
    • RSASKICC

      public static final KeyUsage RSASKICC
      RSA Private Key for ICC personalization.
      API Note:
      It is proprietary specific, there is no equivalent in TR-31.
    • RSASKPIN

      public static final KeyUsage RSASKPIN
      RSA Private Key for PIN translation.
      API Note:
      It is proprietary specific, there is no equivalent in TR-31.
    • RSASKTLS

      public static final KeyUsage RSASKTLS
      RSA Private Key for TLS.
      API Note:
      It is proprietary specific, there is no equivalent in TR-31.
    • TMK

      public static final KeyUsage TMK
      TMK - Terminal Master Key.
      API Note:
      It is proprietary specific version of KeyUsage.KEK
    • ZMK

      public static final KeyUsage ZMK
      ZMK - Zone Master Key.
      API Note:
      It is proprietary specific version of KeyUsage.KEK
    • HMACSHA1

      public static final KeyUsage HMACSHA1
      HMAC key using SHA-1.
      API Note:
      It is proprietary specific, there is no equivalent in TR-31.
    • HMACSHA224

      public static final KeyUsage HMACSHA224
      HMAC key using SHA-224.
      API Note:
      It is proprietary specific, there is no equivalent in TR-31.
    • HMACSHA256

      public static final KeyUsage HMACSHA256
      HMAC key using SHA-256.
      API Note:
      It is proprietary specific, there is no equivalent in TR-31.
    • HMACSHA384

      public static final KeyUsage HMACSHA384
      HMAC key using SHA-384.
      API Note:
      It is proprietary specific, there is no equivalent in TR-31.
    • HMACSHA512

      public static final KeyUsage HMACSHA512
      HMAC key using SHA-512.
      API Note:
      It is proprietary specific, there is no equivalent in TR-31.
    • TPK

      public static final KeyUsage TPK
      TPK - Terminal PIN Encryption Key.
      API Note:
      It is proprietary specific version of KeyUsage.PINENC
    • ZPK

      public static final KeyUsage ZPK
      ZPK - Zone PIN Encryption Key.
      API Note:
      It is proprietary specific version of KeyUsage.PINENC
  • Constructor Details

    • ExtKeyUsage

      protected ExtKeyUsage(String code, String name)
      Internal constructor.

      The constructor is protected to guarantee only one instance of the key usage in the entire JVM. This makes it possible to use the operator == or != as it does for enums.

      Parameters:
      code - the key usage code
      name - the usage name
  • Method Details

    • valueOfByCode

      public static KeyUsage valueOfByCode(String code)
      Returns the enum constant of this type with the specified code.
      Parameters:
      code -
      Returns:
      the enum constant with the specified processing code or null if unknown.
    • entries

      public static Map<String,KeyUsage> entries()