ASN.1 Noir Parser — Parsing X.509 & DER Structures in Noir #10174
sanjay-sol
started this conversation in
Show and tell
Replies: 1 comment
-
|
Thanks for sharing the work! Curious are you building something off of it? 👀 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
ASN.1 Noir Parser
👉 You can find complete implementation details here - Github Repository
A fully functional ASN.1 parser written in Noir for use in zero-knowledge circuits. This parser decodes DER-encoded binary structures such as X.509 certificates and extracts components like OIDs, UTF8 strings, UTC times, bit strings, octet strings, and signatures.
Built for ZK use-cases such as proving certificate validity without revealing the entire document.
Use Cases
These circuits enable ZK applications like:
Features
UTF8StringUTCTimeObject Identifiers (OIDs)Bit StringsOctet StringsSignature & Integer ValuesTest Coverage
Run tests using:
nargo testTest cases coverage
[asn] Running 53 test functions [asn] Testing test_main ... ok [asn] Testing parser::test_decode_tlv_long_form ... ok [asn] Testing parser::test_decode_tlv_nested_tlv_inside_sequence ... ok [asn] Testing parser::test_decode_tlv_short_form ... ok [asn] Testing parser::test_algorithm_identifier_oid_only ... ok [asn] Testing parser::test_algorithm_identifier_truncated_oid ... ok [asn] Testing parser::test_algorithm_identifier_sha256_with_rsa ... ok [asn] Testing parser::test_all_ones_unused_zero ... ok [asn] Testing parser::test_algorithm_identifier_sha1_with_rsa ... ok [asn] Testing parser::test_empty_bit_string ... ok [asn] Testing parser::test_all_ones_unused_zero_with_tlv ... ok [asn] Testing parser::test_empty_bit_string_with_tlv ... ok [asn] Testing parser::test_multiple_bytes_with_unused ... ok [asn] Testing parser::test_no_unused_bits_mixed_bits ... ok [asn] Testing parser::test_no_unused_bits_full_byte ... ok [asn] Testing parser::test_parse_algorithm_identifier_sha256_rsa ... ok [asn] Testing parser::test_multiple_bytes_with_unused_with_tlv ... ok [asn] Testing parser::test_no_unused_bits_full_byte_with_tlv ... ok [asn] Testing parser::test_parse_attribute_common_name ... ok [asn] Testing parser::test_parse_integer ... ok [asn] Testing parser::test_parse_integer_empty ... ok [asn] Testing parser::test_parse_common_name ... ok [asn] Testing parser::test_parse_integer_max_8_bytes ... ok [asn] Testing parser::test_no_unused_bits_mixed_bits_with_tlv ... ok [asn] Testing parser::test_parse_integer_neg1 ... ok [asn] Testing parser::test_parse_integer_negative_8_bytes ... ok [asn] Testing parser::test_parse_integer_negative_multi_byte ... ok [asn] Testing parser::test_parse_integer_positive_multi_byte ... ok [asn] Testing parser::test_parse_integer_positive_single_byte ... ok [asn] Testing parser::test_parse_integer_zero ... ok [asn] Testing parser::test_parse_octet_string_all_ff ... ok [asn] Testing parser::test_parse_octet_string_all_zero ... ok [asn] Testing parser::test_parse_octet_string_empty ... ok [asn] Testing parser::test_parse_octet_string_mixed_bytes ... ok [asn] Testing parser::test_parse_country_name ... ok [asn] Testing parser::test_parse_octet_string_single_byte ... ok [asn] Testing parser::test_parse_jurisdiction_country ... ok [asn] Testing parser::test_parse_oid_ec_public_key ... ok [asn] Testing parser::test_parse_oid_common_name ... ok [asn] Testing parser::test_parse_oid_enterprise ... ok [asn] Testing parser::test_parse_validity_diff_times ... ok [asn] Testing parser::test_parse_oid_minimal ... ok [asn] Testing parser::test_parse_oid_rsa_encryption ... ok [asn] Testing parser::test_parse_validity_future_date ... ok [asn] Testing parser::test_parse_organization_name ... ok [asn] Testing parser::test_parse_validity_min_date ... ok [asn] Testing parser::test_parse_validity_utctime ... ok [asn] Testing parser::test_with_unused_bits_at_end ... ok [asn] Testing parser::test_with_unused_bits_at_end_with_tlv ... okResources
Built With
Beta Was this translation helpful? Give feedback.
All reactions