Generate Public-Private key pair for API User
1 min
Public and private keys are cryptographic tools used to secure communication and authenticate users in digital systems. In the context of API access, these keys help ensure only authorized users can interact securely with your service.
There are two recommended ways to generate your public-private key pair: using the SDK, or using OpenSSL from the command line.
Option 1: Using the SDK
- Make sure you have set up the SDK.
- Call thegeneratePublicPrivateKeyPair util function in the SDK.
This will return your keys as strings. Save them securely.
Option 2: Using OpenSSL (command line)
- Make sure OpenSSL is installed in your system.
- Run:
openssl ecparam -name prime256v1 -genkey -noout 2>/dev/null | tee >(openssl ec -pubout 2>/dev/null)This will output your private key and then your public key. Copy and save them securely.
Related Links:
- PrimeVault SDKsSDK Setup Guide