Product Documentation

The CCEncryptedAnsiX9241KeyType is used by the storeAnsiX9241Key and replaceAnsiX9241Key web services to transport a key's metadata (and optionally an encrypted key) as a single object. The SOAP interface will pass this parameter to the web service as a structured object, whereas the REST interface will pass a JSON representation of that structured object.

When using the SOAP interface, the following example defines the CCEncryptedAnsiX9241KeyType type:

#

CCEncryptedAnsiX9241KeyType XML Content

1

<xs:complexType name="CCEncryptedAnsiX9241KeyType">

2

  <xs:sequence>

3

<xs:element name="SID" type="xs:int"/>

4

<xs:element name="DID" type="xs:int"/>

5

<xs:element name="AKID" type="xs:int"/>

6

<xs:element name="SRID" type="xs:int"/>

7

<xs:element name="BankID" type="xs:int"/>

8

<xs:element name="TerminalID" type="xs:int"/>

9

<xs:element name="TerminalType" type="xs:string"/>

10

<xs:element name="KeyName" type="xs:string"/>

11

<xs:element name="ParentToken" type="xs:string"/>

12

<xs:element name="Token" type="xs:string"/>

13

<xs:element name="EncryptedKey" type="xs:CCCryptographicMaterialType"/>

14

<xs:element name="KeyType" type="xs:string"/>

15

<xs:element name="KeyAlgorithm" type="xs:string"/>

16

<xs:element name="KeyEncoding" type="xs:string"/>

17

<xs:element name="KeySize" type="xs:string"/>

18

<xs:element name="KCV" type="xs:string"/>

19

<xs:element name="Notes" type="xs:string"/>

20

</xs:sequence>

21

</xs:complexType>

 

The following table explains each line of the above XML file:

#

CCEncryptedAnsiX9241KeyType XML Content Explanation

1

The start of the CCEncryptedAnsiX9241KeyType element.

2

The start of a sequence.

3

The SID element—the server ID of the server that processed this request. This element is only used in the event the server returns this object to the calling application. When using this object in a web service call, this element should be NULL.

4

The DID element—the domain ID of the server that processed this request. This element is only used in the event the server returns this object to the calling application. When using this object in a web service call, this element should be NULL.

5

The AKID element—the ANSI Key ID assigned to the stored key. This element is only used in the event the server returns this object to the calling application. When using this object in a web service call, this element should be NULL.

6

The SRID element—a unique request ID for this transaction. This element is only used in the event the server returns this object to the calling application. When using this object in a web service call, this element should be NULL.

7

The BankID element—a numeric identifier for the bank with which this key is associated.

8

The TerminalID element—an optional numerical identifier for the terminal with which this key is associated.

9

The TerminalType element—an optional string identifier for the type of terminal to which this key belongs.

10

The KeyName element—the name associated with this key. If ParentToken is null, this value will be used to recover the pre-load key components of this key. Otherwise, this value is primarily used for logging.

11

The ParentToken element—the token identifier of the wrapping key used to encrypt this ANSI key. If this ANSI key is being assembled from pre-loaded key components, this element must be NULL.

12

The Token element—the token identifier created for this stored key. This element is only used in the event the server returns this object to the calling application. When using this object in a web service call, this element should be NULL.

13

The EncryptedKey element—a CCCryptographicMaterialType object that stores the encoded encrypted key bytes. If this ANSI key is being assembled from pre-loaded key components, this element must be NULL.

14

The KeyType element—the type of key that is being stored. Valid values are BDK, MAC, LTMK, TMK, and TPK.

15

The KeyAlgorithm element—the algorithm associated with this key. When this stored key is referenced by other web service calls, this algorithm will be used exclusively with this key. Valid values are AES and TDES.

16

The KeyEncoding element—the type of encoding used in the EncryptedKey element. Valid values include Hex and Base64. If this ANSI key is being assembled from pre-loaded key components, this element must be NULL.

17

The KeySize element—the size of the key being stored. Currently the only supported Keysize is 128.

18

The KCV element—a hex-encoded string representation of the KCV for this Key Component. The KCV will be checked against the assembled/decrypted key to verify the integrity of this key.

19

The Notes element—any notes to store alongside the key.

20

The end of the sequence.

21

The end of CCEncryptedAnsiX9241KeyType.

 

The following shows an example CCEncryptedAnsiX9241KeyType in JSON format (REST interface):

{
  "BankID": 1,
  "TerminalID": 123,
  "TerminalType": "DEFAULT",
  "KeyName": "myTPK",
  "ParentToken": "1000000000000001",
  "EncryptedKey": "982D868704702DF9070922F1DFB260A8",
  "KeyType": "TPK",
  "KeyAlgorithm": "TDES",
  "KeyEncoding": "Hex",
  "KeySize": "128",
  "KCV": "6776FF",
  "Notes": "myNotes"
}

 

This is an example of storing a key wrapped by a previously stored key. If this request were storing a key from key components, the ParentToken, EncryptedKey, and KeyEncoding elements would be omitted. In that case, the KeyName element would be crucial to identify the stored Key Components used to assemble the key.