Overview of XML Encryption

Written by Pawan Bangar


XML encryption classifies a course of action for encrypting plain text data, generating ciphertext, and decryptingrepparttar ciphertext to retrieverepparttar 105106 plaintext data.

Bothrepparttar 105107 and are optional i.e.repparttar 105108 sender and receiver may agree onrepparttar 105109 encryption method and key in advance. Several elements userepparttar 105110 definitions fromrepparttar 105111 DSIG.

Ifrepparttar 105112 recipient does not knowrepparttar 105113 decryption key in advance, thenrepparttar 105114 sender generates and sends it. The key can be protected in transit by encrypting method or key agreement.

Ifrepparttar 105115 plaintext data to encrypt is an XML element or content, you encode it using UTF-8 and perform any necessary transforms to it, otherwise, if it is an external resource, you simply consider it as an octet sequence. You then encryptrepparttar 105116 data, creating CipherValue, which you place in EncryptedData.

Care must be taken when signing content that may later be encrypted; clearly;repparttar 105117 content must be restored to exactlyrepparttar 105118 original plaintext form forrepparttar 105119 signature to validate properly. To restorerepparttar 105120 plaintext inrepparttar 105121 signed content, userepparttar 105122 decryption transform method for XML signature defined byrepparttar 105123 XML encrypt joint W3C and IETF working group.

This transform also allows specifications of XML fragments that were encrypted and then signed with rest ofrepparttar 105124 document and, therefore, are not decrypted to validaterepparttar 105125 signature. Often, encrypted fragments are removed fromrepparttar 105126 signed information by usingrepparttar 105127 XPATH transform inrepparttar 105128 reference element, sincerepparttar 105129 meaningful information isrepparttar 105130 plaintext.

We can signrepparttar 105131 plaintext version of an encrypted element by includingrepparttar 105132 appropriate reference element pointing to it. Whenrepparttar 105133 signed document is confidential and encrypted after being signed, you should also protect against surreptitious forwarding in whichrepparttar 105134 recipient forwardsrepparttar 105135 signed confidential document to a competitor, encrypted byrepparttar 105136 competitor public key, trying to make it look as ifrepparttar 105137 sender sentrepparttar 105138 confidential information. To prevent surreptitious forwarding,repparttar 105139 signer should appendrepparttar 105140 recipient identities torepparttar 105141 document being signed.

XML integration with ADO+

Written by Pawan Bangar


One ofrepparttar most important design goals for ADO+ was powerful XML support. Microsoft designed ADO+ hand in hand withrepparttar 105104 .NET XML framework. Both are components of a single architecture. The unification of ADO+ withrepparttar 105105 XML framework happens inrepparttar 105106 dataset.

For beginners datasets has methods that can read and write XML. For reading XML,repparttar 105107 XML framework parser is used, either explicitly or implicitly. For writing XML out,repparttar 105108 XML framework XmlWriter is utilized.

In spite of whererepparttar 105109 data originated,repparttar 105110 dataset can save out its contents, both schema and data as XML. The schema is encoded as an internal W3C schema section, generally known as XSD, andrepparttar 105111 data is encoded as XML that be conventional to that schema. Becauserepparttar 105112 dataset's native serialization format is XML, it is an tremendous medium for moving data between tiers in a disconnected fashion just likerepparttar 105113 disconnected recordset.

Indeed, .NET Web services make intense use of datasets to transport data inrepparttar 105114 context of a schema between tiers of an application. Just like populatingrepparttar 105115 dataset via its object model or through managed providers, loadingrepparttar 105116 dataset with XML is a two stage process.

1) The schema is created, and thenrepparttar 105117 data is loaded. Ifrepparttar 105118 XML document comes with a schema, that schema is used to createrepparttar 105119 relational structure ofrepparttar 105120 dataset. If not,repparttar 105121 dataset can infer schema fromrepparttar 105122 containment relationships withinrepparttar 105123 document. In general speaking, elements that are not scalar valued are mapped to tables, whereas attributes and scalar valued elements are mapped to columns.

2) The process of inferring schema is useful when constructing an application that has to consume XML that comes with no schema. But for production applications, it is highly desirable to takerepparttar 105124 inferred schema, modify it as appropriate, and load that schema in beforerepparttar 105125 actual data is loaded. That way,repparttar 105126 process of loadingrepparttar 105127 document is deterministic, so you don't have to worry about what a slight change inrepparttar 105128 incoming document will do torepparttar 105129 inference heuristics.



Cont'd on page 2 ==>
 
ImproveHomeLife.com © 2005
Terms of Use