How to sign an XML file? A guide to file formats for electronic signatures and seals
In electronic document workflows, qualified electronic signatures and seals can be applied to different types of files. Each format works slightly differently, so it is worth knowing when to use each one and how to configure it in the application.
Szafir application for signing PDF, XML and other file formats
The Szafir application is used to create and verify qualified electronic signatures and electronic seals. It allows users to sign documents in bulk, encrypt them and apply qualified electronic time stamps. The Szafir application is installed on the user’s workstation (computer). It works on Windows, macOS and Linux.
The application allows documents to be signed and sealed using both certificates stored on a cryptographic card (Szafir set) and mSzafir mobile certificates. You can download the free software from the Applications and drivers tab.
How to sign an XML file with a mobile mSzafir signature?
PDF is the most common format in everyday document workflows, which is why the mSzafir mobile application and portal support only these files. However, if you need to sign or seal an XML document or files in other formats, simply install the mSzafir software package.
What is the XAdES format? Learn about other signature formats
The Szafir application supports four formats for electronic signatures and seals developed by the European Telecommunications Standards Institute (ETSI) in accordance with the eIDAS Regulation.
PAdES (PDF Advanced Electronic Signature)
The default setting in the applications, as it is designed to handle PDF documents. It preserves the visual form of a signature or seal, making it suitable for contracts, offers and official letters. Users can verify their authenticity at any stage.
XAdES (XML Advanced Electronic Signature)
A format dedicated to files with the XML extension, such as data submitted to the Social Insurance Institution (ZUS). It is used by IT systems for automatic data processing.
CAdES (CMS Advanced Electronic Signature)
It complies with the PKCS#7 standard and converts documents into files with the .p7m extension. It is used to sign and seal files containing binary data – from text files and data tables to images.
ASiC (Associated Signature Containers)
Designed to handle entire packages of documents collected in a ZIP archive. Each individual file in the package is signed or sealed separately. After the package is authorised, its extension changes to .asics or .asice.
How to change settings in the Szafir application for handling XML files:
Step 1. Open the "settings" menu and change the default format from PDF (PAdES) to XML (XAdES-BES) by confirming your selection with the "Add" button. You can set a profile name to use for future logins.
Step 2. Configure the signature parameters; select:
- XAdES format
- "Do not include additional information (XAdES-BES)" variant
- SHA-256 hash function
- Set commitment type to "No set"
- Check the "Embedded signature" box
Step 3. Return to the main menu, go to "Wizard", select the "Signature" function, and follow the prompts.
Digital solutions within reach
For years, we have been making electronic bank transfers, communicating by email, logging in to public administration services using electronic banking and using secure websites. Today, you do not need to be a technology specialist to use digital solutions effectively. Choose trusted tools that provide the confidence and security offered by modern trust services.