{
  "id": 12877637,
  "title": "DER SET ordering: enforce it in the walk, not in a check afterwards",
  "url": "https://urgent.news/2026/10/08/der-set-ordering-enforce-it-in-the-walk-not-in-a-check-afterwards",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-08T13:23:27.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/polycratia/der-set-ordering-enforce-it-in-the-walk-not-in-a-check-afterwards-3hl5"
  },
  "original_language": "en",
  "account": "The rule of DER SET ordering is crucial because it enforces a specific arrangement of components within a SET structure, which carries no inherent meaning. While a parser may accept various arrangements, only one specific byte string was ever signed, making any deviation problematic. DER readers like derstrict enforce this rule during the walk over a SET's children, refusing any non-compliant encodings. This placement is crucial because it ensures that the parsed value remains consistent with the signed byte string, preventing discrepancies that could lead to verification failures. Ordering is an encoding property, not a cosmetic one, as signature verification is performed on the byte level and does not consider alternative interpretations. A lenient reader can introduce ambiguity, resulting in different implementations interpreting the same signed document differently. The enforcement of SET ordering during the walk over a SET's children is more effective than a post-pass, as it maintains the integrity of the original signed document.",
  "summary": "A SET in ASN.1 is unordered by definition: the arrangement of its components carries no meaning. DER still fixes exactly one arrangement on the wire, ascending by encoding, compared as octet strings. A parser that accepts any other arrangement has made many byte strings decode to one value, and only one of those byte strings was ever signed. That is the whole problem in one sentence. The rest of…",
  "key_points": [
    "DER SET ordering enforces specific component arrangement in SET structure",
    "DER strict enforces rule during walk over SET children, rejects non-compliant encodings"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}