-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
der: Encoding higher tag number #1381
Comments
Can you provide more information on what you're implementing which uses a combination of DER and the high tag number form?
We're making breaking changes right now, so it's something that can be considered. As it's something that's not needed for @RustCrypto-related use cases, it's not something I'd personally be interested in implementing, but a PR for it could be considered. It would be helpful if it were motivated by a published specification that uses the combination of DER and high tag number form. |
Hello,
Yeah that sounds fair enough. |
I also stumbled on this issue. For my company I am working on der encoded files in a proprietary format. The This project is time-critical and in general critical for us. So I would try to put this in a PR as fast as possible. If I manage to get to a working solution I would love to get feedback. Especially concerning the fact if this approach has the chance to be merged at some point. @xaqq did you work on this in the meantime? I think I will try to accomplish two things:
|
I should note that while PRs are welcome, there are various places in the codebase that assume a tag is always equivalent to |
Last week I hacked together a proof-of-concept, which seems to be already working 👍 So currently I do not expect run into any problems. I also think the crate's code is really nice to work with. I think pretty soon I will find the time to clean it up and post an initial draft for some early feedback. |
I opened #1416 to get some initial feedback on my approach |
Hello,
I have an use case where I need to DER-encode ASN.1 message using greater than 30 for tag number.
I noticed in some comments that "This library deliberately does not support this: tag numbers greater than 30 are disallowed.".
I realize that
TagNumber
are an enumeration in this library, which makes arbitrarily high tag number problematic.I am curious if you would consider lifting this limitation and willing to accept patches.
I can imagine 2 approaches:
+ Increase max tag number to 127, and support 2-bytes encoding of tags. Since 127 is still reasonable number it sounds like it would acceptable to have tag number up to
TagNumber::N127
.+ Accept large number by using
u64
oru128
. This might be a too big impact the library API.Thank you,
The text was updated successfully, but these errors were encountered: