I made this video for my database class at Full Sail. In it I talk about some basic salt usage and the built in aes_decrypt and aes_encrypt functionality of MYSQL.
For values like the password in which you will never need to use the original cleartext again, using encryption is bad practice because if the key is compromised it could be reversed by an attacker. Instead for passwords, user for PHP password_hash and password_verify functions(and generally any bcrypt) to do this.
You have really explained well I would appreciate it and I have one question is if the password is same, and we are using salt so is this mean every salt must be unique key values because if its same it will give the same encryption, right?
let's say you have a database of over 100 usernames and passwords. Is there a way we can apply encryption to everything in the column as opposed to individual one by one?
A very good intro to basic decryptable encryption. 👍
For values like the password in which you will never need to use the original cleartext again, using encryption is bad practice because if the key is compromised it could be reversed by an attacker. Instead for passwords, user for PHP password_hash and password_verify functions(and generally any bcrypt) to do this.
Thank you very much, CAST function solves my problems. Also the salt addition is also huge. Have a nice day
Very well explained thank you ..
If you use procedures, you can also pass in a pepper value that is stored outside of the database.
Thanks you very much
What about LIKE and ORDER BY using encrypted columns?
Where can I find this feature in MySQL database?
Tom, when I set the type of user and password is varchar(), there is an error: Incorrect string value for columm user at row 1
How to fix it ?
change it to varbinary()
why not encrypt the salt and decrypt whenever needed (you may use the same key or another.)
BTW other comments are interesting.
I get blob, but when I add cast as char it doesn't work...
You have really explained well I would appreciate it and I have one question is if the password is same, and we are using salt so is this mean every salt must be unique key values because if its same it will give the same encryption, right?
as i was watching this video i had the same question but there's an easy fix for that as the username is already unique u would use that as your salt
Sucks that the videos is unclear. But still a good lesson.
Gracias amigo.
I can't see clear video beacuse no clear in words
Hey add some more video in mysql
let's say you have a database of over 100 usernames and passwords. Is there a way we can apply encryption to everything in the column as opposed to individual one by one?
update usernames set password=encrypt(password) where id > 0;
@@svens3722 Thanks.
@@svens3722 how to decrypt this please tell???
@@anirudhrana489 just use the aes_decrypt function
You should use hash or sha2 instead of encryption
you could probably use both by encrypting the hash
the video title says encrpytion, not hashing. he just want to explain encryption in this enviroment. not safety or anything else.