{"id":"asn1-der-validate","version":"1.0.0","description":"Check one ASN.1 DER value for canonical TLV structure and return a reason.","supported_operations":["validate canonical der tlv encoding","check der hex for structural errors","is this der value canonical","reject nonminimal asn1 length forms","der conformance check without a schema","why a der encoding is not canonical","בדיקת תקינות קידוד תגיות בלי סכמה"],"unsupported_operations":["validate an x509 certificate path or hostname","check a signature, issuer, or expiry","accept ber indefinite length as conformant"],"semantics":["Well-typed der_hex that is not one canonical DER value returns valid false and a snake_case reason. Wrong types, unknown fields, empty text, bad hex, and lone surrogates throw invalid_input. Over-limit input throws limit_exceeded before the walk.","On success, reason is \"ok\" and the root summary describes the single top-level value. On failure, node_count and depth are 0 and the root fields are empty; byte_length is still the decoded input length.","Rejection includes indefinite length, non-minimal tag or length, non-minimal INTEGER, BER BOOLEAN other than 0x00 or 0xff, bad BIT STRING padding, non-minimal OIDs, unsorted SET components, trailing bytes, and illegal constructed bits.","REAL follows X.690 8.5 and 11.3. Empty contents are plus zero. 090100 is invalid_real because 0x00 is not a defined contents octet. Decimal, base 8/16, nonzero scale, an even mantissa, and a non-shortest exponent are real_not_canonical. Only special octets 0x40 and 0x41 are defined.","UTCTime uses the RFC 5280 year window. The check does not interpret certificate semantics.","Disclaimer: format transform only; provides no confidentiality, integrity, or authenticity."],"limits":{"max_der_bytes":256,"max_depth":8,"max_nodes":32,"max_output_bytes":16384,"max_tag_decimal_digits":600,"max_hex_chars":512},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["der_hex"],"properties":{"der_hex":{"type":"string","minLength":2,"maxLength":512,"pattern":"^([0-9a-f]{2})+$"}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reason","byte_length","node_count","depth","root_tag_class","root_tag_number","root_constructed","root_universal_type"],"properties":{"valid":{"type":"boolean"},"reason":{"type":"string","enum":["ok","truncated","trailing_bytes","indefinite_length","non_minimal_length","non_minimal_tag","invalid_length","invalid_tag","reserved_tag","invalid_constructed","invalid_integer","non_minimal_integer","invalid_boolean","invalid_null","invalid_bit_string","invalid_oid","invalid_real","real_not_canonical","invalid_time","invalid_utf8","invalid_character_string","invalid_bmp_string","invalid_universal_string","set_not_canonical","invalid_der"]},"byte_length":{"type":"integer","minimum":0,"maximum":256},"node_count":{"type":"integer","minimum":0,"maximum":32},"depth":{"type":"integer","minimum":0,"maximum":8},"root_tag_class":{"type":"string","enum":["","universal","application","context","private"]},"root_tag_number":{"type":"string","maxLength":600,"pattern":"^(|0|[1-9][0-9]{0,599})$"},"root_constructed":{"type":"boolean"},"root_universal_type":{"type":"string","enum":["","unknown","boolean","integer","bit_string","octet_string","null","object_identifier","object_descriptor","external","real","enumerated","embedded_pdv","utf8_string","relative_oid","time","sequence","set","numeric_string","printable_string","teletex_string","videotex_string","ia5_string","utc_time","generalized_time","graphic_string","visible_string","general_string","universal_string","character_string","bmp_string","date","time_of_day","date_time","duration","oid_iri","relative_oid_iri"]}}},"examples":[{"input":{"der_hex":"300d06096086480165030402010500"},"output":{"valid":true,"reason":"ok","byte_length":15,"node_count":3,"depth":2,"root_tag_class":"universal","root_tag_number":"16","root_constructed":true,"root_universal_type":"sequence"}},{"input":{"der_hex":"0900"},"output":{"valid":true,"reason":"ok","byte_length":2,"node_count":1,"depth":1,"root_tag_class":"universal","root_tag_number":"9","root_constructed":false,"root_universal_type":"real"}},{"input":{"der_hex":"090100"},"output":{"valid":false,"reason":"invalid_real","byte_length":3,"node_count":0,"depth":0,"root_tag_class":"","root_tag_number":"","root_constructed":false,"root_universal_type":""}}],"execute_url":"/v1/tools/asn1-der-validate/versions/1.0.0/execute"}