Unclear about encryption

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
makeshyft
Posts: 222
Joined: Mon Apr 15, 2013 4:41 am
Contact:

Unclear about encryption

Post by makeshyft » Wed Apr 24, 2013 8:20 pm

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.
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Unclear about encryption

Post by Simon » Thu Apr 25, 2013 2:06 am

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
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

makeshyft
Posts: 222
Joined: Mon Apr 15, 2013 4:41 am
Contact:

Re: Unclear about encryption

Post by makeshyft » Thu Apr 25, 2013 4:11 am

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!
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com

Post Reply