My apologies if I get my terminology wrong - I am new to this stuff.
I am writing a routine (in c) to encrypt plaintext. I am using TinyAES to perform a CBC on the plaintext and sending a (pseudo)random IV with the encrypted text.
The user supplies a password (ascii) which I pad to key length with a known (constant) block of bytes (from https://keygen.io/). I then want both to spread the key byte values across the entire key length and to distribute the values of the bytes across the entire 0-255 range.
To do this I am currently using AES ECB with another known (constant) block of byte values (again from https://keygen.io/) as the key. For AES192 and AES 256 I perform a second ECB on the key buffer offset by 8 and 16 bytes respectively.
Using this method I can generate the same key from the same password every time. Is this a good spreading technique? Or am I falling into one of the many traps for the unwary?
I am using AES ECB so that I do not need any more library code in my app.....