Encryption (Windows Runtime apps)

[ This article is for Windows 8.x and Windows Phone 8.x developers writing Windows Runtime apps. If you’re developing for Windows 10, see the latest documentation ]

Encryption disguises data by altering it so that its original form cannot be determined. Decryption restores encrypted data to its original form. Data is encrypted by using an algorithm and a key. A key is a random number. An algorithm is a step-by-step procedure that uses the key to transform the original data. Anyone who has access to the key can decrypt encrypted data. Encryption can use symmetric or asymmetric keys. Symmetric encryption requires that the same key be used to encrypt and decrypt the data. Asymmetric encryption requires that separate, but mathematically related, keys be used to encrypt and decrypt. For more information, see the following topics.

Note  Encryption stops an eavesdropper from reading a message but does not prevent the eavesdropper from changing the message—even if the malicious change produces nothing more than a nonsense message. To determine whether a message was tampered with in transit, the person receiving the message should authenticate it. That is, encryption should be combined with authentication.