The NITF security tags (sarpy.io.general.nitf_elements.security)

The security tags definitions, which are used in each NITF subheader element.

class sarpy.io.general.nitf_elements.security.NITFSecurityTags(**kwargs)

Bases: NITFElement

The NITF security tags object for NITF version 2.1 - see standards document Joint BIIF Profile (JBP) for more information.

In the NITF standard, this object is simply redefined (is an identical way) for each of the main header and subheader objects. This object is intended to be flexibly used for any and all of these.

CLAS: str

The classification level. Takes values in {'R', 'T', 'S', 'U', 'C'}. Default value is U.

Type:

str

CLSY: str

Security Classification System. This field shall contain valid values indicating the national or multinational security system used to classify this element. Country Codes per FIPS PUB 10-4 shall be used to indicate national security systems. The designator XN is for classified data generated by a component using NATO security system marking guidance. This code is outside the FIPS 10-4 document listing, and was selected to not duplicate existing codes.

Type:

str

CODE: str

Codewords. This field shall contain a valid indicator of the security compartments associated. Valid values include one or more of the digraphs found in table A-4. Multiple entries shall be separated by a single ECS spaces (0x20). The selection of a relevant set of codewords is application specific.

Type:

str

CTLH: str

Control and Handling. This field shall contain valid additional security control and/or handling instructions (caveats) associated with this element.

Type:

str

REL: str

Releasing Instructions. This field shall contain a valid list of country and/or multilateral entity codes to which countries and/or multilateral entities this elementis authorized for release. Valid items in the list are one or more country codes as found in FIPS PUB 10-4 and/or codes identifying multilateral entities.

Type:

str

DCTP: str

Declassification Type. This field shall contain a valid indicator of the type of security declassification or downgrading instructions which apply to this element. Takes values in {'', 'GE', 'O', 'DE', 'X', 'DD', 'GD'}.

Type:

str

DCDT: str

Declassification Date. This field shall indicate the date on which this element is to be declassified if the value in Declassification Type is DD.

Type:

str

DCXM: str

Declassification Exemption. This field shall indicate the reason this element is exempt from automatic declassification if the value in Declassification Type is X. Takes values in {'', '25X8', '25X6', 'X6', 'X5', '25X4', 'DNI', '25X5', '25X9', '25X3', 'X4', '25X7', 'X7', 'X3', '25X1', '25X2', 'DN10', 'X2', 'X1', 'X8'}.

Type:

str

DG: str

Downgrade. This field shall indicate the classification level to which this element is to be downgraded if the values in Declassification Type are GD or GE. Takes values in {'', 'R', 'C', 'S'}.

Type:

str

DGDT: str

Downgrade Date. This field shall indicate the date on which this element is to be downgraded if the value in Declassification Type is GD.

Type:

str

CLTX: str

Classification Text. This field shall be used to provide additional information about classification to include identification of a declassification or downgrading event if the values in Declassification Type are DE or GE. It may also be used to identify multiple classification sources and/or any other special handling rules. Values are user defined free text.

Type:

str

CAPT: str

Classification Authority Type. This field shall indicate the type of authority used to classify this element. Takes values in {'', 'O', 'M', 'D'}.

Type:

str

CAUT: str

original classification authority name and position or personal identifier if the value in Classification Authority Type is O; title of the document or security classification guide used to classify this element if the value in Classification Authority Type is D; and Derive-Multiple if the classification was derived from multiple sources. In the latter case, the originator will maintain a record of the sources used in accordance with existing security directives. One of the multiple sources may also be identified in Classification Text if desired

Type:

str

Type:

Classification Authority. This field shall identify the classification authority for this element dependent upon the value in Classification Authority Type. Values are user defined free text which should contain the following information

CRSN: str

Classification Reason. This field shall contain values indicating the reason for classifying the graphic. Valid values are A to G. These correspond to the reasons for original classification per E.O. 12958, Section 1.5.(a) to (g). Takes values in {'', 'D', 'F', 'E', 'A', 'C', 'G', 'B'}.

Type:

str

SRDT: str

Security Source Date. This field shall indicate the date of the source used to derive the classification of the graphic. In the case of multiple sources, the date of the most recent source shall be used.

Type:

str

CTLN: str

Security Control Number. This field shall contain a valid security control number associated with the graphic. The format of the security control number shall be in accordance with the regulations governing the appropriate security channel(s).

Type:

str

classmethod from_bytes(value, start)
Parameters:
  • value (bytes|str) – the header string to scrape

  • start (int) – the beginning location in the string

get_bytes_length()

Get the length of the serialized bytes array

Return type:

int

classmethod minimum_length()

The minimum size in bytes that takes to write this header element.

Return type:

int

to_bytes()

Write the object to a properly packed str.

Return type:

bytes

to_json()

Serialize element to a json representation. This is intended to allow a simple presentation of the element.

Return type:

dict

class sarpy.io.general.nitf_elements.security.NITFSecurityTags0(**kwargs)

Bases: NITFElement

The NITF security tags object for NITF version 2.0 - see standards document MIL-STD-2500A for more information.

In the NITF standard, this object is simply redefined (is an identical way) for each of the main header and subheader objects. This object is intended to be flexibly used for any and all of these.

CLAS: str

Takes values in {'R', 'T', 'S', 'U', 'C'}. Default value is U.

Type:

str

CODE: str

str:

CTLH: str

str:

REL: str

str:

CAUT: str

str:

CTLN: str

str:

DWNG: str

str:

classmethod minimum_length()

The minimum size in bytes that takes to write this header element.

Return type:

int

classmethod from_bytes(value, start)
Parameters:
  • value (bytes|str) – the header string to scrape

  • start (int) – the beginning location in the string

get_bytes_length()

Get the length of the serialized bytes array

Return type:

int

to_bytes()

Write the object to a properly packed str.

Return type:

bytes

to_json()

Serialize element to a json representation. This is intended to allow a simple presentation of the element.

Return type:

dict