Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: getting started with encryption Date: Wed, 15 Oct 2014 21:52:14 +0200 Lines: 31 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 2nqHgh0V3Hro7qBv9+wPnwMBI3r/ss07/+dDJVzb3JQ/jB5v45 Cancel-Lock: sha1:JAQ/rSZipfJYJC7qjk6YsMTewBs= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 In-Reply-To: Xref: csiph.com comp.lang.php:14356 On 13/10/14 14:58, bill wrote: > What do you think of this: > > At logon, after the user's credentials are verified, the office server > will (over https) > send a token request to a remote server > take the returned token, modify it to use as transaction token > using the transaction token, request the encryption key (the remote > server will verify that the modified transaction token is correct) > > The key is then kept in a mySQL MEMORY engine table and > the table is DROPed at logout > > This would protect against server theft - unless they steal the UPS > too. No one but the superuser knows the key. (of course the key needs > to be kept in a secure place... just in case) Take a look at tokenizor, you save the token in the mysql server, and the data on the tokenizor, so each time you need to get to the encrypted data, you need to ask the tokenizor to give you the data with presenting the right token, of course you need to validate that the user in question has the right to use the tokenizor. Sure, you will be able to make a lot of things wrong in this process, which makes this to not work as securely as you think. There are of course commercial products you could use for this, but they tend to cost. -- //Aho