A x/crypto/cryptobyte parser has two advantages over an encoding/asn1 based parser: significant performance improvement due to avoiding reflection, and a much stricter profile/narrower security surface by only needing to support the X.509 profile rather than supporting all of the generic ASN.1 features.
https://go-review.googlesource.com/c/go/+/274234 contains a WIP rewrite which shows around 65% performance improvement and 70% reduction in memory allocations when parsing a typical web PKI certificate.
A x/crypto/cryptobyte parser has two advantages over an encoding/asn1 based parser: significant performance improvement due to avoiding reflection, and a much stricter profile/narrower security surface by only needing to support the X.509 profile rather than supporting all of the generic ASN.1 features.
https://go-review.googlesource.com/c/go/+/274234 contains a WIP rewrite which shows around 65% performance improvement and 70% reduction in memory allocations when parsing a typical web PKI certificate.