secure-systems-lab / securesystemslib

Cryptographic and general-purpose routines for Secure Systems Lab projects at NYU
MIT License
49 stars 49 forks source link

Rewrite the parsers in Kaitai Struct #258

Open KOLANICH opened 4 years ago

KOLANICH commented 4 years ago

Please fill in the fields below to submit an issue or feature request. The more information that is provided, the better.

Description of issue or feature request: Currently handcoded parsers are used. It is not a very flexible approach. It complicates the matters a lot, both understanding and modification.

There exists a DSL called Kaitai Struct for describing binary parsers. It allows to describe the structure in a declarative way and then compile it into a parser in multiple programming languages.

It may make sense to replace handcoded parsers with generated ones.

BTW, https://github.com/kaitai-io/kaitai_struct_formats/blob/master/security/openpgp_message.ksy may be helpful.

joshuagl commented 4 years ago

Thanks for the suggestion, this is the first time I've heard of Kaitai.