Advanced Windows Store Apps Development – II Explain the process of encrypting and decrypting user information Explain and create an app using the Windows.Security.Cryptography © Aptech Ltd Securing Windows Store App Data/Session A Windows Store app needs to store application and user data Application data is the information about the app that can be created, modified, or deleted To assist developers, the user has to develop safer apps with secured features The security features offered to the developers by Windows Store are as follows: App sandbox - Provides a secure runtime engine that executes the app with a potential container This sandbox avoids direct communications between Store apps and the system The sandbox is a secured environment, which allows your app specific rights and allows it execute the code App capabilities - All the apps have their own device capabilities, for example, Documents Library or Webcam Digital signature - All apps are signed The apps are signed spontaneously through certificate that is associated with the developer account or manually using their own certificate © Aptech Ltd Securing Windows Store App Data/Session Windows.Security.Cryptography Namespaces This Windows.Security.Cryptography has a class that is used to encode or decode, hashing random numbering, byte arrays, and buffer conversion Cryptography is used for: Authentication Confidentiality Data integrity Nonrepudiation Following table shows all the classes that can be used to encrypt and decrypt the data Cryptography namespaces hold the methods given in this table Term Description Encryption Encrypts the app data Decryption Decrypts the app data © Aptech Ltd Securing Windows Store App Data/Session Term Description Plaintext Data without encryption (unencrypted data) Cipher text Encrypted data with unreadable, text message Hashing Converting variable length data into a fixed length Signature Encrypted hash of digital data Algorithm Procedure for encrypting data Key A random or pseudorandom Symmetric Key Cryptography Same key is used for encryption and decryption Asymmetric Key Cryptography Public key and Private key algorithm, where one key is used for encryption and the other key is used for decryption of data These keys are mathematically related keys Encoding Encoding digital messages Algorithm Provider A DLL that implements a cryptographic algorithm © Aptech Ltd Securing Windows Store App Data/Session Encrypting File System (EFS) and BitLocker Encrypting File System (EFS) is a feature of Windows that can be used to store data on hard disk in an encrypted format It is the strongest protection used to secured data in Windows BitLocker Disk Encryption (BDE) is an encryption algorithm that was introduced by Microsoft with Windows Vista and Windows It is used to encrypt entire disk drive It is designed to protect the entire volume There are some differences in BDE and EFS encryption algorithms In order to understand the comparisons between the BitLocker and EFS, it is necessary to understand the difference between these encryption algorithms © Aptech Ltd Securing Windows Store App Data/Session 6 Table provides the differences between BitLocker and Encrypting File System BitLocker Encrypting File System (EFS) Encrypts all personal and system files Encrypts personal files and folders oneby-one Does not depend on the individual user Depends on the user account accounts BitLocker Module uses the Trusted Platform EFS does hardware not require or use any Device administrator is required to turn Device administrator is not required to encryption on or off the device turn encryption on or off the device © Aptech Ltd Securing Windows Store App Data/Session Setting UAC Prompts User Account Control (UAC) can help users prevent unauthorized changes to the settings UAC notifies the user whenever changes are going to be made These types of changes can affect the sf16LE, resultBuffer); return result; } © Aptech Ltd Securing Windows Store App Data/Session 30 Data Encryption and Decryption Step 1: Create new project from File New Project Step 2: Write the code given in Code Snippet to design the UI page Code Snippet: © Aptech Ltd Securing Windows Store App Data/Session 31 Code Snippet (Cont.): © Aptech Ltd Securing Windows Store App Data/Session 32 ... x:Class=”EncryptDecryptDemo.MainPage” xmlns=”http://schemas.microsoft.com/winfx/2 006/ xaml/presentation” xmlns:x=”http://schemas.microsoft.com/winfx/2 006/ xaml” xmlns:local=”using:EncryptDecryptDemo” xmlns:d=”http://schemas.microsoft.com/expression/blend/2008”... Aptech Ltd Securing Windows Store App Data /Session 32 Step 3: The UI design is shown in following figure © Aptech Ltd Securing Windows Store App Data /Session 33 Step 4: Write the following Code... Windows Store App Data /Session 39 Step 5: Execute the app Following figure shows the output of the app with the necessary fields © Aptech Ltd Securing Windows Store App Data /Session 40 Step 6: The