EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 600+ Courses All in One Bundle
  • Login
Home Software Development Software Development Tutorials XML Tutorial XML Encryption
Secondary Sidebar
XML Tutorial
  • Basic
    • What is XML?
    • XML Tags
    • XML URL
    • XPath Sibling
    • XML root element
    • XML Encryption
    • XML Parsing php
    • xml parsing with java
    • Dataset XML
    • XML Parser in C#
    • XML Tree
    • XML boolean
    • XML sitemap
    • XML Array
    • XML reserved characters
    • XML Viewer
    • XML Uses
    • XML Special Characters
    • XML generator
    • XML file format
    • XML DOM
    • XML ampersand
    • XML Mapping
    • XML File
    • XML Element
    • XML HttpRequest
    • XML XSD
    • XML Schema
    • XML Namespaces
    • XML Comments
    • XML Attributes
    • XML Encoding
    • XML Validation
    • XML CDATA
    • XML Database
    • XML Technologies
    • XML Error
    • XML DTD
    • XML Date
    • XML Parsers
    • String in XML
    • XML with CSS
    • XML Versions
    • XML Features
    • XML Commands
    • Servlet web.xml
    • XPath Injection
    • XPath Functions
    • XPath starts-with
    • XPath Selector
    • XPath Count
    • XPath XML
    • XML Parsing in Oracle
    • XML parsing in python
  • Xpath
    • What is XPath?
    • XPath namespace
    • XPath for JSON
    • XPath Last Element
    • Xpath Substring
    • XPath First Element
    • XPath local-name
    • XPath Multiple Attributes
    • XPath Matches
    • XPath Position
    • XPath Index
    • XPath regex
    • XPath id contains
    • XPath innertext
    • XPath Multiple Conditions
    • XPath Helper
    • XPath Generator
    • XPath ID
    • XPath Locator

XML Encryption

XML Encryption

Introduction to XML Encryption

The EXtensible Markup Language (XML) is at the center stage of the modern world of technology. XML forms the backbone of upcoming technologies such as web services. Almost every aspect of Internet programming is concerned with XML.So there is a need for XML security which can be achieved by XML encryption. The most interesting part of XML encryption is that we can encrypt the entire document or its selected portions. This is very difficult to achieve in the Non XML world.

All in One Software Development Bundle(600+ Courses, 50+ projects)
Python TutorialC SharpJavaJavaScript
C Plus PlusSoftware TestingSQLKali Linux
Price
View Courses
600+ Online Courses | 50+ projects | 3000+ Hours | Verifiable Certificates | Lifetime Access
4.6 (86,883 ratings)

XML encryption

Below is the list of portions of the XML document.

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

  • The entire XML document.
  • An element and all its sub-elements.
  • The content portion of the XML document.
  • A reference to a resource outside of an XML document.

We can encrypt one or all of the above portions.

The steps involved in XML encryption are as follows.

  • Select the XML which needs to be encrypted (all parts of the XML document or one of the items listed in the above section)
  • Convert the data which needs to be encrypted in canonical form. This step is optional.
  • Using the public key, encrypt the result.
  • Send the result, i.e. encrypted XML, to the intended recipient.

XML Digital Signature

A digital signature is calculated over the complete message; it cannot be calculated only for specific portions of the message.  The simple reason for this is that the first step in digital signature creation is the calculation of the message digest over the whole message. However, many practical situations demand that users be able to sign only specific portions of the message. For example, the purchase manager may want to authorize only the quantity portion in a purchase request, whereas the accounting manager may want to sign only the rate portion. In such cases, an XML digital signature can be used. This technology treats messages or documents as consisting of many elements and provides for signing one or more such elements. This makes the XML digital signature process flexible and more practical.

XML digital signature specification defines a number of XML elements which describe characteristics of XML signature, which are as follows

  • Signedinfo: It contains the output of the signing process.
  • Canonicalization method: It specifies the algorithm which is used to canonicalize the Signedinfo element before it is digested as a part of the signature creation.
  • Signature method: It specifies the algorithm which is used to transform the canonicalize the Signedinfo element into the Signature Value element. This is a combination of the message-digest algorithm and the key-dependent algorithm.
  • Reference: It includes the mechanism which is used to calculate message digest and the resulting digest value over the original data.
  • KeyInfo: It includes a key that can be used to validate the digital signature. This can consist of a digital certificate, key names, key agreement algorithms, etc.
  • Transform: It specifies the operation performed before calculating the digest, such as encoding, compression, etc.
  • Digest method: It specifies the algorithm which is used for calculating the message digest.
  • Digest value: It contains a message digest of the original message.

Steps involved in XML digital signature are as follows

  1. Create Signedinfo element with SignatureMethod, CanonicalizationMethod, and references.
  2. Canonicalize the XML document.
  3. Calculate SignatureValue depending on the algorithms specified in the SignedInfo element.
  4. Create the digital signature, which also includes the Signedinfo and SignatureValue elements.

XML digital signature Classification

XML digital signature is classified into three types which are as follows

  1. Enveloped XML digital signature: In this type, the signature is inside the original document.
  2. Enveloping XML digital signature: In this type, the original document is inside the signature.
  3. Detached XML digital signature: In this type, the signature has no enveloping concept at all; it is separate from the original document.

XML key management specification

XML Key management specification (XKMS) is an initiative of W3C which aims is to delegate the trust-related decision in XML encryption/signature process to one or more specified trust processors. This allows businesses to manage XML encryption and digital signature to be managed quite easily. This also resolves the issue of the difference between different PKI vendor implementations.

XKMS was jointly proposed by Microsoft, VeriSign, and web methods. It is backed by many other strong parties, including Baltimore, Entrust, HP, IBM, Iona, RSA, etc.

XKMS specifies Protocols for distributing and registering public keys and works very well with XML encryption and XML signatures.  XKMS consists of two parts, namely X-KISs and X-KRSs

  • X-KISS: It stands doe XML key information service specification, which specifies a protocol for trust service that resolves the public key information in documents that conform to the XML signature standard. This protocol allows the client of such service to delegate some or all of the tasks needed to process an XML signature element. The underlying PKI can be based on different specifications such as X.509 Or PGP (Pretty Good Privacy), and yet X-KISs shields the application from these differences.
  • X-KRSS: Ut stands for XML key registration service specification, which defines a protocol for web service that accepts the registration of public key information. Once registered, the public key can be used in relation to other web services, including X-KISS. This protocol can also be used to later retrieve the private key. In addition, the protocol has provisions for authentication of the applicant and proof of possession of the private key.

Conclusion – XML Encryption

Since various organizations have used XML for any purpose, its been mandatory to encrypt the XML to secure its data. Here in this article, we have discussed the XML encryption and its importance with the digital signature.

Recommended Articles

This is a guide to XML Encryption. Here we discuss the encryption of XML and digital signature along with its importance. You may also look at the following articles to learn more –

  1. XML Namespaces
  2. XML Comments
  3. String in XML
  4. XML Features
0 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Java Tutorials
  • Python Tutorials
  • All Tutorials
Certification Courses
  • All Courses
  • Software Development Course - All in One Bundle
  • Become a Python Developer
  • Java Course
  • Become a Selenium Automation Tester
  • Become an IoT Developer
  • ASP.NET Course
  • VB.NET Course
  • PHP Course

ISO 10004:2018 & ISO 9001:2015 Certified

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Software Development Course

C# Programming, Conditional Constructs, Loops, Arrays, OOPS Concept

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more