Encrypt

DBDev

New member
Jan 13, 2012
2,380
0
0
Visit site
Hi!

Is it possible to encrypt data in a WP app using C# and then be able to save the encrypted data to Skydrive to be decrypted in a windows desktop program?

I want to create a password saving app that can sync to the PC but I am no expert when it comes to encryption/decryption ;) The methods I have found seems to encrypt the data using some kind of number from the phone which means that only that phone can decrypt the data. That will not work in my case.
 

hopmedic

Active member
Apr 27, 2011
5,231
0
36
Visit site
Yes - I just answered on your other post. Give @gcaughey (Ginny Caughey) a shout on twitter. She does it in Password Padlock. I'm sure she'll point you in the right direction - IIRC she's a WP MVP.
 

SOMEnameItried

New member
Dec 6, 2012
70
0
0
Visit site
Yeah, you'd just need to make sure both places (app and desktop) have the same key.

If you think about it, this has been happening already and quite a while, It's not really encryption, but just ways to compress files like media.

Anyway, yes. It is do-able. For C# I think you get more options if you use .NET 4.5 Framework. They have more SHA options in there.
 

SOMEnameItried

New member
Dec 6, 2012
70
0
0
Visit site
Yes I do, but I thought you wanted advice on the direction to go.

Anyway, here is someone's post on the subject to help you out. This practice still works today, and if you abstract these items, supply interfaces, and unit test them, I'm sure it'll make building it even easier for you.

C# Encryption

Cheers,
Kelly
 

SOMEnameItried

New member
Dec 6, 2012
70
0
0
Visit site
You're welcome!

Also as a fun tid-bit of info (because encryption can get hairy) here's something on web encryption (and login). While it doesn't directly affect what you're after, it does a good job at explaining some of the pitfalls of how passwords get broken (which can apply with data too). So when a user connects to their SkyDrive, this should start getting you to think about how someone might listen in on the connection between a user's phone and the it (the SkyDrive) and where decyption should take place in the process.

Secure Salted Password Hashing - How to do it Properly

Cheers,
Kelly
 

DBDev

New member
Jan 13, 2012
2,380
0
0
Visit site
Hi!

That doesn?t seem to work in WP. I get the following errors:
error CS0117: 'System.Security.Cryptography.SymmetricAlgorithm' does not contain a definition for 'Create'
error CS0117: 'System.Text.Encoding' does not contain a definition for 'ASCII'
error CS0117: 'System.Text.Encoding' does not contain a definition for 'ASCII'
 

DBDev

New member
Jan 13, 2012
2,380
0
0
Visit site
Hi!

That method uses some unique number from the phone so I will not be able to decrypt it on another phone or on the computer :(
 

SOMEnameItried

New member
Dec 6, 2012
70
0
0
Visit site
At that point, I'd say you have some investigating to do! :)

This happens in software and using apis / sdks quite often, so don't get discouraged.

You might want to take a look at the ProtectedData's namespace, and see if there are other options (classes, methods, etc...). Still you're right, you can't encrypt on the phone with its pin and different encryption classes than the desktop. You also may want to search for variations in regards to encryption. For example, some people maybe trying to encrypt a different way and asking for help doing that with email. I don't know if they're trying to go for the same ambitious level you are (by going to desktop), but maybe that helps a little in guiding you.

Cheers,
Kelly
 

Members online

Forum statistics

Threads
323,126
Messages
2,243,304
Members
428,031
Latest member
quicktravo