### ----------------------------------------------------
### -- PDF::ISO_32000_2
### -- Licenses: Artistic-2.0
### -- Authors: David Warring
### -- File: resources/ISO_32000_2/Table_20-Entries_common_to_all_encryption_dictionaries.json
### ----------------------------------------------------
{
  "table": {
    "caption": "Table 20 — Entries common to all encryption dictionaries",
    "head": [
      "Key",
      "Type",
      "Value"
    ],
    "rows": [
      [
        "Filter",
        "name",
        "(Required) The name of the preferred security handler for this document. It is the name of the security handler that was used to encrypt the document. If SubFilter is not present, only this security handler is used when opening the document. If it is present, a PDF processor can use any security handler that implements the format specified by SubFilter.\nStandard is the name of the built-in password-based security handler. Names for other security handlers may be registered by using the procedure described in Annex E, \"Extending PDF\"."
      ],
      [
        "SubFilter",
        "name",
        "(Optional; PDF 1.3) A name that completely specifies the format and interpretation of the contents of the encryption dictionary. It allows security handlers other than the one specified by Filter to decrypt the document. If this entry is absent, other security handlers does not decrypt the document."
      ],
      [
        "V",
        "integer",
        "(Required) A code specifying the algorithm to be used in encrypting and decrypting the document:\n0 An algorithm that is undocumented. This value is not used.\n1 (Deprecated in PDF 2.0) Indicates the use of 7.6.3.2, \"Algorithm 1: Encryption of data using the RC4 or AES algorithms\" (deprecated in PDF 2.0) with a file encryption key length of 40 bits; see below.\n2 (PDF 1.4; deprecated in PDF 2.0) Indicates the use of 7.6.3.2, \"Algorithm 1: Encryption of data using the RC4 or AES algorithms\" (deprecated in PDF 2.0) but permitting file encryption key lengths greater than 40 bits.\n3 (PDF 1.4; deprecated in PDF 2.0) An unpublished algorithm that permits file encryption key lengths ranging from 40 to 128 bits. This value does not appear in a conforming PDF file.\n4 (PDF 1.5; deprecated in PDF 2.0) The security handler defines the use of encryption and decryption in the document, using the rules specified by the CF, StmF, and StrF entries using 7.6.3.2, \"Algorithm 1: Encryption of data using the RC4 or AES algorithms\" (deprecated in PDF 2.0) with a file encryption key length of 128 bits.\n5 (PDF 2.0) The security handler defines the use of encryption and decryption in the document, using the rules specified by the CF, StmF, StrF and EFF entries using 7.6.3.3, \"Algorithm 1.A: Encryption of data using the AES algorithms\" with a file encryption key length of 256 bits."
      ],
      [
        "Length",
        "integer",
        "(Optional; PDF 1.4; only if V is 2 or 3; deprecated in PDF 2.0) The length of the file encryption key, in bits. The value is a multiple of 8, in the range 40 to 128. Default value: 40."
      ],
      [
        "CF",
        "dictionary",
        "(Optional; meaningful only when the value of V is 4 (PDF 1.5) or 5 (PDF 2.0)) A dictionary whose keys is crypt filter names and whose values is the corresponding crypt filter dictionaries (see \"Table 25 — Entries common to all crypt filter dictionaries\"). Every crypt filter used in the document has an entry in this dictionary, except for the standard crypt filter names (see \"Table 26 — Standard crypt filter names\").\nAny keys in the CF dictionary that are listed in \"Table 26 — Standard crypt filter names\" is ignored by a PDF processor. Instead, the PDF processor uses properties of the respective standard crypt filters."
      ],
      [
        "StmF",
        "name",
        "(Optional; meaningful only when the value of V is 4 (PDF 1.5) or 5 (PDF 2.0)) The name of the crypt filter that is used by default when decrypting streams. The name is a key in the CF dictionary or a standard crypt filter name specified in \"Table 26 — Standard crypt filter names\". All streams in the document, except for cross-reference streams (see 7.5.8, \"Cross-reference streams\") or streams that have a Crypt entry in their Filter array (see \"Table 6 — Standard filters\"), is decrypted by the security handler, using this crypt filter.\nDefault value: Identity."
      ],
      [
        "StrF",
        "name",
        "(Optional; meaningful only when the value of V is 4 (PDF 1.5) or 5 (PDF 2.0)) The name of the crypt filter that is used when decrypting all strings in the document. The name is a key in the CF dictionary or a standard crypt filter name specified in \"Table 26 — Standard crypt filter names\".\nDefault value: Identity."
      ],
      [
        "EFF",
        "name",
        "(Optional; meaningful only when the value of V is 4 (PDF 1.6) or 5 (PDF 2.0)) The name of the crypt filter that is used when encrypting embedded file streams that do not have their own crypt filter specifier; it corresponds to a key in the CF dictionary or a standard crypt filter name specified in \"Table 26 — Standard crypt filter names\".\nThis entry is provided by the security handler. PDF writers respect this value when encrypting embedded files, except for embedded file streams that have their own crypt filter specifier. If this entry is not present, and the embedded file stream does not contain a crypt filter specifier, the stream is encrypted using the default stream crypt filter specified by StmF."
      ]
    ]
  }
}


