Comment by zzo38computer

Comment by zzo38computer 2 days ago

18 replies

it is not necessary to use or to implement all of the data types and other features of ASN.1; you can implement only the features that you are using. Since DER uses the same framing for all data types, it is possible to skip past any fields that you do not care about (although in some cases you will still need to check its type, to determine whether or not an optional field is present; fortunately the type can be checked easily, even if it is not a type you implement).

morshu9001 2 days ago

Yes but I don't want to worry about what parts of the spec are implemented on each end. If you removed all the unnecessary stuff and formed a new standard, it'd basically be protobuf.

  • zzo38computer 2 days ago

    I do not agree. Which parts are necessary depends on the application; there is not one good way to do for everyone (and Protobuf is too limited). You will need to implement the parts specific to your schema/application on each end, and if the format does not have the data types that you want then you must add them in a more messy way (especially when using JSON).

    • morshu9001 2 days ago

      In what ASN1 application is protobuf spec too limited? I've used protobuf for tons of different things, it's always felt right. Though I understand certain encodings of ASN1 can have better performance for specific things.

      • cryptonector a day ago

        Open types, constrained types, parameterized types, not needing tags, etc.

      • zzo38computer 2 days ago

        Numbers bigger than 64-bits, character sets other than Unicode (and ASCII), OIDs, etc.