How certificates are verified

The QR code on GIMDES certificates is a link that contains the certificate details (certificate no., company, expiry date) and is digitally signed with GIMDES's private key. Changing even a single character invalidates the signature, so a valid QR code cannot be produced for a forged document.

Three layers of checks

  1. Address: The verification page only opens on gimdes.com. Check your address bar.
  2. Digital signature: The page verifies the signature in the QR code with GIMDES's public key and compares the details with the current record.
  3. Live seal: Every time it opens, the verification page creates a new seal that signs the current date and time. Scanning the seal with another device should show the same code and time; a fake page cannot produce a valid seal.

Independent verification

Signatures use the standard JWS (RFC 7515), ES256 format. Public keys are published at /.well-known/jwks.json. You can verify them without asking GIMDES, using any JWT/JWS library or the example below. The part of the link after /dogrula/ or /muhur/ is the signed content.

Published public keys

kid: XHo5cBTaETsIibNO · ES256 (P-256)

-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE+lD1J/3NTASpiPIV2L2VVZFBNxBY
Lmx6CqSez0xf8UIOwxjN/7BDvlHIOPqspW2ACNtnk72mQ9wKRcvq8LSHWw==
-----END PUBLIC KEY-----

/.well-known/jwks.json

Example: verifying with Python

# Gerekli paket: pip install cryptography
import base64, json, urllib.request
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import ec
from cryptography.hazmat.primitives.asymmetric.utils import encode_dss_signature

def b64(s): return base64.urlsafe_b64decode(s + "=" * (-len(s) % 4))

baglanti = "https://gimdes.com/dogrula/eyJhbGciOi.../eyJpc3Mi.../aaBkFvoS..."   # QR koddan okunan adres
# /dogrula/ (ya da /muhur/) sonrasındaki üç parça: başlık/içerik/imza. "/" yerine "." koyunca standart JWS olur.
baslik, icerik, imza = baglanti.split("://", 1)[1].split("/")[-3:]

kid = json.loads(b64(baslik))["kid"]
jwks = json.load(urllib.request.urlopen("https://gimdes.com/.well-known/jwks.json"))
jwk = next(k for k in jwks["keys"] if k["kid"] == kid)
anahtar = ec.EllipticCurvePublicNumbers(
    int.from_bytes(b64(jwk["x"]), "big"), int.from_bytes(b64(jwk["y"]), "big"), ec.SECP256R1()
).public_key()

r, s = b64(imza)[:32], b64(imza)[32:]
anahtar.verify(encode_dss_signature(int.from_bytes(r, "big"), int.from_bytes(s, "big")),
               f"{baslik}.{icerik}".encode(), ec.ECDSA(hashes.SHA256()))   # hatalıysa istisna fırlatır
print(json.loads(b64(icerik)))   # {"iss": "gimdes.com", "typ": "sertifika", "sid": ..., "no": ..., "bts": ...}

Try a link

Paste a signed link to see the result in machine-readable form (JSON).