---
id: "x509_serial_number"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["cryptography"]
langs: ["common"]
quality: 80
url: "https://registry.apicrafter.io/datatype/x509_serial_number"
---

# X.509 certificate serial number (`x509_serial_number`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Serial number that a certification authority assigns to a certificate, unique among the certificates it issues. RFC 5280 limits it to 20 octets. Certificate stores and registries print it in hexadecimal, with or without colons between octets; a leading 00 octet is the sign byte of the DER integer, so a 20-octet number may take 21 octets. The format alone looks like any hexadecimal string: the type is told by the field name (serial, serialNumber, СерийныйНомер).

- Personal data (PII): no
- Categories: Cryptographic identifiers (cryptography)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?:(?:[0-9A-Fa-f]{2}){1,21}|[0-9A-Fa-f]{2}(?::[0-9A-Fa-f]{2}){1,20})$
```

## Examples

- `00A94CF4CA0000000005A1` — CA certificate of an accredited Russian certification authority (e-trust.gosuslugi.ru)
- `3382BD430000000004B0` — Serial number in the style of Microsoft and CryptoPro CA
- `00:a9:4c:f4:ca:00:00:00:00:05:a1` — The first number with colons, as openssl x509 -text prints it
- `00A94CF4CA0000000005A100A94CF4CA0000000005A1` (invalid example) — 22 octets, longer than RFC 5280 allows

## Translations

- ru: Серийный номер сертификата X.509: Номер, который удостоверяющий центр присваивает сертификату; уникален среди выданных им сертификатов. Записывается в шестнадцатеричном виде, до 20 октетов (RFC 5280).

## Sources

- doc: <https://www.rfc-editor.org/rfc/rfc5280#section-4.1.2.2>

## Quality

Score 80/100. Missing: mapping (Wikidata, Schema.org, ...), detector coverage.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/x509_serial_number.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/cryptography/x509_serial_number.yaml>
