Skip to content

TRC description: mandate normalization, introduce language tag and localizedDescriptions#137

Merged
nicorusti merged 23 commits into
mainfrom
description_encoding
May 22, 2026
Merged

TRC description: mandate normalization, introduce language tag and localizedDescriptions#137
nicorusti merged 23 commits into
mainfrom
description_encoding

Conversation

@nicorusti
Copy link
Copy Markdown
Member

@nicorusti nicorusti commented Apr 30, 2026

Resolves #136

Diff with main

Slack discussion

TODO:

  • Ensure latest trc.asn1 is copy pasted to appendix before merging

@nicorusti nicorusti marked this pull request as ready for review April 30, 2026 14:08
Comment thread draft-dekater-scion-pki.md Outdated
Comment thread draft-dekater-scion-pki.md Outdated
@nicorusti nicorusti requested a review from oncilla May 12, 2026 13:23
Comment thread draft-dekater-scion-pki.md Outdated
Comment thread draft-dekater-scion-pki.md Outdated
@nicorusti nicorusti requested a review from oncilla May 12, 2026 17:40
@nicorusti nicorusti mentioned this pull request May 15, 2026
Copy link
Copy Markdown
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: i would change the field names slightly

Comment thread asn1/trc.asn1 Outdated
Comment thread asn1/trc.asn1 Outdated
nicorusti and others added 4 commits May 15, 2026 15:15
Co-authored-by: Dominik Roos <domi.roos@gmail.com>
Co-authored-by: Dominik Roos <domi.roos@gmail.com>
@nicorusti
Copy link
Copy Markdown
Member Author

Hi @oncilla, I incorporated your suggestions in the PR. Good to hear that you like the overall approach, and thanks for posting your comments.. I also sometimes forget to click publish…

Did you already check that the existing TRCs are compatible with this ASN.1 module?

With the updated ASN.1 module here, I can successfully decode various TRCs in ASN.1 studio:
Screenshot 2026-05-15 at 15 16 38

In general looks good to me, but I need to double check how existing code will behave if a TRC with these new fields is encountered.
How long does it take?
I would merge the PR if we don’t expect other changes, but leave Issue #136 open until you can get this tested. If it helps, I dropped a TRC with the extended description. it would be good to check how this affects signing of the TRC. This way you can take your time. We anyways have at least a few weeks before the draft goes to publication, since Eliot will also do a final review on his side.

If you feel this change needs more community input, I can post it on scionproto, but I’m not sure there are more people understanding PKI as deep as you.

@nicorusti nicorusti changed the title TRC description: mandate normalization and recommend tags TRC description: mandate normalization, introduce language tag and localizedDescriptions May 15, 2026
@oncilla
Copy link
Copy Markdown
Contributor

oncilla commented May 18, 2026

Hi @oncilla, I incorporated your suggestions in the PR. Good to hear that you like the overall approach, and thanks for posting your comments.. I also sometimes forget to click publish…

Did you already check that the existing TRCs are compatible with this ASN.1 module?

With the updated ASN.1 module here, I can successfully decode various TRCs in ASN.1 studio: Screenshot 2026-05-15 at 15 16 38

Cool. Thanks for checking!

In general looks good to me, but I need to double check how existing code will behave if a TRC with these new fields is encountered. How long does it take? I would merge the PR if we don’t expect other changes, but leave Issue #136 open until you can get this tested. If it helps, I dropped a TRC with the extended description. it would be good to check how this affects signing of the TRC. This way you can take your time. We anyways have at least a few weeks before the draft goes to publication, since Eliot will also do a final review on his side.

I created a draft PR with what I did to check: scionproto/scion#4927
As far as I can tell, the change is forward and backward compatible. So all good from my side!

If you feel this change needs more community input, I can post it on scionproto, but I’m not sure there are more people understanding PKI as deep as you.

It's probably good form to announce this in the community. I don't think there is going to be much input though.

