[erlang-questions] Encrypting/Decrypting data

Chris Hicks silent_vendetta@REDACTED
Sun May 1 00:31:30 CEST 2011


Of course right after hitting enter I thought of a possible solution...if I'm storing a record that looks something like:
-record(data, {id, encrypted_data}).
Would the solution be to create two functions (one for the Key and one for IVec) that take the plain/exposed id and create a binary of the proper size to be used in encrypting/decrypting? Obviously the functions would have to return the exact same output for any given input but, unless someone got their hands on the original code, that seems like it would be fairly secure.

From: silent_vendetta@REDACTED
To: erlang-questions@REDACTED
Date: Sat, 30 Apr 2011 15:25:38 -0700
Subject: [erlang-questions] Encrypting/Decrypting data








This is a bit more of a general question than Erlang specific but I hope someone here can answer this, or simply point me to a place where it has already been answered.
I'm writing a server in which I will be storing encrypted user data (unlike Sony). My problem is probably a product of zero experience with encryption combined with a lack of sleep, but I can't figure out how to do this securely. By that I mean I understand how to use crypto to encrypt/decrypt a piece of data but the Key and the Ivec have to be the same for both the encryption and decryption otherwise it doesn't work...so how do I make this happen without storing those two things "out in the open?" It seems like that can't be the optimal solution since anyone who could just grab those and decrypt the data. Am I missing something completely obvious?
Chris Hicks.

 		 	   		  

_______________________________________________
erlang-questions mailing list
erlang-questions@REDACTED
http://erlang.org/mailman/listinfo/erlang-questions 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110430/da08cf01/attachment.htm>


More information about the erlang-questions mailing list