XML CRYPTOGRAPHY CS 795. NET Sunish Kotla
OUTLINE What is XML Encryption? Approaches to XML Encryption How Encrypted Data is Stored? Types of XML Encryption Benefits of Xml Cryptography
XML ENCRYPTION W3C standard for encrypting XML elements. Specification that defines how to encrypt data Provides end-to-end security for applications that require secure exchange of structured data.
A PPROACHES TO XML E NCRYPTION Encrypt the xml using symmetric encryption only Encrypt the xml using a combination of asymmetric and symmetric encryption Encrypt the xml using a X.509 Certificate
H OW E NCRYPTED D ATA IS S TORED ? Two approaches: Whole element is replaced with an element named Only the data in the element is replaced and its name remains readable in the document
XML DOCUMENT
E NCRYPTED C ODE
N AMESPACES System.Xml System.Security.Cryptography System.Security.Cryptography.Xml
A SYMMETRIC XML E NCRYPTION P ROCESS Select an element in an XML document (selecting the root will encrypt the whole document). Encrypt the element using a symmetric encryption key, known as the session key. Encrypt the session key using asymmetric encryption (the public key is used). Create an EncryptedData element which will contain the encrypted data and the encrypted session key. Replace the original element with the EncryptedData element.
A SYMMETRIC XML D ECRYPTION P ROCESS Select the EncryptedData element in an XML document Decrypt the session key using an asymmetric key (the private key is used) Decrypt the cipher data using the unencrypted symmetric encryption. Replace the EncryptedData element with the unencrypted element.
T YPES OF XML E NCRYPTION Consider the following example: John Smith Example Bank 04/02
E NCRYPTING AN XML E LEMENT John Smith A23B45C56
E NCRYPTING XML E LEMENT C ONTENT John Smith A23B45C56
E NCRYPTING XML E LEMENT C ONTENT (C HARACTER D ATA ) John Smith A23B45C56 Example Bank 04/02
B ENEFITS OF X ML C RYPTOGRAPHY Encrypted data is maintained. Session can be secured on the document level and shared between multiple parties. Sensitive data is easily interchanged between applications.
R EFERENCES XML Encryption by By: Derek Smyth : aspxDerek Smyth aspx XML Encryption Syntax and Processing By Takeshi Imamura, Blair Dillaway, Ed Simon encrypt2/ encrypt2/
Thank You!!!