Import a key
Learn how to import a key
Pangea Vault can be used to store user-created keys. After a key is stored in the Vault, its private key material will never be exposed by the Vault service.
Importing an asymmetric key pair
To import an asymmetric key pair, you must provide both the public and private key material. Once imported, the private key material will never be exposed by the Vault service.
The purposes and algorithms supported for asymmetric keys are:
signingalgorithms:ED25519RSA-PKCS1V15-2048-SHA256ES256ES384ES512ED25519-DILITHIUM2-BETAED448-DILITHIUM3-BETA
encryptionalgorithms:RSA-OAEP-2048-SHA256
jwtalgorithms:ES256ES384ES512
POST/v1/key/store
cURL
curl -sSLX POST 'https://vault.'"$PANGEA_DOMAIN"'/v1/key/store' \
-H 'Authorization: Bearer '"$PANGEA_VAULT_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"type":"asymmetric_key","purpose":"signing","public_key":"a_public_key","private_key":"a_private_key","algorithm":"ED25519"}'Importing a symmetric key
To import a symmetric key, you must provide the key. This key will never be exposed to the user.
The purposes and algorithms supported for symmetric keys are:
encryptionalgorithms:AES-CFB-128AES-CFB-256AES-GCM-256AES-CBC-128AES-CBC-256
jwtalgorithms:HS256HS384HS512
POST/v1/key/store
cURL
curl -sSLX POST 'https://vault.'"$PANGEA_DOMAIN"'/v1/key/store' \
-H 'Authorization: Bearer '"$PANGEA_VAULT_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"type":"symmetric_key","purpose":"encryption","key":"aGV5","algorithm":"AES-CFB-128"}'Was this article helpful?