# What if AES-128 key / text length is more or less than 16 characters

In this example ( https://kavaliro.com/wp-content/uploads/2014/03/AES.pdf ), the AES-128 key and text are 16 characters each, but how would this example be explained if the key or text was more/less than 16 characters? How would this change the procedure that creates the encrypted text?

• hint: Look at ECB and CBC and see padding then CTR with no padding. – kelalaka Feb 27 '19 at 20:35

For example, you could use scrypt to derive a 256-bit key $$k$$ from your password, and then encrypt your message $$m$$ using the authenticated cipher AES-GCM under the key $$k$$—or the even better authenticated cipher crypto_secretbox_xsalsa20poly1305 from NaCl which doesn't involve AES at all.