aws-crypto-sdk

Implementation of the AWS Encryption SDK library until an official one appears

Usage no npm install needed!

<script type="module">
  import awsCryptoSdk from 'https://cdn.skypack.dev/aws-crypto-sdk';
</script>

README

node-aws-crypto-sdk

This is a simple implementation of the AWS Encryption SDK. Currently only supports encryption and does not perform any key caching.

TODO:

  • Add decryption method
  • Add simple KMS Key caching when encrypt is called many times.
  • Support HKDF_SHA256 variants
  • Support ECDSA Signing

Example

const awsCryptoSDK = require('aws-crypto-sdk');
const aws = require('aws-sdk');
const kms = aws.KMS({'region': 'us-east-1'});

let plaintext = 'someplaintext';
let ciphertext = await awsCryptoSDK.encrypt(plaintext, 'SOMEKMSKEYID', kms, 'aes-256-gcm', {'some': 'encryption_context'});
console.log(ciphertext);

SDK -> https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/python.html

Docs

Coming soon - for now read the code