I need to encrypt some text strings using keys on client side and then decrypt this encrypted string on server side using the same key used for encryption on client side.
So the way I understand this, AWS KMS is built on top of AES.
So can I use AES encryption in Javascript using CryptoJS on client and AWS KMS SDK on server to decrypt it?
The reason for this question is that I can use AWS Javascript SDK on client (browser) side, but... I think AWS Javascript SDK will be probably having large memory footprint. And I do not want to initialize AWS config etc on client side either (not sure if I have to do this for just using single encrypt function from AWS KMS JS SDK). CryptoJS appears to be more slick and has small memory footprint. And it supports AES. I want to keep my task to the minimum... as the main goal here is to do client side encryption and then decrypt it on server using symmetric encryption.
It would be coincidence if the two implementations would match. Usually it will not match as AES is only the crypto algorithm, however those crypto frameworks use more than that. Therefore all the other algorithms have to match, too:
Only if those three algorithms are the same on client and server side you will be able to encrypt with one framework and decrypt with the other.