Authority Key Identifier

term

cryptographynetworking

Kept in this browser · My desk

An X.509 certificate extension that identifies the public key whose private key signed the certificate, usually by repeating the issuer's Subject Key Identifier.

RFC (Request for Comments) 5280 says conforming CAs (certificate authorities) must include it in every certificate they generate, except a CA's own self-signed certificate, so that validators can build the chain. Python 3.13 turned on VERIFY_X509_STRICT in ssl.create_default_context(), and a certificate without the extension now fails with Missing Authority Key Identifier; the fix is to reissue the certificate rather than to clear the flag.

What it is. The authority key identifier (AKI) extension, section 4.2.1.1 of RFC (Request for Comments) 5280, provides a means of identifying the public key that corresponds to the private key used to sign a certificate. It exists for issuers that have more than one signing key, either several at once or an old and a new one during a changeover, because the issuer's name alone does not say which key signed. Its object identifier is id-ce 35, that is 2.5.29.35, and it is a SEQUENCE of three optional fields: keyIdentifier, tagged 0, an OCTET STRING; authorityCertIssuer, tagged 1, the names of the issuer's own issuer; and authorityCertSerialNumber, tagged 2, the serial number of the issuer's certificate. The identification can therefore rest on a key identifier or on an issuer name and serial number. RFC 5280 requires the keyIdentifier field in every certificate a conforming CA (certificate authority) generates, with one exception: a CA's self-signed certificate may omit it, since its authority and subject identifiers would be identical. The extension must always be non-critical. CRLs (certificate revocation lists) carry it too: section 5.2.1 requires every CRL to include it, using the key identifier method.

The pair it belongs to. The value in the keyIdentifier normally comes from the issuer's subject key identifier (SKI), extension 2.5.29.14, which RFC 5280 requires in every CA certificate and recommends in end-entity certificates. The rule binds them: in a conforming CA certificate, the SKI must be the value placed in the AKI of every certificate that CA issues. RFC 5280 describes two ways to compute the identifier from the public key: the 160-bit SHA-1 (Secure Hash Algorithm 1) hash of the subjectPublicKey bit string, without its tag, length and unused-bits count, or a four-bit type field of 0100 followed by the low 60 bits of that hash. RFC 7093, by Sean Turner, Stephen Kent and James Manger in December 2013, adds the leftmost 160 bits of a SHA-256, SHA-384 or SHA-512 hash of the key, and a hash of the DER (Distinguished Encoding Rules) encoding of the whole SubjectPublicKeyInfo. RFC 7093 also states that these methods were designed not to be critical to security, which is why SHA-1 remains acceptable here: the identifier is a label for finding a certificate, not a check of anything. Once a CA has established an identifier, RFC 5280 says it should keep using it. In OpenSSL's configuration language, subjectKeyIdentifier = hash selects the first RFC 5280 method, and setting a fixed hexadecimal value is strongly discouraged.

Why it matters for path building. A validator holds a leaf certificate and has to find its issuer among the intermediates the server sent and the roots in its store. Names repeat: a CA that renews its key keeps its name, and cross-certificates give one key several certificates. RFC 4158, Certification Path Building, by M. Cooper and colleagues in September 2005, therefore ranks candidates by key identifier: an issuer whose SKI matches the current certificate's AKI comes first, one with no SKI comes next, and one whose SKI does not match comes last. The same document insists that key identifiers be used only as sorting criteria or hints, never to eliminate certificates, because implementations may compute them differently; it warns against treating the issuer-name-and-serial form as a strict matching rule, which cross-certification defeats; and RFC 5280 itself says applications are not required to verify that identifiers match during validation. OpenSSL is stricter in practice: its issuer check requires every AKI sub-field that is present to equal the candidate issuer's SKI, serial number and issuer name, so a mismatch rules that candidate out.

