{"success":true,"data":{"ext":"der","name":"DER","description":"Distinguished Encoding Rules (DER) is a binary encoding format for Abstract Syntax Notation One (ASN.1), defined and maintained by ITU-T and ISO/IEC as part of the X.690 standard. It is commonly used for X.509 certificates, certificate requests, cryptographic keys, and other security-related data exchanged by applications and network protocols. DER itself is not inherently risky, but malformed or maliciously crafted encoded objects may be used to exploit parser vulnerabilities in affected software.","mime":["application/x-x509-cert;format=der"],"risk_level":"Safe","signatures":[{"hex":"30 80","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]}],"related":["asc","crt","gpg","key","pem","pgp"],"usage":{"python":"def is_der(file_path: str) -> bool:\n    \"\"\"Check if file is a valid DER by magic bytes.\"\"\"\n    signature = bytes([0x30, 0x80])\n    with open(file_path, \"rb\") as f:\n        return f.read(2) == signature","node":"function isDER(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x30, 0x80]);\n  return buffer.subarray(0, 2).equals(signature);\n}","go":"func IsDER(data []byte) bool {\n    signature := []byte{0x30, 0x80}\n    if len(data) < 2 {\n        return false\n    }\n    return bytes.Equal(data[:2], signature)\n}"},"category":"Certificates & Keys"}}