Get the public key/certificate associated with a key pair - AWS Payment Cryptography

Get the public key/certificate associated with a key pair

Get Public Key/Certificate returns the public key indicated by the KeyArn. This can be the public key portion of a key pair generated on AWS Payment Cryptography or a previously imported public key. The most common use case is to provide the public key to an outside service that will encrypt data. That data can then be passed to an application leveraging AWS Payment Cryptography and the data can be decrypted using the private key secured within AWS Payment Cryptography.

The service returns public keys as a public certificate. The API result contains the CA and the public key certificate. Both data elements are base64 encoded.

Note

The public certificate returned is intended to be short lived and is not intended to be idempotent. You may receive a different certificate on each API call even the public key itself is unchanged.

$ aws payment-cryptography get-public-key-certificate --key-identifier arn:aws:payment-cryptography:us-east-2:111122223333:key/nsq2i3mbg6sn775f
{ "KeyCertificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUV2VENDQXFXZ0F3SUJBZ0lSQUo1OWd2VkpDd3dlYldMNldYZEpYYkl3RFFZSktvWklodmNOQVFFTkJRQXcKZ1lreEN6QUpCZ05WQkFZVEFsVlRNUmt3RndZRFZRUUtEQkJCVjFNZ1EzSjVjSFJ2WjNKaGNHaDVNU0V3SHdZRApWUVFMREJoQlYxTWdVR0Y1YldWdWRDQkRjbmx3ZEc5bmNtRndhSGt4RVRBUEJnTlZCQWdNQ0ZacGNtZHBibWxoCk1SVXdFd1lEVlFRRERBdzFNamt3TWpjME5UVTBPVFV4RWpBUUJnTlZCQWNNQ1VGeWJHbHVaM1J2YmpBZUZ3MHkKTXpBMk1EWXdNalEzTlRWYUZ3MHlNekE1TURRd016UTNOVFZhTUN3eEZUQVRCZ05WQkFNTUREVXlPVEF5TnpRMQpOVFE1TlRFVE1CRUdBMVVFQlJNS05EUTBPREV4TnpZMU1UQ0NBU0l3RFFZSktvWklodmNOQVFFQkJRQURnZ0VQCkFEQ0NBUW9DZ2dFQkFOZ0loOS9lckd2azJTbHJ6K1ZaVkl0WXpEMDh3QkoxWVZKaDY1Z1J3NkFzbWJ4RUpYc1cKMjI5b3B1ZjhlOFU5TlBQbX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