1

I have the following the table named MYTABLE with following columns

  `idMdP` int(11) NOT NULL AUTO_INCREMENT, 
  `login` varchar(255) NOT NULL, 
  `password` varchar(255) NOT NULL,  
  `url` varchar(255) NOT NULL,

I use it only via PHPMYADMIN.

My aim is to :

  • encrypt (AES 256 or AES 512) the password column with a unique key
  • using the key to decrypt the column and visualise all columns via a sql query

Is it possible?

S12000
  • 3,345
  • 12
  • 35
  • 51
  • You shouldn't encrypt a password, you should use a password hash function; see also [this answer](http://stackoverflow.com/a/10945097/1338292) [assuming php] – Ja͢ck Jun 24 '15 at 01:47
  • I think I should use a hash for a traditional php/mysql application because it would be not ehical to know the password of the user based on a single key. But in this case I would like to get a key because all the database is related to my own information and I am the only user. So I dont see why a should use a hash (???). – S12000 Jun 24 '15 at 12:21
  • Then I don't see why you need encryption either. – Ja͢ck Jun 24 '15 at 13:29
  • because for instance if someone steal my laptop he will have difficulty to to decrypt my passwords withouth knowing the key – S12000 Jun 24 '15 at 13:34
  • In case someone steals your laptop you encrypt the file system. Because the encryption key is most likely kept on that same system anyway and unless the key is protected by a password itself you won't see any benefits. – Ja͢ck Jun 24 '15 at 13:37

0 Answers0