Skip to content

harrison314/SlovakEidSignTool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slovak eID Sign Tool

Slovak eID Sign Tool is tool for listing certificates from Slovak eID card, signing PDF documents with PAdES signature or signing file (.txt, .pdf, .png,...) to eIDAS CAdES-BASELINE-B ASiC-E container (.asice file).

This project aim to education PKCS#11 standard and document signing using Slovak eID.

SlovakEidSignTool is example project for signing documents using Slovak eID (eID with EP / KEP), designed for education.

Used:

Prerequisites

  • .Net Core SDK for build,
  • Slovak eID card with KEP certificate,
  • Driver for smart card reader (from Slovensko.sk),
  • Application eID klient (from Slovensko.sk).

Usage

Listing KEP certificates on eID

  1. Insert eID card to card reader.
  2. Run dotnet SlovakEidSignTool.dll list.
  3. Type BOK.

Listing encryption and authentication certificates on eID

  1. Insert eID card to card reader.
  2. Run dotnet SlovakEidSignTool.dll list --listEp.
  3. Type BOK.

Signing the Pdf file "Example.pdf"

  1. Insert eID card to card reader.
  2. Run dotnet SlovakEidSignTool.dll signPDF Example.pdf -o SignedPdf.pdf.
  3. Type BOK.
  4. Type KEP PIN.

Signing the file into the CAdES ASiC-E container

  1. Insert eID card to card reader.
  2. Run dotnet SlovakEidSignTool.dll signCades example.txt -o SignedExample.asice (signing file, output signature file).
  3. Type BOK.
  4. Type KEP PIN.

Add signature to existing CAdES ASiC-E container

  1. Insert eID card to card reader.
  2. Run dotnet SlovakEidSignTool.dll addSignCades SignedExample.asice -o SignedExample_2s.asice
  3. Type BOK.
  4. Type KEP PIN.

Add file and signature to existing CAdES ASiC-E container

  1. Insert eID card to card reader.
  2. Run dotnet SlovakEidSignTool.dll addSignCades SignedExample.asice additional.txt -o SignedExample_2s.asice
  3. Type BOK.
  4. Type KEP PIN.

Example on Windows 10 x64 with self-contained build:

Signed dcument

Signed dcument

Example on Windows 10 x64 with self-contained build and application PINs:

Signed dcument

Validation result in zep.disig.sk of CAdES signature:

Validation result in zep.disig.sk

Build

cd src/SlovakEidSignTool
dotnet publish -c Release

Or self-contained for Windows 7 (8,10..):

cd src/SlovakEidSignTool
dotnet publish -c Release -r win7-x86

Or self-contained for Ubuntu:

cd src/SlovakEidSignTool
dotnet publish -c Release -r ubuntu.16.10-x64

For more see .NET Core RID Catalog.

Read more:

  1. PKCS#11 Interop
  2. PKCS#11 X509Store
  3. Signing a PDF File Using Azure Key Vault
  4. Slovensko.sk
  5. Program description in Slovak language
  6. Creating an ASiC-E container manually

Validation services

  1. Slovak national ZEP validator
  2. zep.disig.sk - online signer and validator
  3. DDS validator

About

Example of signing documents using Slovak eID (PAdES, CAdES)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages