com.pax.dal

Interface IPedCustomization

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      byte[] signForSIBS(byte[] dataIn, int format)
      use custom device signature key to get signature
      void writeKeyByAsymForDM(byte[] keyInfo, byte[] keyBlock)
      Using Asymmetric key(RSA key) to load symetric keys.
      void writeKeyByAsymForSIBS(byte[] keyInfo, byte[] keyBlock)
      write key by custom device encryption RSA key。
      write key by custom device encryption RSA key.
      WriteKEKOutput writeKeybyAsymforWL(byte[] keyInfo, byte[] keyBlock)
      Decrypt KEK1 and KEK2 under RSA private key and store them in the key slot.
      void writeKeybySymforKnet(byte[] keyInfo, byte[] deriveData)
      Decrypt session keys under MK and store them in the key slot.
      void writeKeybySymforWL(byte[] keyInfo, byte[] keyBlock)
      Decrypt session keys under MK and store them in the key slot.
    • Method Detail

      • writeKeyByAsymForDM

        void writeKeyByAsymForDM(byte[] keyInfo,
                                 byte[] keyBlock)
                          throws PedDevException
        Using Asymmetric key(RSA key) to load symetric keys. the cipher key block is encrypted by asymmetric key.
        Parameters:
        keyInfo -
        format(0x00) + ucSrcKeyType(PED_RSA) + ucSrcKeyIdx + DstKeyType(PED_TIK/PED_TMK/PED_TPK/PED_TDK/PED_TAK) + DstKeyIdx + KcvMode(0x00) + KcvLen + KCV(KcvLen bytes) + KsnLen(0/10) + Ksn(KsnLen bytes).
        keyBlock -
        Key block
        Throws:
        PedDevException
        Since:
        V4.02.00
      • writeKeyByAsymForSIBS

        void writeKeyByAsymForSIBS(byte[] keyInfo,
                                   byte[] keyBlock)
                            throws PedDevException
        write key by custom device encryption RSA key。
        write key by custom device encryption RSA key.
        Parameters:
        keyInfo -
        格式: 2 bytes, format + destination key index. format must be 0.
        2 bytes, format + destination key index. format must be 0.
        keyBlock -
        Key block:SIBS format, KBH + PU(KEK) + TR31kek(Destination key)
        Throws:
        PedDevException
        Since:
        V4.02.00
      • signForSIBS

        byte[] signForSIBS(byte[] dataIn,
                           int format)
                    throws PedDevException
        use custom device signature key to get signature
        Parameters:
        dataIn -
        data for signature
        format -
        format must be 0
        Throws:
        PedDevException
        Since:
        V4.02.00
      • writeKeybyAsymforWL

        WriteKEKOutput writeKeybyAsymforWL(byte[] keyInfo,
                                           byte[] keyBlock)
                                    throws PedDevException
        Decrypt KEK1 and KEK2 under RSA private key and store them in the key slot.
        Parameters:
        keyInfo -
      • Format [1 byte] Can only be 0x00 or 0x01
      • Source Key Type [1 byte] Can only be 0x0B (PED_RSA)
      • Source Key Index [1 byte] RSA private key index. [1~10]
      • KEK1 Index [1 byte] KEK1 index. [1~100]
      • KEK2 Index [1 byte] KEK1 index. [1~100]
      • Note: KeyInfo length.
        It should be >=5, when format is 0x00.
        It should be >=3, when format is 0x01.
        keyBlock -
        Cipher key block. 256 bytes
        Returns:
        WriteKEKOutput
        Throws:
        PedDevException
        Since:
        V4.03.00
      • writeKeybySymforWL

        void writeKeybySymforWL(byte[] keyInfo,
                                byte[] keyBlock)
                         throws PedDevException
        Decrypt session keys under MK and store them in the key slot.
        Parameters:
        keyInfo -
      • Format [1 byte] Can only be 0x00
      • Source Key Type [1 byte] Can only be 0x02 (PED_TMK)
      • Source Key Index [1 byte] KEK2 index. [1~100]
      • Session Key Type [1 byte] TPK - 0x03 (PED_TPK)\TSEK - 0x05 (PED_TDK)\TAK - 0x04 (PED_TAK)\TMEK - 0x05 (PED_TDK)
      • Session Key Index [1 byte] Session key index. [1~100]
      • Variant [8 bytes] TPK - 0800000000000000\TSEK - 1000000000000000\TAK - 1800000000000000\TMEK - 2000000000000000
      • KCV Mode [1 byte] Key check value mode: Mode 0x00 – No KCV\Mode 0x01 – Encryption\Mode 0x03 – CMAC
      • KCV [n bytes] KCV Mode 0x00 – None\KCV Mode 0x01 – 3 bytes KCV\KCV Mode 0x03 – 5 bytes KCV
      • keyBlock -
        Cipher key block. 16 bytes
        Throws:
        PedDevException
        Since:
        V4.03.00
      • writeKeybySymforKnet

        void writeKeybySymforKnet(byte[] keyInfo,
                                  byte[] deriveData)
                           throws PedDevException
        Decrypt session keys under MK and store them in the key slot.
        Parameters:
        keyInfo -
        Format + SrcKeyType + SrcKeyIdx + DstKeyType + DstKeyIdx Format = 0, KNET OWF发散方法; Format = 1, KNET OWF发散PIN key的方法.
        Format + SrcKeyType + SrcKeyIdx + DstKeyType + DstKeyIdx Format = 0, KNET OWF divergence method; Format = 1, the method by which KNET OWF diverges the PIN key.
        deriveData -
        Derive data using in derive method
        Throws:
        PedDevException
        Since:
        V4.15.00