Get ready for beta!

Prepare for Halo Wars 2 Blitz Mode beta: Everything you need to know!

One Windows

Microsoft is building a new Windows 10 Shell for PC, Mobile and Xbox

On the Inside

Everything you need to know about the Xbox Insider Program

Beautiful compromises

Surface Studio review: you'll want one, even if you don't need one

3-in-1

Is this the Surface Phone? Microsoft awarded patents for foldable devices

Windows Central Offers

MCSE Certification bundle is just $39

Even more improvements

All the changes found in Windows 10 build 15007!

Games as a Service

What does the cancellation of Scalebound mean for future Xbox exclusives?

Windows Central Offers

Save $90 on these FRESHeBUDS Pro Magnetic Bluetooth Earbuds

Returning for 2017

We're back with an new episode of #AskDanWindows

Lifetime Subscription

VPNSecure is currently 91% off

Our favorite things

The Best of CES 2017 Awards

Infinity Edge in your hand

The XPS 13 2-in-1 is the Dell convertible we've always wanted

Project Valerie

Razer just made a laptop with three — THREE! — 17-inch 4K displays. 😱

Great design from Palo Alto

HP's CES 2017 releases are truly gorgeous PCs

Intel and Google's big day

CES 2017 Day Two: New laptops, new phones, and old ideas made new

Take five is better than ever

The updated Lenovo ThinkPad X1 packs Kaby Lake chips and zero bloatware

Everything we know about the next Xbox: Project Scorpio

UWPowered

'Game Mode' for Windows 10 will power Xbox One and Scorpio games too

Buyer's guide

Best accessories for Microsoft Surface Book

< >
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
       #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,157 Posts
    Global Posts
    5,248 Global Posts
    #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
       #3  
    Unfortunately I don't have twitter :(
  4. #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
       #5  
    Ok, but do you know how to do it?
  6. #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
       #7  
    Thank you very much! I will try that soon :)
  8. #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
       #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
       #10  
    I may should add that it works for desktop.
  11. #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
       #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. #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