How to encrypt and decrypt using AWS KMS keyrings in PHP?

99 views Asked by At

AWS KMS provides the AWS Encryption SDK https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/introduction.html with keyring support. But there's no PHP version of the SDK. At the same time, some AWS services use keyrings like Cognito which sends a verification code to a custom Lambda sender encrypted with a keyring.

I need to encrypt and decrypt this kind of data with PHP in the same way as, for example, JavaScript Encryption SDK does to decrypt data from Cognito. How can I do that?

Addition: I'm aware of the regular AWS SDK for PHP, but it doesn't allow working with keyrings. Keyrings are only available in AWS Encryption SDK: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/using-keyrings.html. AWS SDK and AWS Encryption SDK are two different things

0

There are 0 answers