开发者

How to use cbc mode in javascript using AES

开发者 https://www.devze.com 2023-04-10 12:35 出处:网络
I want to use CBC mode encryption for the message using AES algorithm (AES code is available) in javascript.

I want to use CBC mode encryption for the message using AES algorithm (AES code is available) in javascript. How can this be done?

I am new to cryptography and javascript. Generating key & IV, padding, taking c开发者_C百科are of padding while decrypting are the issues to be handled. How to get started with this?


I'd suggest you start by reading NIST: Recommendation for Block Cipher Modes of Operation.

It covers CBC, padding and how to generate IVs.

On a side-note:

You may want to start with Counter Mode (also covered in the recommendation). It's by far easier to understand and implement. You don't need any padding and you don't need a separate function for decryption. Encryption and decryption are basically the same thing in Counter Mode.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号