On 13 Mar 2008, at 17:44, Diego Bernardes wrote: > Hehe, i made a test with openssl and storing in mongoose, i think ppl > will never, ever open it, but, well, its impossible to made a game > with > it XD on my notebook (celeron 1.5ghz) took 1 sec to read the data > inside > the database, decrypt and open it ( not a big file, 150k ), well in > game > its not less then 10mb per map, so.... > yea i will keep searching for a better solution =/ OpenSSL performance is very dependent on the strength of key you use, not to mention that it's a ropey library anyway :) You'll improve performance a bit by storing your encrypted game data in standard flat files and breaking it into lots of smaller files which decrypt on demand. Also for text data you'd be advised to compress it first before encrypting as that reduces the amount of data you have to encrypt and beyond a certain critical threshold should overall reduce processing time. On the encryption front, use one of the symmetric cyphers - they're not particularly secure but they're usually computationally much less intensive that public/private key crypto. The one big problem you'll have to address though is how you're going to hide the keys so that players can't tamper. For network traffic this is easy (there's a solution using a roll-your-own Hybrid Key Infrastructure in the presentation I pointed you to) but for distributed applications the keys have to reside on the machine running the application and are therefore easily discovered... Ellie Eleanor McHugh Games With Brains ---- raise ArgumentError unless @reality.responds_to? :reason