Guest mode. You can read posts without signing up. Comments, ratings, job contacts and your own posts open after you sign up and accept the rules. What is Kommit →

Редакция КоммитРедакция портала
commit 64deb81 · 19 days ago

EDS and NCALayer, part 1: how the EDS of the NUC RK works — keys, certificates, formats

🌐 Machine-translated from Russian. Show original

In this part:

What is an EDS in simple terms#

An electronic digital signature is a pair of a private key (held by the owner) and a public key certificate issued by a certification authority. A signature created with a private key is verified against the certificate: it proves who signed it and that the document has not changed since signing.

In Kazakhstan, keys are issued to individuals and legal entities by the National Certification Authority (NCC RK).

One key for login and signature#

Since April 30, 2024, the NUC issues individuals and legal entities a single key based on the GOST 2015 algorithm — both for authentication and for signature (pki.gov.kz). Keys in the identity document and SSL certificates remain on RSA.

Previously, a set of two keys was issued:

Old-style keyFor
Authentication (the file name was AUTH)logging into portals: eGov, government system cabinets, your website,
Signing (RSA or GOST)signing documents, contracts, reports,

Such keys have already expired, but signatures made by them earlier should be checked by your system. Decide by the key purpose (Key Usage / Extended Key Usage in the certificate), not by the file name: the certificate must allow signing to sign the document.

What's inside the certificate#

  • Subject: full name, IIN (for legal entities — also BIN and organization), e-mail.
  • Validity period — the certificate is valid for a limited time, then reissued.
  • The publisher is an intermediate center of the NUC, chain up to the root certificate.
  • Policies and assignments — what you can use the key for.

The IIN and BIN in the certificate allow you to unambiguously link the signature to a person and the organization — this is the main difference from "just passwords."

Key stores#

  • A file (PKCS#12, usually the .p12 extension) with a password is the most common option.
  • Secure media: tokens and ID with chip — the key is not extracted from the device.

Algorithms#

The new keys are issued by the NUC using the national GOST 2015 algorithm, keys in the ID — by RSA; old signatures also contain old GOST and RSA algorithms. The set of algorithms and requirements change over time — your system must support the algorithms currently issued by the NUC and verify signatures created earlier.

Signature formats#

| Format | Where | is used
| --- | --- |
| CMS (PKCS#7) | signing files and arbitrary data; the signature can be attached or separated |
| XML signature (XMLDSig) | signing XML documents, sharing with many government systems |

Signature verification: what's included#

  1. The signature is mathematically correct — the data has not been changed.
  2. The certificate is valid at the time of signing and issued by a trusted center (chain down to the root of the NUC).
  3. Certificate not revoked — verification by OCSP or revocation list (CRL).
  4. The key assignment corresponds to the operation.
  5. Subject — the one who was supposed to sign (IIN, BIN).

Skipping any item makes checking pointless. How to sign in a browser — in part 2.

Comments 00 участников · 2 гостя🔒 Rate and discuss after signing up

Comments · 0

No comments yet.Sign in to comment, rate and see all comments.