I was trying to come up with AES encryption scheme for my project. Basically I want the user to crypt data using just a 32 byte key to decrypt a file of crypted data, since remembering and storing vi for every block seems very cumbersome. I know of many encryption programs that use just a key for encryption and nothing else. How do i go about this problem?
My current scheme looks something like this:
Block:
16 bytes vi, up to 1 048 576 bytes of data (1MB)Encryption:
- Input 32 byte key
- First vi is randomly generated 16 bytes that get encrypted with AES ECB (initial key)
- 1MB of data is encrypted using CTR (initial key, the block vi)
- Any further block follows the same logic
Decryption:
- Input 32 byte key
- Decrypt first 16 bytes using ECB
- Decrypt the first block of data using CTR (initial key, the block vi)
- Any further block follows the same logic
Is this good enough security wise? I think it should work since vi for every block is random, and since vi itself is encrypted using ECB it works pretty much like one time pad, correct?