Overview of XML EncryptionWritten by Pawan Bangar
Continued from page 1
If recipient does not know decryption key in advance, then sender generates and sends it. The key can be protected in transit by encrypting method or key agreement. If 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 encrypt data, creating CipherValue, which you place in EncryptedData. Care must be taken when signing content that may later be encrypted; clearly; content must be restored to exactly original plaintext form for signature to validate properly. To restore plaintext in signed content, use decryption transform method for XML signature defined by XML encrypt joint W3C and IETF working group. This transform also allows specifications of XML fragments that were encrypted and then signed with rest of document and, therefore, are not decrypted to validate signature. Often, encrypted fragments are removed from signed information by using XPATH transform in reference element, since meaningful information is plaintext. We can sign plaintext version of an encrypted element by including appropriate reference element pointing to it. When signed document is confidential and encrypted after being signed, you should also protect against surreptitious forwarding in which recipient forwards signed confidential document to a competitor, encrypted by competitor public key, trying to make it look as if sender sent confidential information. To prevent surreptitious forwarding, signer should append recipient identities to document being signed.

Pawan Bangar, Technical Director, Birbals,India email: www.ebirbals.com www.birbals.com
| | XML integration with ADO+Written by Pawan Bangar
Continued from page 1
Whatever means for setting dataset's schema, when it comes time to load XML into dataset following rules are used: 1) Elements with a certain name are mapped into dataset of same table name. 2) Attributes and scalar-valued sub-elements are mapped into columns of that table. 3) The schema of table is expanded as appropriate if columns are not already in dataset or if dataset does not already contain a table by same name. When loading an XML schema into dataset, a table is created for each complex type in schema, and containment is expressed using primary/foreign key relationships. The key columns are automatically inserted into schema, and a Data relation is added for each pair of related tables. Therefore, when loading data that resides in multiple tables from SQL server or any other database that supports XML, it is in some ways more expedient to use XML loading facilities rather than DataSet command. The former enables loading all data in one step, whereas latter requires a dataset command per table, and also involves setting up relationships between tables manually.

Presently working in the capacity of the Technical Director of Birbals, an e-consulting firm based in India dedicated in providing innovative and effective web, Hospitality and consultancy services to public, private and non-profit organizations. Successfully founded Birbals and other IT companies like Ebirbals and SeoBirbals.
|