XML Cryptography - PowerPoint PPT Presentation

About This Presentation
Title:

XML Cryptography

Description:

Krishna Sattiraju CS 792 .NET Overview What is XML Encryption Methods for Encryption Storage of Encrypted Data Benefits of XML Secure Storage Types of XML Encryption ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 20
Provided by: Krishn72
Learn more at: https://www.cs.odu.edu
Category:

less

Transcript and Presenter's Notes

Title: XML Cryptography


1
XML Cryptography
  • Krishna Sattiraju
  • CS 792 .NET

2
Overview
  • What is XML Encryption
  • Methods for Encryption
  • Storage of Encrypted Data
  • Benefits of XML Secure Storage
  • Types of XML Encryption

3
XML Encryption
  • Specification that defines how to encrypt data
  • Used to encrypt data, keying information and
    algorithms

4
Methods for encryption
  • Using Symmetric Encryption
  • Combination of Symmetric and Asymmetric
    Encryption
  • X.509 Certificates

5
Storage of Encrypted Data
  • Whole element is replaced with an element
    named ltEncryptedDatagt
  • Only the data in the element is replaced and its
    name remains readable in the document

6
XML Document Code
7
Encrypted Code
8
Asymmetric XML Encryption and Decryption
  • Select XML Element
  • Encrypt element
  • Encrypt Session Key
  • Create Encrypted Data element
  • Replace Original element
  • Select Encrypted Data element
  • Decrypt Session Key
  • Decrypt Cipher Data using unencrypted symmetric
  • Replace the Encrypted Data Element

9
Name Spaces
  • System. XML
  • System.Security. Cryptography
  • System.Security.Cryptography.xml

10
Benefits of XML Secure Storage
  • XML Is Structured Format
  • Allows for secure storage of documents
  • Provides granularity
  • Leverages Existing technologies

11
XML Encryption
  • Encrypted data is maintained.
  • All information needed to decrypt a document is
    contained within the document.
  • Session can be secured on the document level and
    shared between multiple parties.
  • Sensitive data is easily interchanged between
    applications.

12
XML Encryption of Element
lt?xml version'1.0'?gt ltPaymentInfo
xmlns'http//example.org/paymentv2'gt ltNamegtJohn
Smith lt/Namegt ltEncryptedData Type'http//www.w3.
org/2001/04/xmlencElement' xmlns'http//www.w3.o
rg/2001/04/xmlenc'gt ltCipherDatagt
ltCipherValuegtA23B45C56 lt/CipherValuegt
lt/CipherDatagt lt/EncryptedDatagt lt/PaymentInfogt
13
XML Encryption using Content
lt?xml version'1.0'?gt ltPaymentInfo
xmlns'http//example.org/paymentv2'gt ltNamegtJohn
Smith lt/Namegt ltCreditCard Limit'5,000'
Currency'USD'gt ltEncryptedData
xmlns'http//www.w3.org/2001/04/xmlenc'
Type'http//www.w3.org/2001/04/xmlencContent'gt
ltCipherDatagt ltCipherValuegtA23B45C56 lt/CipherValue
gt lt/CipherDatagt lt/EncryptedDatagt lt/CreditCardgt
lt/PaymentInfogt
14
Encrypting XML Content (Character Data)
lt?xml version'1.0'?gt ltPaymentInfo
xmlns'http//example.org/paymentv2'gt ltNamegtJohn
Smithlt/Namegt ltCreditCard Limit'5,000'
Currency'USD'gt ltNumbergt ltEncryptedData
xmlns'http//www.w3.org/2001/04/xmlenc'
Type'http//www.w3.org/2001/04/xmlencContent'gt
ltCipherDatagt ltCipherValuegtA23B45C56lt/CipherValuegt
lt/CipherDatagt lt/EncryptedDatagt lt/Numbergt
ltIssuergtExample Banklt/Issuergt ltExpirationgt04/02lt/
Expirationgt lt/CreditCardgt lt/PaymentInfogt
15
XML Encryption in WS-Security
ltenvEnvelope xmlnsenv"http//www.w3.org/2
001/12/soap-envelope"
xmlnsxenc"http//www.w3.org/2001/04/xmlenc"gt
ltenvHeadergt ltwsseSecurity
xmlnswsse"http//schemas.xmlsoap.org/ws/200
2/04/secext"gt ltxencReferenceListgt
ltxencDataReference URI"encryptedID"/gt
lt/xencReferenceListgt
lt/wsseSecuritygt lt/envHeadergt ltenvBodygt
ltxencEncryptedData Id"encryptedID"gt
ltxencCipherDatagt
ltxencCipherValuegt...lt/xencCipherValuegt
lt/xencCipherDatagt lt/xencEncryptedDatagt
lt/envBodygt lt/envEnvelopegt
16
XML Encryption w/ Digital Certificate
ltEncryptedData xmlns"http//www.w3.org/2001/04/xm
lenc"
Type"http//www.w3.org/2001/04/xmlencElement"gt lt
EncryptionMethod Algorithm"http//www.
w3.org/2001/04/xmlenctripledes-cbc"/gt ltKeyInfo
xmlns"http//www.w3.org/2000/09/xmldsig"gt
ltEncryptedKey xmlns"http//www.w3.org/2001/04/xml
enc"gt ltEncryptionMethod Algorithm"http//www.
w3.org/2001/04/xmlencrsa-oaep-mgf1p"/gt
ltKeyInfo xmlns"http//www.w3.org/2000/09/xmldsig
"gt ltKeyNamegtrsakey.pemlt/KeyNamegt
lt/KeyInfogt ltCipherDatagt
ltCipherValuegtIPiEu9NvEsGyvV . . .lt/CipherValuegt
lt/CipherDatagt lt/EncryptedKeygt lt/KeyInfogt ltCiphe
rDatagtltCipherValuegtxrfPSABEI8 . .
.lt/CipherValuegt lt/CipherDatagtlt/EncryptedDatagt
17
XML Signing AND XML Encryption
  • Order of Cryptographic operations matters
  • Signing and Encrypting
  • Encrypting and Signing
  • Change of the order while Decrypting - Danger

18
References
  • XML Encryption by By Derek Smyth
    http//dotnetslackers.com/articles/xml/XMLEncrypti
    on.aspx
  • XML Encryption Syntax and Processing By Takeshi
    Imamura , Blair Dillaway, Ed Simon
  • http//www.ibm.com/developerworks/xml/library/x-en
    crypt2/
  • http//www.devx.com/dotnet/Article/21564

19
Thank You!!!
Write a Comment
User Comments (0)
About PowerShow.com