Each set of Credential Data (primeCred = 16 total bytes, scndCr = 16 total bytes) will be encrypted using AES-256 Cipher-Block Chaining (CBC) with an Initialization Vector (IV) of zero, where the key is your secure Site Key. Depending upon the tool used to encrypt the credential data, it may be easier to use “Electronic Codebook” (ECB) for each credential since the IV is zero for each credential and they are not chained together.
For the table below, the site key was: [0x1234 5678 90AB CDEF 1234 5678 90AB CDEF 1234 5678 90AB CDEF 1234 5678 90AB CDEF]. The online tool at aes.online-domain-tools.com was used to generate the encrypted values – this tool can do both CBC and ECB. Other tools can only use ECB and will work just fine. An example of another tool can be found here: http://www.hanewin.net/encrypt/aes/aes-test.htm
| Ref ID (User #) for Visual Purposes | PrimCreds (sorted and encrypted) |
|---|---|
| 5 | [0x3411 0EA5 49AA 549A A73F F06D C93B 63B4] |
| 3 | [0xCD38 8DD0 ACA9 7174 9203 D015 9264 C379] |
| 4 | [0x3BB9 9478 5B06 A240 1814 0A60 13CE 7477] |
| 2 | [0x77EB 0B84 7C38 08F5 A8F8 2844 622B F531] |
| 1 | [0x33DE CE61 76AF 0095 F8A0 EEE4 04D6 1F24] |
From the Encryption Example above, user #5’s primary credential should be 16 bytes as shown below:
“primeCred”:”34110EA549AA549AA73FF06DC93B63B4”,
“prCrTyp”:”card”,
“scndCr”:”null”,
“scndCrTyp”:”null”