I will be using AES-256 symmetric encryption VIA Open SSL. Please have a look at my workflow and let me know if it looks secure.

Encryption workflow

1: APP will encrypt data securely using Open SSL with PHP (A unique key will be generated for each user)

2: APP will encrypt all sensitive user data using the key in step 1.

3: APP will encrypt users generated key with a second key(Client side master key) before sending to AWS. This key will be stored in config file on my server (This keys only function will be preventing AWS from ever seeing the users key)

4 Send key generated by client side master key to AWS API Gateway for encryption.

5 Trigger an AWS lambda function on successful API Gateway Request.

6: Lambda function will encrypt the client side Master key using the AWS KMS Master Key and then store Master Key along with encrypted sensitive user data in Dynamo DB

Decryption workflow

1: Make Call to AWS gateway - trigger lambda function

2: lambda function will retrieve the users sensitive encrypted data, plus key - Lambda function will then decrypt key generated by AWS Master Key

3: Lambda function then will return response to API gateway containing the encrypted card data and encrypted key

4: APP will decrypt the retrieved key with open SSL using client side master key.

5: Decrypted client side key will then decrypt the users card data.

Notes: App will be behind WAF have an IPS, IDS, Anti-virus and a FIM solution in place. FIM will check for any changes to the file system and alert me VIA E-Mail, plus I will add some logic to automatically disable AWS KMS Master Key if FIM detects a change.

Additional Note: Access to AWS API Gateway will be limited to my servers IP address.

Please let me know your thoughts and suggestions.

  • 1) What kind of data are you dealing with? 2) How will the data get to the server? 3) Are you sure you’re not unnecessarily complicating the workflow? 4) If you don’t trust even AWS KMS, let alone other services, maybe AWS isn’t the right platform for you and you may be better served with a colocated physical server somewhere? – MLu May 7 at 8:45
  • @MLu 1: Sensitive user data such as passport number, etc 2: Form POST 3:I'm pretty sure I'm not complicating the workflow, but hey if you have a way of simplifying the workflow I'm all ears. 4: It's not that I don't trust them. I trust them more then any provider out there. Their data centers go through more audits then just about any data center, but an extra security measure could never hurt. – Logical Nonsense May 7 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.