Konaplate logo

Guidelines

What is MESSAGE ENCRYPTION ?

The API provided for the use of the KONA payment platform service through KONA PLATE provides requests for or responses to personal information and sensitive data.

KONA PLATE is reworking data security services through asymmetric encryption to prevent data reuse due to various sensitive external leaks such as TLS (transmission layer) security, card information, and customer information. 

ME is provided when the data below is included.

ME is provided when the data below is included.

  1. PII (personally identifiable information)
  2. PAN (primary account number / personal account number)
  3. Personal Account Personal Account Information (PAI)

KONA PLATE's ME uses asymmetric encryption technology (public key encryption) to provide improved security for message meffyloads. 

ME was developed with symmetric encryption using either 128-bit or 256-bit Advanced Encryption Standard (AES), Glois Counter Mode (GCM). 

Key encryption is supported with 2048-bit RSA Asymmetric Encryption Padding (OAEP).

The ME supports encryption/decryption of Request and Response via SSL using JWE and should be requested by checking the API for Request/Response encryption.

Please check API Document for request/response encryption of API.

  1. Server Certificate : When sending a request to KONA PLATE, the client encrypts the message payload using the server public key, and KONA PLATE decrypts the payload using the server private key.
  2. Client Certificate : When receiving a response from KONA PLATE, KONAPLATE encrypts the payload using the client's public key and the client decrypts it using the server's private key.

 


How to request MESSAGE ENCRYPTION

  1. Obtain an encryption key from the generated project.

  2. Use the server's public key to encrypt the payload and generate it as a string.

  3. Adds the encryption key ID as the name of the X-KM-Crypto-Key-Id to the header of the request.

    Header  Value
    Accept application/json
    X-KM-Crypto-Key-Id x-km-crypto-key-id*
  4. Request API to server with field name of enData. The response is also answered by the field name of the encData if there is an encryption setting. 
  5. If the response value is encrypted, decrypts the data with the server public key of the encryption key of the header value of the response value.

Sample Message Encryption

Type Message
Request {
    "encData": "eyJlbmMiOiJBMTI4R0NNIiwiYWxnIjoiUlNBLU9BRVAtMjU2In0.Jr_65BmLWw6lpcbRTWXH6fi04RvoSs6nv6WRh99mletj5vSoFkJf6y
JnJrtz3FKw9t2oOLX-_zb-F08dOtt6xVlMlb41HEIvRtINGNpMIKNQnmryiVCmDyPc7NFxLoCTMAcv4cxtL9FX-TpX_sNty5Nm2MsrKNnjln8nVQvoFtt
br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VjQaWrHnLNR1cHR0mWJeUW4xTeGnVrtYeWjH
uJ7zsgMhvLQbISaySDRqEu7fEA8Jp7TkC0ywR-0f8ajRYDstFotcTDkP9QI1CadVLCEBIm3ndFkn5BIj-i6xcfZSOFn2rzc0GsezqbY07DcebTtC2CAmQZLdJ-iWTpU-6mdV_nSy1NPlry0eszsQlwItTTB2ktsUTll9oRpdyaucPTMB2r90Lc9bDMy1bipUMgBLoLGyFUNC-1BDgUnmC_X6nYoCDA7QHH_F53xtbNn4lb8a6THCHFFgTMz63rgtwg9r2pAeDMBH7ouTRDzLN4SKlU0OpjmhcQ1Td0WoyjfUHoCse_Cm9-Zbueegfk5XB24YF0ctK.-NN9qbJL-HRd3gfcGBZBfA"
}

 


PEM Sample 

  1. The encoding method is UTF-8
  2. The server PEM file does not provide a private key.

File Name Example : 5cd10fa4b92f7b33995360267efc67cf_client.pem

-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnuPt1AO/tRu/67qbs/wkJlKJ+8rD69CoG6i2BjFN1RfURse2KTNPT+Yp8JUn9Pgk7Qm8kawPbQoGmizo3deLwc0
oQJimxaIDtFuAFWNXFlXN//Foi+BrLtHCETJ0MV4t3PSAhntiCG6I6dloKl4VtHqwpqJxSp7aWvAmVWd83tG5QhSY4Zmlb9HrK5cTcQKBQE9iAbHj0hHprWj9Am2sN9D5jYA
N6FXf05Oan3hY7ulIixPCiuQUUZQep3AmvsAlJS95skbsmlUxfyDZSvdjLO0TJ9Vaa1mPp5A8Gd3kyvrJ8Atktx9HGZqz0JPdMx9ft5PuV+EqHocNSPRHM44pgwIDAQAB
-----END PUBLIC KEY-----

-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCe4+3UA7+1G7/rupuz/CQmUon7ysPr0KgbqLYGMU3VF9RGx7YpM09P5inwlSf0+CTtCbyRrA9tCga
aLOjd14vBzShAmKb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