Page 1 of 1

Unclear about encryption

Posted: Wed Apr 24, 2013 8:20 pm
by makeshyft
Hello Geniuses....

After reading some posts in the forum I am still unclear about how encryption works in Livecode.

Is it possible to encrypt a password into an XML file?

and THEN encrypt the whole XML file using a public key before saving it ?

and then loading the file after asking for

1.the public key to decrypt XML
2. asking for the user's own individual password to load info into memory?

EDIT .... Public encryption key would be given to everyone who needs to access the file, but each user would also have their own passcode giving them access to certain information in the file.




My app must have the option for file encryption because some users will enter confidential information.

Thank you all for any thoughts that you can share on this topic. I am designing for Win/Mac/Linux for now.

If its possible, I will take the time to learn how....hope it is.

Re: Unclear about encryption

Posted: Thu Apr 25, 2013 2:06 am
by Simon
Hi makeshyft,
The answer is yes but will take some work.
Encrypt the entire XML, no problem the User Notes show you that.
It gets complex when you try to encrypt just a portion of the same file, but not impossible.

<userName>Dave</userName>
<favIceCream>Salted__:͹ôS•ĸÈìà&W!F</favIceCream>
<favColor>Blue</favColor>

Code: Select all

if userName= "Dave" and chars 1 to 8 of favIceCream = "Salted__" then 
decrypt favIceCream using "rc4" with daveKey
put it into favIceCream
You would probably include many tags to encrypt together.
The finished XML would be a mess.

Simon

Re: Unclear about encryption

Posted: Thu Apr 25, 2013 4:11 am
by makeshyft
Thank you for your reply. I am happy to hear its possible!

I will be encrypting the ENTIRE xml file on save, but the unencrypted XML file will first contain a passcode for a user as part of the XML.... as far as I know I can simply use MC Encrypt for the password. So I should be able to avoid the difficulties you mentioned.

Thank you Thank you!