Comment thread asn1/trc.asn1 Outdated
Comment thread asn1/trc.asn1 Outdated
authoritativeASes SEQUENCE OF ASN,
description UTF8String (SIZE (1..8192)) OPTIONAL,
certificates SEQUENCE SIZE (1..4095) OF Certificate,
localizedDescriptions [0] SEQUENCE SIZE (1..MAX) OF LocalizedText OPTIONAL,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of MAX, I suggest using a very low number here, e.g. 5.

I also wonder, do we really need 8KB?
How about limiting it to 256 bytes?
Same for the localizations. Also, localizations don't need to have the same length as the main description...?

The problem is really that this can be exploited to create really large TRC that could even be used as an attack (as discussed in the meeting yesterday).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The size concern also goes for other fields, do we really need 2000 votes or 4000 certificates?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is TRC size a real threat vector? If yes, is it prevented with hard limits in the spec?

I mean, if you see a 1 GB certificate/TRC, you maybe don't want to open it anyways and I think implementations may have some limits internally. Is it the case?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to review many field limits, I suggest that we merge this PR, which is about language tags, and then review field sizes in #153

Comment thread draft-dekater-scion-pki.md Outdated
Comment thread draft-dekater-scion-pki.md Outdated
Comment thread asn1/trc.asn1 Outdated

LocalizedText ::= SEQUENCE {
language PrintableString,
content UTF8String (SIZE (0..8192))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
content UTF8String (SIZE (0..8192))
content UTF8String (SIZE (1..256))

See discussion below on description field: We should probably avoid bloated TRC.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current SSHN TRC does not fit (even tough it uses multiple languages without tags).
#127 (comment)

Copy link
Copy Markdown
Member Author

@nicorusti nicorusti May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With @oncilla we discussed here that 4096 or 8192 is an acceptable size.. I would not make it smaller than 4096 (or bare minimum 1024)

Copy link
Copy Markdown
Member Author

@nicorusti nicorusti May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to review many field limits, I suggest that we merge this one and then just review field sizes in #153

Comment thread draft-dekater-scion-pki.md Outdated
Comment thread draft-dekater-scion-pki.md Outdated
Comment thread draft-dekater-scion-pki.md Outdated
Comment thread draft-dekater-scion-pki.md
Comment thread asn1/trc.asn1 Outdated
nicorusti and others added 5 commits May 22, 2026 12:36
Co-authored-by: Tilmann <tilmann_dev@gmx.de>
Co-authored-by: Tilmann <tilmann_dev@gmx.de>
Co-authored-by: Tilmann <tilmann_dev@gmx.de>
Co-authored-by: Tilmann <tilmann_dev@gmx.de>
nicorusti and others added 3 commits May 22, 2026 14:19
@nicorusti
Copy link
Copy Markdown
Member Author

nicorusti commented May 22, 2026

It's probably good form to announce this in the community. I don't think there is going to be much input though.

FOr the record, this was discussed at TC #10 on 21.05.2026 with no objections. It was also announced on Slack and it will be brought to the OS contributor call next week.

@nicorusti nicorusti requested a review from tzaeschke May 22, 2026 13:50
Copy link
Copy Markdown
Contributor

@tzaeschke tzaeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve, but I think we need to discuss the "NOT empty" further, I think it doesn't express what it is supposed to express (see my comment below)....

Comment thread draft-dekater-scion-pki.md Outdated
@nicorusti nicorusti merged commit 2879f98 into main May 22, 2026
2 checks passed
@nicorusti
Copy link
Copy Markdown
Member Author

For the record, enclosed the html diff corresponding to this PR
Diff_ draft-dekater-scion-pki.txt - draft-dekater-scion-pki.txt.html

@nicorusti nicorusti deleted the description_encoding branch May 27, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Language tags in TRC description (RFC 5198) and UTF-8 normalization

3 participants