Uruguayan eID: check the decoding notes against AGESIC's documentation - #1
Merged
nicolasgutierrezdev merged 1 commit intoAug 4, 2026
Conversation
Cross-checks the decoding section against the official technical documentation and against a card, and records where they disagree. The TLV layouts hold up: 5F01 with a fixed length of 9, 1F01 to 1F06, 3F01 with a long-form length, 7F01, and the three length forms. * The document describes the biographic values as ASCII. Cards store UTF-8, so the page now corrects the specification instead of contradicting it silently. * 1F08 is the date of issue, four bytes of packed BCD. The document mentions a date of issue as its one non-ASCII value but never says which tag holds it. Adds a warning, since BCD bytes stay under 0x80 and a non-ASCII check reports the field as text. * The document only specifies 1F01 to 1F06, so the rows beyond that are marked as read from cards. * The specification names 1F01 PrimerApellido, which is what makes the surname warning worth stating. Also adds the technical documentation and AGESIC's reference code to the resources, notes that the data objects are unverified when EF 711D is absent, and renames the Path column, which held file IDs and not the paths printed above it.
nicolasgutierrezdev
merged commit Aug 4, 2026
567dcb0
into
nicolasgutierrezdev:uruguayan-eid-decoding-info
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cross-checks the decoding section in OpenSC#34 against AGESIC's official technical
documentation and against a v4 card, and records where the two disagree.
The TLV skeleton holds up exactly as you wrote it:
5F 01for7001with afixed length of 9,
1F 01to1F 06for7002,3F 01with a long-formlength for
7004,7F 01for700B, and the three length forms with the sameoffsets. The document even carries the same worked example for the portrait,
T=0x3F01 L=0x8223FE.One warning about the source: the TLV tables in the PDF are images, so
pdftotextreturns blank gaps where they should be. They have to be rendered asimages and read. That is probably why nobody had cross-checked them before.
What changed:
page now presents this as correcting the specification rather than
contradicting it silently. Confirmed on a card, with bytes above
0x7Fthatdecode as UTF-8.
1F 08is the date of issue, four bytes of packed BCD inDD MM YY YYorder. The document mentions a date of issue exactly once, to say it is the
one value that is not ASCII, and never says which tag holds it. This is that
tag. Verified by decoding it and comparing against the printed card.
1F 08. BCD bytes stay below0x80, so scanning for highbytes reports the field as ASCII and decoding it as text succeeds and returns
punctuation instead of raising. A card issued this century even carries a
literal
0x20for the20of the year, which reads as a space. This is worthstating because it is an easy trap to fall into.
1F 01to1F 06and fixes two lengths,
1F 04at 3 and1F 05at 8. The rows beyond that arenow marked as read from cards, so a reviewer who opens the PDF does not think
the page invented them.
1F 01PrimerApellido and
1F 02SegundoApellido, which is what makes the warningworth stating. On the card I read, both surnames sit in
1F 01with1F 02zero-length, so the case you describe is real.
1F 0Astays unidentified, zero-length on the cards read so far. AGESIC'sreference code models one field no tag accounts for, observations, which
would fit, marked as the guess it is.
does not state the length. The dump on the page is a TD1 value.
711D. Added a note that these objects are unverified data. AGESIC's ownreference code reports the data as unsigned when the SOD is missing, and it is
missing on earlier batches, which is why the driver does not expose it.
Pathcolumn renamed toEF, since it held file IDs and not the paths printed in the dump above it.Everything here is either in the linked documentation or was measured on a card.
No personal data was used, only field structure, lengths and encodings.