RSA Public/Private Key Generation

As part of Consumer Capability, we need to upload the public key for your application in the portal. Below lists down steps to generate RSA key-pair and export private/public key in above mentioned format.

Walmart API

Use openssl in terminal
Generate key pair 2048 bit
$ openssl genrsa -des3 -out WM_IO_my_rsa_key_pair 2048 
Export private key WM_IO_private_key.pem
$ openssl pkcs8 -topk8 -inform PEM -in WM_IO_my_rsa_key_pair -outform PEM -out WM_IO_private_key.pem -nocrypt
Export public key WM_IO_public_key.pem
$ openssl rsa -in WM_IO_private_key.pem -pubout > WM_IO_public_key.pem
Copy and paste public key to Key upload page
$ cat WM_IO_public_key.pem

Note: Do not copy these two lines: -----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY-----

Note: Using -des3 ensures that pem file generated in above step will be passphrase protected.


Walmart Open API

1. Generate RSA key-pair
Using openssl
$ openssl genrsa -des3 -out my_rsa_key_pair 2048 
Note: Using -des3 ensures that pem file generated in above step will be passphrase protected.


2. Install the PuTTY tools suit
Install the full PuTTY tools suit, or download the standalone puttygen binary from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html


3. Generate the key
Press the 'Generate' button and move mouse cursor around as instructed.


4. Save the private key
Use the 'Save private key' button, so you can open it with PuTTYgen later.


5. Copy the ssh-rsa public key
Copy the public key from the PuTTYgen window as shown below and paste it to the location where you want to upload the public key for either registering a new consumer Id or update an existing consumer id in the Consumer Capability.