The rules for public certificates. Version 2.3.1 of the CA/Browser Forum's Baseline Requirements, dated 4 October 2026, makes the extension mandatory in subscriber certificates, subordinate CA certificates and the other issued profiles, and recommended for root certificates. Its keyIdentifier must be identical to the issuing CA's subjectKeyIdentifier, and the authorityCertIssuer and authorityCertSerialNumber fields must not be present. A root that carries the extension must put its own SKI there. On the public web, then, the key identifier is the only form in use.

Python 3.13 and strict verification. Since Python 3.13, ssl.create_default_context() includes VERIFY_X509_PARTIAL_CHAIN and VERIFY_X509_STRICT in its default flags, a change contributed by William Woodruff in issue gh-112389. The documentation explains that the flags make OpenSSL behave more like a conforming RFC 5280 implementation, in exchange for a small amount of incompatibility with older certificates. The strict mode is OpenSSL's -x509_strict, whose manual lists the checks: the authorityKeyIdentifier must be present in X.509 version 3 certificates unless they are apparently self-signed, the subjectKeyIdentifier in every version 3 CA certificate, and keyUsage in every CA certificate. A leaf issued by a CA that never wrote these fields now fails with [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Missing Authority Key Identifier. TLS (Transport Layer Security) inspection is where network teams meet it. Netskope's own community guide for developer tools under its SSL (Secure Sockets Layer) inspection, posted in February 2026 and updated in May, warns that a tenant's interception certificates may lack the Authority Key Identifier and shows that exact error from Python 3.13; a post of 17 September 2026 on the Google Cloud security community reported the same failure with impersonation certificates from Cloud NGFW Enterprise, whose author noted that a Palo Alto Networks firewall behaved compliantly; and in January 2026 Proxmox VE patched its cluster root CA, adding keyUsage, AKI and SKI, after Python 3.13's strict default broke clients such as Ansible.

Fixing it properly. Python's documentation shows how to clear the flag, ctx.verify_flags &= ~ssl.VERIFY_X509_STRICT, and says that doing so is not recommended; patching a library such as urllib3 to the same effect is worse, because it relaxes every connection the library makes. The fix is to reissue: give the CA certificate an SKI and have the CA write the matching AKI into everything it signs, which on an inspection appliance usually means regenerating or replacing the interception CA rather than touching every client. When OpenSSL itself is the CA, the version matters. Since OpenSSL 3.2 the req and x509 commands added key identifier extensions by default; as of OpenSSL 4.0, whose 4.0.3 release came out on 29 September 2026 and which 4.1.0 followed on 23 October, they no longer have built-in logic for them and treat them like any other extension, taken from the configuration file or from -addext. Scripts that build a lab CA should therefore state subjectKeyIdentifier = hash and authorityKeyIdentifier = keyid:always explicitly. In that syntax keyid copies the issuer's SKI, issuer adds the issuer's issuer name and serial number, always makes the element mandatory and raises an error if it cannot be produced, and nonss skips it for self-signed certificates.

Reading it, and its neighbours. openssl x509 -in cert.pem -noout -ext authorityKeyIdentifier,subjectKeyIdentifier prints both identifiers, and comparing a leaf's AKI with the SKI of the intermediate a server sends confirms by eye that the two belong together; after a CA changes its key, a leaf whose AKI matches no SKI the client holds is the sign that the server is still sending the old intermediate. The extension is easily confused with authority information access (AIA), section 4.2.2.1 of RFC 5280, which says where to fetch the issuer's certificate and how to reach its validation services: AIA answers where, AKI answers which key. Neither is a security control, since trust still comes from verifying the signature with the issuer's key. Numbers worth remembering: 2.5.29.35 for the AKI and 2.5.29.14 for the SKI; 160 bits, 20 bytes, as the usual identifier length; RFC 5280 of May 2008, RFC 4158 of September 2005 and RFC 7093 of December 2013; Python 3.13 for the strict default; OpenSSL 3.2 and 4.0 for the change in how the identifiers are generated.

Also known as: AKI, authorityKeyIdentifier, Missing Authority Key Identifier, 2.5.29.35

Sources

← Back to A Back to the glossary