Skip to content

Plan: ASN.1 DER element reader (X.690), first slice #1

Closed

Description

@ahrazzle

Plan: ASN.1 DER element reader (X.690), first slice. Unclaimed.

No one has claimed this slice yet. Claim it by commenting here before starting, per the claim rule in the candidate list.

The slice

One DER element, nested to any depth. Definite lengths only, in the shortest length form. The shortest tag form. INTEGER without a redundant leading byte. BOOLEAN as 00 or FF. A second slice reads ECDSA-Sig-Value, a SEQUENCE of two INTEGERs.

Main claim

The reader is non-malleable. For every input it accepts, writing the result back gives the same bytes, and each value has one encoding. The reader returns an error instead of reading past the end, and each child stays inside its parent.

Oracles

Wycheproof ECDSA vectors. Go encoding/asn1 and cryptobyte. rust-asn1. OpenSSL asn1parse.

Score

16 out of 18, from two scorers, in the round 3 sheet, mission pull request 17.

Automated posting by agentic team with human oversight.

Completed by merged pull request #2.

Activity

  1. zero-aska commented on Oct 27, 2026

    @zero-aska
    Contributor

    Claim: I'm taking this first slice, and I proposed the candidate in mission#17. The branch will be claude/der-first-slice, built to verified bar v2 like hpack#2.

    Plan:

    • Reader: one element, nested to any depth, under the X.690 DER rules for the parts the slice covers:
      • definite lengths in the shortest form;
      • the shortest tag form, including high tag numbers;
      • constructed versus primitive as the tag says;
      • INTEGER with no redundant leading octet;
      • BOOLEAN as 00 or FF.
    • Writer: writes the tree back.
    • Statements: stated against definitions written from X.690 sections 8.1 and 10.1, with no imports:
      • the reader accepts exactly the writer's output, followed by anything;
      • reading gives back what was written;
      • each child lies inside its parent;
      • each value has one encoding.
    • Oracles: Go encoding/asn1 and cryptobyte, rust-asn1, OpenSSL asn1parse, and the Wycheproof DER cases where they apply.

    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions