We made some changes

Our new forums are here!

Saving money on data

Mint SIM is the perfect way to get cheap data in the U.S.

Don't count Windows Phone out just yet

Dead? Psh. Here are 5 reasons to stick with Windows 10 Mobile

VPN vs. Proxy

The difference between a proxy and a VPN

Latitude attitude

Dell Latitude 7280 is a business laptop with tons of consumer attitude

4K all the way

You probably don't NEED a 4K webcam, but we love Logitech's BRIO 4K anyway

Long live Windows phone

Contrary to popular belief, Windows phone won't die anytime soon

XP-YESSSSSSS

Dell's already awesome XPS 15 gets even better in 2017

Surface Pwn 5

Surface Pro 5, Project NEON details leaked on LinkedIn?

Redefining the PC

Why Microsoft's Surface phone could be MUCH more than a mere 'phone'

Surface table meets Windows 10

Yes, we did put Windows 10 on the original Surface table ... and it rocks

Cream o' the crop

Before buying a Microsoft laptop, check out our pick for the absolute best

Simple and secure, just the way I like it

We think Windows 10 Cloud is a great idea, here's why

uber micro

Halo Wars 2 has something for everyone. Here's our full review.

Oldie but goldie

We reviewed Microsoft's decade-old Surface table

Creators Update comin' at ya

These are the coolest new features in the next big Xbox One update (video)

Buyer's guide

The Razer Blade 14 is the best laptop Razer has to offer

Windows 10 app gems

10 terrific Windows 10 apps you should be using

Tower of power

Here's what we think of Dell's XPS Tower Special Edition

Quite a deal

Grab the complete C# coding bootcamp for $41!

< >
Welcome to the Windows Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 13 of 13
  1. DBDev's Avatar
    Member

    Posts
    2,387 Posts
    Global Posts
    2,394 Global Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
       #1  
    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.
  2. hopmedic's Avatar
    Member

    Posts
    5,170 Posts
    Global Posts
    5,261 Global Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    #2  
    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.
  3. DBDev's Avatar
    Member

    Posts
    2,387 Posts
    Global Posts
    2,394 Global Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
       #3  
    Unfortunately I don't have twitter :(
  4. SOMEnameItried's Avatar
    Member

    Posts
    69 Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    #4  
    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.
  5. DBDev's Avatar
    Member

    Posts
    2,387 Posts
    Global Posts
    2,394 Global Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
       #5  
    Ok, but do you know how to do it?
  6. SOMEnameItried's Avatar
    Member

    Posts
    69 Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    #6  
    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
    DBDev likes this.
  7. DBDev's Avatar
    Member

    Posts
    2,387 Posts
    Global Posts
    2,394 Global Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
       #7  
    Thank you very much! I will try that soon :)
  8. SOMEnameItried's Avatar
    Member

    Posts
    69 Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    #8  
    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 likes this.
  9. DBDev's Avatar
    Member

    Posts
    2,387 Posts
    Global Posts
    2,394 Global Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
       #9  
    Hi!

    That doesnt 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'
  10. DBDev's Avatar
    Member

    Posts
    2,387 Posts
    Global Posts
    2,394 Global Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
       #10  
    I may should add that it works for desktop.
  11. SOMEnameItried's Avatar
    Member

    Posts
    69 Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    #11  
    this might help provide you with direction

    How to encrypt data in a Windows Phone app
  12. DBDev's Avatar
    Member

    Posts
    2,387 Posts
    Global Posts
    2,394 Global Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
       #12  
    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 :(
  13. SOMEnameItried's Avatar
    Member

    Posts
    69 Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    #13  
    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

Similar Threads

  1. WP8 whole device encryption?
    By that guy with the face in forum Windows Phone 8
    Replies: 5
    Last Post: 05-21-2015, 11:08 AM
  2. Encrypted Email on ActiveSync
    By tk-093 in forum Windows Phone 8
    Replies: 1
    Last Post: 11-28-2012, 12:06 PM
  3. Encryption question
    By cstenson in forum Windows Phone 8
    Replies: 4
    Last Post: 11-08-2012, 05:05 AM
  4. WP 7.5 and local mail encryption
    By oysteinhermansen in forum Windows Phone 7
    Replies: 2
    Last Post: 02-27-2012, 10:48 AM
  5. KIK sends password, messages without encryption
    By 1jaxstate1 in forum Windows Phone Apps
    Replies: 3
    Last Post: 06-29-2011, 03:03 PM

Posting Permissions

";