Skip to content

Solaree/IIT-Signature

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IIT-Signature

A tiny alternative to JSC "IIT" web-widget for verifying the user's signature of the Certification Authority

Verify PAdES and CAdES digital signatures using DSTU 4145-2002.

Installation (example for Linux)

1. Download latest UAPKI

$ curl -L -o uapki-v2.0.12-linux-amd64.tar.gz https://github.com/specinfo-ua/UAPKI/releases/download/v2.0.12/uapki-v2.0.12-linux-amd64.tar.gz

2. Extract the archive

$ tar -xzf uapki-v2.0.12-linux-amd64.tar.gz
$ cd uapki-v2.0.12-linux-amd64

3. Copy the libraries to workspace and create symlinks

$ cp libuapki.so.2.0.12 libuapkic.so.2.0.12 libuapkif.so.2.0.12 ~/.../IIT-Signature
$ cd ~/.../IIT-Signature
$ ln -sf libuapkic.so.2.0.12 libuapkic.so.2
$ ln -sf libuapkif.so.2.0.12 libuapkif.so.2

A similar approach can also be performed on macOS and Windows systems.


Running the Verification Script

  1. Ensure you have Python 3 and pip installed.

  2. Install required Python packages:

$ pip install -r requirements.txt
  1. Run the script:
$ python verify.py -h
usage: verify.py [-h] file [cms]

Verify PAdES and CAdES digital signatures using DSTU 4145-2002

positional arguments:
  file        Path to the PDF (.pdf) or enveloped CMS (.p7s) signature
  cms         Path to the detached CMS (.p7s) signature (optional)

options:
  -h, --help  show this help message and exit

Example output

[*] Detected: CAdES format (detached)
[*] Fetching certificates from Central Certification Authority...
[*] Found 298 certificate(s) within CCA
[*] Signature verification successful
[*] Subject:
  common_name = Ткаченко Мар'яна Іванівна
  surname = Ткаченко
  given_name = Мар'яна Іванівна
  serial_number = TINUA-1234567890
  country_name = UA
[*] RNOKPP or passport number of a citizen of Ukraine = 1234567890
[*] UNZR = 19910824-00026
[*] Issuer:
  organization_name = ДП "ДІЯ"
  common_name = "Дія". Кваліфікований надавач електронних довірчих послуг
  serial_number = UA-43395033-1000
  country_name = UA
  locality_name = Київ
  organization_identifier = NTRUA-43395033
[*] Signing Time: 2025-08-24 00:00:00
[*] Signature Algorithm: Dstu4145WithGost34311pb
[*] Signature Format: CAdES-BES

Notes

  • Adjust library version numbers if you download a different UAPKI version.
  • You need to set up a Python virtual environment for proper use with macOS.
  • Cached trusted certificates are automatically handled to speed up repeated verifications.
  • Support for the protocol for the creation and verification of advanced electronic signatures, as well as for the XAdES (XML signatures) format, is planned for future updates.

About

Verify PAdES and CAdES digital signatures using DSTU 4145-2002

Resources

License

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages