-- --************************************************************************* --* * --* © Copyright 2010, Hewlett-Packard Development Company, L.P. * --* * --* Confidential computer software. Valid license from HP and/or * --* its subsidiaries required for possession, use, or copying. * --* * --* Consistent with FAR 12.211 and 12.212, Commercial Computer Software, * --* Computer Software Documentation, and Technical Data for Commercial * --* Items are licensed to the U.S. Government under vendor's standard * --* commercial license. * --* * --* Neither HP nor any of its subsidiaries shall be liable for technical * --* or editorial errors or omissions contained herein. The information * --* in this document is provided "as is" without warranty of any kind and * --* is subject to change without notice. The warranties for HP products * --* are set forth in the express limited warranty statements accompanying * --* such products. Nothing herein should be construed as constituting an * --* additional warranty. * --* * --************************************************************************* --******************************************************************************************************************** -- Created: 30-Mar-2010 17:24:20 by OpenVMS SDL EV3-3 -- Source: 21-SEP-2005 15:44:14 $1$DGA7274:[ENCRYPT.SRC]ENCRYPT_STRUCTURES.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package ENCRYPT_STRUCTURES is -- module $ENCSTRDEF -- Definitions for Encryption structures -- KEY_SYSTEM system -- KEY_GROUP group -- KEY_PROCESS process -- KEY_JOB job -- KEY_LITERAL literal key definition, don't compress -- KEY_AES AES Key encryption/decryption ENCRYPT_M_KEY_SYSTEM : constant := 16#00000001#; ENCRYPT_M_KEY_GROUP : constant := 16#00000002#; ENCRYPT_M_KEY_PROCESS : constant := 16#00000004#; ENCRYPT_M_KEY_JOB : constant := 16#00000008#; ENCRYPT_M_AVAIL1 : constant := 16#00000010#; ENCRYPT_M_KEY_LITERAL : constant := 16#00000020#; ENCRYPT_M_KEY_AES : constant := 16#00000040#; type ENCRYPT_KEY_BITS_TYPE is record KEY_SYSTEM : BOOLEAN; KEY_GROUP : BOOLEAN; KEY_PROCESS : BOOLEAN; KEY_JOB : BOOLEAN; AVAIL1 : BOOLEAN; KEY_LITERAL : BOOLEAN; KEY_AES : BOOLEAN; FILLER_1 : BOOLEAN; end record; for ENCRYPT_KEY_BITS_TYPE use record KEY_SYSTEM at 0 range 0 .. 0; KEY_GROUP at 0 range 1 .. 1; KEY_PROCESS at 0 range 2 .. 2; KEY_JOB at 0 range 3 .. 3; AVAIL1 at 0 range 4 .. 4; KEY_LITERAL at 0 range 5 .. 5; KEY_AES at 0 range 6 .. 6; FILLER_1 at 0 range 7 .. 7; end record; for ENCRYPT_KEY_BITS_TYPE'SIZE use 8; ENCRYPT_KEY_BITS_TYPE_INIT : constant ENCRYPT_KEY_BITS_TYPE := (KEY_SYSTEM => FALSE, KEY_GROUP => FALSE, KEY_PROCESS => FALSE, KEY_JOB => FALSE, AVAIL1 => FALSE, KEY_LITERAL => FALSE, KEY_AES => FALSE, FILLER_1 => FALSE); ENCRYPT_M_VALID_KEY_BITS : constant := 111; -- KEY$SYSTEM system -- KEY$GROUP group -- KEY$PROCESS process -- KEY$JOB job -- avail1 unused -- KEY$LITERAL literal key definition, don't compress -- KEY$AES AES Key encryption/decryption ENCRYPT_K_KEY_SYSTEM : constant := 0; ENCRYPT_K_KEY_GROUP : constant := 1; ENCRYPT_K_KEY_PROCESS : constant := 2; ENCRYPT_K_KEY_JOB : constant := 3; ENCRYPT_K_AVAIL1 : constant := 4; ENCRYPT_K_KEY_LITERAL : constant := 5; ENCRYPT_K_KEY_AES : constant := 6; -- FILE_ENCRYPT encrypt/decrypt direction -- FILE_DELETE delete source file after operation -- FILE_ERASE erase source file when deleting -- FILE_LOG log file operation -- FILE_UNUSED -unused -- FILE_STATISTICS log statistics too -- FILE_COMPRESS compress input -- FILE_EXTLOG extended log -- FILE_IGNORE_CRC Ignore CRC generation/checking -- FILE_V011 Generate V1.1-compatible ciphertext file -- FILE_KEY_VALUE Pass a key by value -- FILE_AES AES File Operation ENCRYPT_M_FILE_ENCRYPT : constant := 16#00000001#; ENCRYPT_M_FILE_DELETE : constant := 16#00000002#; ENCRYPT_M_FILE_ERASE : constant := 16#00000004#; ENCRYPT_M_FILE_LOG : constant := 16#00000008#; ENCRYPT_M_FILE_UNUSED : constant := 16#00000010#; ENCRYPT_M_FILE_STATISTICS : constant := 16#00000020#; ENCRYPT_M_FILE_COMPRESS : constant := 16#00000040#; ENCRYPT_M_FILE_EXTLOG : constant := 16#00000080#; ENCRYPT_M_FILE_IGNORE_CRC : constant := 16#00000100#; ENCRYPT_M_FILE_V011 : constant := 16#00000200#; ENCRYPT_M_FILE_KEY_VALUE : constant := 16#00000400#; ENCRYPT_M_FILE_AES : constant := 16#00000800#; type ENCRYPT_FILE_OPS_TYPE is record FILE_ENCRYPT : BOOLEAN; FILE_DELETE : BOOLEAN; FILE_ERASE : BOOLEAN; FILE_LOG : BOOLEAN; FILLER_1 : BOOLEAN; FILE_STATISTICS : BOOLEAN; FILE_COMPRESS : BOOLEAN; FILE_EXTLOG : BOOLEAN; FILE_IGNORE_CRC : BOOLEAN; FILE_V011 : BOOLEAN; FILE_KEY_VALUE : BOOLEAN; FILE_AES : BOOLEAN; FILLER_2 : UNSIGNED_4; end record; for ENCRYPT_FILE_OPS_TYPE use record FILE_ENCRYPT at 0 range 0 .. 0; FILE_DELETE at 0 range 1 .. 1; FILE_ERASE at 0 range 2 .. 2; FILE_LOG at 0 range 3 .. 3; FILLER_1 at 0 range 4 .. 4; FILE_STATISTICS at 0 range 5 .. 5; FILE_COMPRESS at 0 range 6 .. 6; FILE_EXTLOG at 0 range 7 .. 7; FILE_IGNORE_CRC at 1 range 0 .. 0; FILE_V011 at 1 range 1 .. 1; FILE_KEY_VALUE at 1 range 2 .. 2; FILE_AES at 1 range 3 .. 3; FILLER_2 at 1 range 4 .. 7; end record; for ENCRYPT_FILE_OPS_TYPE'SIZE use 16; ENCRYPT_FILE_OPS_TYPE_INIT : constant ENCRYPT_FILE_OPS_TYPE := (FILE_ENCRYPT => FALSE, FILE_DELETE => FALSE, FILE_ERASE => FALSE, FILE_LOG => FALSE, FILLER_1 => FALSE, FILE_STATISTICS => FALSE, FILE_COMPRESS => FALSE, FILE_EXTLOG => FALSE, FILE_IGNORE_CRC => FALSE, FILE_V011 => FALSE, FILE_KEY_VALUE => FALSE, FILE_AES => FALSE, FILLER_2 => 0); ENCRYPT_M_VALID_FILE_BITS : constant := 4079; -- KEY_LENGTH /* original key string length -- KEYF_IS_COMPRESSED /* key is compressed text -- KEYF_LITERAL /* key is literal value -- KEYF_TOBE_COMPRESSED /* compression was deferred -- KEYF_AES /* Key is AES encrypted -- KEYF_UNUSED /* unused ENCRYPT_M_KEYF_IS_COMPRESSED : constant := 16#00000001#; ENCRYPT_M_KEYF_LITERAL : constant := 16#00000002#; ENCRYPT_M_KEYF_TOBE_COMPRESSED : constant := 16#00000004#; ENCRYPT_M_KEYF_AES : constant := 16#00000008#; type ENCRYPT_KEY_FLAGS_B_TYPE is record KEYF_IS_COMPRESSED : BOOLEAN; KEYF_LITERAL : BOOLEAN; KEYF_TOBE_COMPRESSED : BOOLEAN; KEYF_AES : BOOLEAN; FILLER_1 : UNSIGNED_12; end record; for ENCRYPT_KEY_FLAGS_B_TYPE use record KEYF_IS_COMPRESSED at 0 range 0 .. 0; KEYF_LITERAL at 0 range 1 .. 1; KEYF_TOBE_COMPRESSED at 0 range 2 .. 2; KEYF_AES at 0 range 3 .. 3; FILLER_1 at 0 range 4 .. 15; end record; for ENCRYPT_KEY_FLAGS_B_TYPE'SIZE use 16; ENCRYPT_KEY_FLAGS_B_TYPE_INIT : constant ENCRYPT_KEY_FLAGS_B_TYPE := (KEYF_IS_COMPRESSED => FALSE, KEYF_LITERAL => FALSE, KEYF_TOBE_COMPRESSED => FALSE, KEYF_AES => FALSE, FILLER_1 => 0); type ENCRYPT_STORED_KEY_FLAGS_TYPE is record KEY_LENGTH : UNSIGNED_WORD; KEY_FLAGS : UNSIGNED_WORD; ----Component(s) below are defined as comments since they ----overlap other fields ---- ----KEY_FLAGS_B : ENCRYPT_KEY_FLAGS_B_TYPE; end record; for ENCRYPT_STORED_KEY_FLAGS_TYPE use record KEY_LENGTH at 0 range 0 .. 15; KEY_FLAGS at 2 range 0 .. 15; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----KEY_FLAGS_B at 2 range 0 .. 15; end record; for ENCRYPT_STORED_KEY_FLAGS_TYPE'SIZE use 32; ENCRYPT_STORED_KEY_FLAGS_TYPE_INIT : constant ENCRYPT_STORED_KEY_FLAGS_TYPE := (KEY_LENGTH => 0, KEY_FLAGS => 0 ); ENCRYPT_M_VALID_DES_KEY_FLAGS : constant := 7; ENCRYPT_M_VALID_AES_KEY_FLAGS : constant := 15; -- -- Programmable interface itemlist item codes -- -- Algorithm specific optional parameters. For example with the -- DES based algorithms, is defined as the address -- of an 8-byte initialization vector (IV) to be used instead of -- any residual IV remaining from a previous operation. -- The interpretation of these parameters is documented with -- the specific algorithms. -- optparam_one Optional Parameter -- optparam_two Optional Parameter -- optparam_three Optional Parameter -- optparam_four Optional Parameter -- optparam_five Optional Parameter -- optparam_six Optional Parameter -- optparam_seven Optional Parameter -- optparam_eight Optional Parameter -- -- References the actual key value to be used. Overrides -- any key name/value reference supplied in other call -- parameters -- key_name A key namestring -- key_value A key value -- key_flags Key interpretation flags -- -- Algorithm name specification -- algorithm_spec algorithm name or type specification -- algorithm_type algorithm specification type code -- -- for encrypt$encrypt_file() parameters -- data_algorithm inner algorithm name specification -- qual_context common qualifier context -- -- max maximum itemlist number ENCRYPT_K_OPTPARAM_ONE : constant := 1; ENCRYPT_K_OPTPARAM_TWO : constant := 2; ENCRYPT_K_OPTPARAM_THREE : constant := 3; ENCRYPT_K_OPTPARAM_FOUR : constant := 4; ENCRYPT_K_OPTPARAM_FIVE : constant := 5; ENCRYPT_K_OPTPARAM_SIX : constant := 6; ENCRYPT_K_OPTPARAM_SEVEN : constant := 7; ENCRYPT_K_OPTPARAM_EIGHT : constant := 8; ENCRYPT_K_KEY_NAME : constant := 9; ENCRYPT_K_KEY_VALUE : constant := 10; ENCRYPT_K_KEY_FLAGS : constant := 11; ENCRYPT_K_ALGORITHM_SPEC : constant := 12; ENCRYPT_K_ALGORITHM_TYPE : constant := 13; ENCRYPT_K_DATA_ALGORITHM : constant := 14; ENCRYPT_K_QUAL_CONTEXT : constant := 15; ENCRYPT_K_MAX : constant := 16; -- -- Key name/value switch -- ENCRYPT_K_NAME_SPECIFIED : constant := 0; ENCRYPT_K_VALUE_SPECIFIED : constant := 1; -- -- Define structure for file encryption generated key vector -- -- FIL_BUFLEN length of this record -- FIL_FILEVER file encrypt routine version -- FIL_FILEUPD decimal version -- ---> FIL_KEY and FIL_IV are assumed to be contiguous -- FIL_KEY data key value -- FIL_IV initialize vector value -- ---> FIL_KEY and FIL_IV are assumed to be contiguous -- FIL_ALGCODE file data encryption algorithm code -- FIL_FLAGS file encryption flags -- FIL_COMPRESSED file was compressed before enc -- FIL_LONGCHECKSUM longidudinal checksum present -- FIL_ATR_LEN size of attribute record -- FIL_COMPRESS_MAX blocks in compress buffer -- FIL_ENCRYPT_MAX blocks in encrypt buffer -- FIL_DCXMAP_LEN size of DCX map record if present -- FIL_ALGNAM_LEN size of data encryption algorithm -- FIL_ALGNAM_STR data encryption alg name -- /* this is a varying length string with the next allocated field -- /* starting 'algnam_len' bytes after 'algnam_str' -- FIL_XKEY extended key (counted string) -- FIL_XIV extended IV (counted) -- FIL_XALGNAM_LEN extended size of data encryption algorithm - AES -- FIL_XALGNAM_STR extended ALG name string - for AES -- FIL_FILLER filler to pad to 256 bytes -- FIL_CHECKSUM structure checksum ENCRYPT_M_FIL_COMPRESSED : constant := 16#00000001#; ENCRYPT_M_FIL_LONGCHECKSUM : constant := 16#00000002#; type ENCRYPT_FIL_FLAGS_TYPE is record FIL_COMPRESSED : BOOLEAN; FIL_LONGCHECKSUM : BOOLEAN; FILLER_1 : UNSIGNED_30; end record; for ENCRYPT_FIL_FLAGS_TYPE use record FIL_COMPRESSED at 0 range 0 .. 0; FIL_LONGCHECKSUM at 0 range 1 .. 1; FILLER_1 at 0 range 2 .. 31; end record; for ENCRYPT_FIL_FLAGS_TYPE'SIZE use 32; ENCRYPT_FIL_FLAGS_TYPE_INIT : constant ENCRYPT_FIL_FLAGS_TYPE := (FIL_COMPRESSED => FALSE, FIL_LONGCHECKSUM => FALSE, FILLER_1 => 0); type ENCRYPT_FIL_DCXMAP_LEN_TYPE is record FIL_DCXMAP_LEN_LOW : UNSIGNED_WORD; FIL_DCXMAP_LEN_HIGH : UNSIGNED_WORD; end record; for ENCRYPT_FIL_DCXMAP_LEN_TYPE use record FIL_DCXMAP_LEN_LOW at 0 range 0 .. 15; FIL_DCXMAP_LEN_HIGH at 2 range 0 .. 15; end record; for ENCRYPT_FIL_DCXMAP_LEN_TYPE'SIZE use 32; ENCRYPT_FIL_DCXMAP_LEN_TYPE_INIT : constant ENCRYPT_FIL_DCXMAP_LEN_TYPE := (FIL_DCXMAP_LEN_LOW => 0, FIL_DCXMAP_LEN_HIGH => 0); type ENCRYPT_FIL_RECORD_TYPE is record FIL_BUFLEN : UNSIGNED_WORD; FIL_FILEVER : UNSIGNED_BYTE; FIL_FILEUPD : UNSIGNED_BYTE; FIL_KEY : UNSIGNED_QUADWORD; FIL_IV : UNSIGNED_QUADWORD; FIL_ALGCODE : UNSIGNED_LONGWORD; FIL_FLAGS : ENCRYPT_FIL_FLAGS_TYPE; FIL_ATR_LEN : UNSIGNED_WORD; FIL_COMPRESS_MAX : UNSIGNED_WORD; FIL_ENCRYPT_MAX : UNSIGNED_WORD; FIL_DCXMAP_LEN : ENCRYPT_FIL_DCXMAP_LEN_TYPE; FIL_ALGNAM_LEN : UNSIGNED_WORD; FIL_ALGNAM_STR : STRING(1 .. 6); FIL_XKEY : UNSIGNED_BYTE_ARRAY (1 .. 80); FIL_XIV : UNSIGNED_BYTE_ARRAY (1 .. 80); FIL_XALGNAM_LEN : UNSIGNED_WORD; FIL_XALGNAM_STR : STRING(1 .. 16); FIL_FILLER : INTEGER_8_ARRAY (1 .. 28); FIL_CHECKSUM : UNSIGNED_LONGWORD; end record; for ENCRYPT_FIL_RECORD_TYPE use record FIL_BUFLEN at 0 range 0 .. 15; FIL_FILEVER at 2 range 0 .. 7; FIL_FILEUPD at 3 range 0 .. 7; FIL_KEY at 4 range 0 .. 63; FIL_IV at 12 range 0 .. 63; FIL_ALGCODE at 20 range 0 .. 31; FIL_FLAGS at 24 range 0 .. 31; FIL_ATR_LEN at 28 range 0 .. 15; FIL_COMPRESS_MAX at 30 range 0 .. 15; FIL_ENCRYPT_MAX at 32 range 0 .. 15; FIL_DCXMAP_LEN at 34 range 0 .. 31; FIL_ALGNAM_LEN at 38 range 0 .. 15; FIL_ALGNAM_STR at 40 range 0 .. 47; FIL_XKEY at 46 range 0 .. 639; FIL_XIV at 126 range 0 .. 639; FIL_XALGNAM_LEN at 206 range 0 .. 15; FIL_XALGNAM_STR at 208 range 0 .. 127; FIL_FILLER at 224 range 0 .. 223; FIL_CHECKSUM at 252 range 0 .. 31; end record; for ENCRYPT_FIL_RECORD_TYPE'SIZE use 2048; ENCRYPT_FIL_RECORD_TYPE_INIT : constant ENCRYPT_FIL_RECORD_TYPE := (FIL_BUFLEN => 0, FIL_FILEVER => 0, FIL_FILEUPD => 0, FIL_KEY => (0, 0), FIL_IV => (0, 0), FIL_ALGCODE => 0, FIL_FLAGS => ENCRYPT_FIL_FLAGS_TYPE_INIT, FIL_ATR_LEN => 0, FIL_COMPRESS_MAX => 0, FIL_ENCRYPT_MAX => 0, FIL_DCXMAP_LEN => ENCRYPT_FIL_DCXMAP_LEN_TYPE_INIT, FIL_ALGNAM_LEN => 0, FIL_ALGNAM_STR => (others => ASCII.NUL), FIL_XKEY => (others => 0), FIL_XIV => (others => 0), FIL_XALGNAM_LEN => 0, FIL_XALGNAM_STR => (others => ASCII.NUL), FIL_FILLER => (others => 0), FIL_CHECKSUM => 0); -- -- Attribute record structure in encrypted data file. The encrypted file -- attributes are obtained from the input file fab and a chain of xab -- blocks. The fab attributes are copied into a smaller structure, FABATR, -- declared below and the xab attributes are copied in toto. -- -- FILATR_LENGTH length of file attributes -- FILATR_FILL_60 unused -- FILATR mask of whats present in attrib record -- FABATR fabatr present -- XABALL xaball present -- XABDAT xabdat present -- XABFHC xabfhc present -- XABPRO xabpro present -- PROACL xabpro access control list present -- XABSUM xabsum present -- UNASSIGNED unassigned bits -- ATR_FILLER filler to pad to 256 bytes ENCRYPT_M_FABATR : constant := 16#00000001#; ENCRYPT_M_XABALL : constant := 16#00000002#; ENCRYPT_M_XABDAT : constant := 16#00000004#; ENCRYPT_M_XABFHC : constant := 16#00000008#; ENCRYPT_M_XABPRO : constant := 16#00000010#; ENCRYPT_M_PROACL : constant := 16#00000020#; ENCRYPT_M_XABSUM : constant := 16#00000040#; ENCRYPT_M_UNASSIGNED : constant := 16#FFFFFF80#; type ENCRYPT_FILATR_TYPE is record FABATR : BOOLEAN; XABALL : BOOLEAN; XABDAT : BOOLEAN; XABFHC : BOOLEAN; XABPRO : BOOLEAN; PROACL : BOOLEAN; XABSUM : BOOLEAN; UNASSIGNED : UNSIGNED_25; end record; for ENCRYPT_FILATR_TYPE use record FABATR at 0 range 0 .. 0; XABALL at 0 range 1 .. 1; XABDAT at 0 range 2 .. 2; XABFHC at 0 range 3 .. 3; XABPRO at 0 range 4 .. 4; PROACL at 0 range 5 .. 5; XABSUM at 0 range 6 .. 6; UNASSIGNED at 0 range 7 .. 31; end record; for ENCRYPT_FILATR_TYPE'SIZE use 32; ENCRYPT_FILATR_TYPE_INIT : constant ENCRYPT_FILATR_TYPE := (FABATR => FALSE, XABALL => FALSE, XABDAT => FALSE, XABFHC => FALSE, XABPRO => FALSE, PROACL => FALSE, XABSUM => FALSE, UNASSIGNED => 0); type ENCRYPT_ATR_RECORD_TYPE is record FILATR_LENGTH : UNSIGNED_WORD; FILLER_1 : UNSIGNED_WORD; FILATR : ENCRYPT_FILATR_TYPE; ATR_FILLER : INTEGER_8_ARRAY (1 .. 248); end record; for ENCRYPT_ATR_RECORD_TYPE use record FILATR_LENGTH at 0 range 0 .. 15; FILLER_1 at 2 range 0 .. 15; FILATR at 4 range 0 .. 31; ATR_FILLER at 8 range 0 .. 1983; end record; for ENCRYPT_ATR_RECORD_TYPE'SIZE use 2048; ENCRYPT_ATR_RECORD_TYPE_INIT : constant ENCRYPT_ATR_RECORD_TYPE := (FILATR_LENGTH => 0, FILLER_1 => 0, FILATR => ENCRYPT_FILATR_TYPE_INIT, ATR_FILLER => (others => 0)); -- -- While other attributes are stored as whole xabs, attributes from the -- fab are copied to the xab-like structure FAB_ATTRIBUTES. -- -- COD structure code -- BLN structure length -- fill_50 spare -- fill_51 address of next structure -- ORG file organization -- RFM record format -- RAT record attributes -- FSZ vfc header size -- BKS bucket size -- RTV retrieval pointer count -- fill_52 spare -- MRS maximum record size -- GBC global buffer count -- MRN maximum record number -- FOP file operations type FABATR_FAB_ATTRIBUTES_TYPE is record FILLER_1 : UNSIGNED_BYTE; BLN : UNSIGNED_BYTE; FILLER_2 : UNSIGNED_WORD; FILLER_3 : UNSIGNED_LONGWORD; ORG : UNSIGNED_BYTE; RFM : UNSIGNED_BYTE; RAT : UNSIGNED_BYTE; FSZ : UNSIGNED_BYTE; BKS : UNSIGNED_BYTE; RTV : UNSIGNED_BYTE; FILLER_4 : UNSIGNED_BYTE_ARRAY (1 .. 2); MRS : UNSIGNED_WORD; GBC : UNSIGNED_WORD; MRN : UNSIGNED_LONGWORD; FOP : UNSIGNED_LONGWORD; end record; for FABATR_FAB_ATTRIBUTES_TYPE use record FILLER_1 at 0 range 0 .. 7; BLN at 1 range 0 .. 7; FILLER_2 at 2 range 0 .. 15; FILLER_3 at 4 range 0 .. 31; ORG at 8 range 0 .. 7; RFM at 9 range 0 .. 7; RAT at 10 range 0 .. 7; FSZ at 11 range 0 .. 7; BKS at 12 range 0 .. 7; RTV at 13 range 0 .. 7; FILLER_4 at 14 range 0 .. 15; MRS at 16 range 0 .. 15; GBC at 18 range 0 .. 15; MRN at 20 range 0 .. 31; FOP at 24 range 0 .. 31; end record; for FABATR_FAB_ATTRIBUTES_TYPE'SIZE use 224; FABATR_FAB_ATTRIBUTES_TYPE_INIT : constant FABATR_FAB_ATTRIBUTES_TYPE := (FILLER_1 => 0, BLN => 0, FILLER_2 => 0, FILLER_3 => 0, ORG => 0, RFM => 0, RAT => 0, FSZ => 0, BKS => 0, RTV => 0, FILLER_4 => (others => 0), MRS => 0, GBC => 0, MRN => 0, FOP => 0); -- EXCESS_DATA Holds data beyond plaintext EOF -- EXCESS_CRC CRC of file type ENCRYPT_EXCESS_DATA_TYPE is record EXCESS_CRC : UNSIGNED_WORD; FILLER_1 : STRING(1 .. 32); end record; for ENCRYPT_EXCESS_DATA_TYPE use record EXCESS_CRC at 0 range 0 .. 15; FILLER_1 at 2 range 0 .. 255; end record; for ENCRYPT_EXCESS_DATA_TYPE'SIZE use 272; ENCRYPT_EXCESS_DATA_TYPE_INIT : constant ENCRYPT_EXCESS_DATA_TYPE := (EXCESS_CRC => 0, FILLER_1 => (others => ASCII.NUL)); -- -- Feature block -- ENCRYPT_M_PRODUCT_VERSION_MIN : constant := 16#000000FF#; ENCRYPT_M_PRODUCT_VERSION_MAJ : constant := 16#0000FF00#; type ENCRYPT_PRODUCT_VERSION_TYPE is record PRODUCT_VERSION_MIN : UNSIGNED_8; PRODUCT_VERSION_MAJ : UNSIGNED_8; end record; for ENCRYPT_PRODUCT_VERSION_TYPE use record PRODUCT_VERSION_MIN at 0 range 0 .. 7; PRODUCT_VERSION_MAJ at 1 range 0 .. 7; end record; for ENCRYPT_PRODUCT_VERSION_TYPE'SIZE use 16; ENCRYPT_PRODUCT_VERSION_TYPE_INIT : constant ENCRYPT_PRODUCT_VERSION_TYPE := (PRODUCT_VERSION_MIN => 0, PRODUCT_VERSION_MAJ => 0); type ENCRYPT_FEATURE_TYPE is record FEATURE_CODE : UNSIGNED_LONGWORD; PRODUCT_VERSION : ENCRYPT_PRODUCT_VERSION_TYPE; FEATURE_LENGTH : UNSIGNED_WORD; FEATURE_VALUE : STRING(1 .. 0); end record; for ENCRYPT_FEATURE_TYPE use record FEATURE_CODE at 0 range 0 .. 31; PRODUCT_VERSION at 4 range 0 .. 15; FEATURE_LENGTH at 6 range 0 .. 15; FEATURE_VALUE at 8 range 0 .. -1; end record; for ENCRYPT_FEATURE_TYPE'SIZE use 64; ENCRYPT_FEATURE_TYPE_INIT : constant ENCRYPT_FEATURE_TYPE := (FEATURE_CODE => 0, PRODUCT_VERSION => ENCRYPT_PRODUCT_VERSION_TYPE_INIT, FEATURE_LENGTH => 0, FEATURE_VALUE => (others => ASCII.NUL)); ENCRYPT_M_FTR_REQUIRED : constant := 16#00000001#; ENCRYPT_M_FTR_COMMENT : constant := 16#00000002#; ENCRYPT_M_FTR_DEBUG : constant := 16#00000004#; ENCRYPT_M_FTR_SILENT : constant := 16#00000008#; type ENCRYPT_FEATURE_CODE_BITS_TYPE is record FTR_REQUIRED : BOOLEAN; FTR_COMMENT : BOOLEAN; FTR_DEBUG : BOOLEAN; FTR_SILENT : BOOLEAN; FTR_NUMBER : UNSIGNED_12; FILLER_1 : UNSIGNED_16; end record; for ENCRYPT_FEATURE_CODE_BITS_TYPE use record FTR_REQUIRED at 0 range 0 .. 0; FTR_COMMENT at 0 range 1 .. 1; FTR_DEBUG at 0 range 2 .. 2; FTR_SILENT at 0 range 3 .. 3; FTR_NUMBER at 0 range 4 .. 15; FILLER_1 at 2 range 0 .. 15; end record; for ENCRYPT_FEATURE_CODE_BITS_TYPE'SIZE use 32; ENCRYPT_FEATURE_CODE_BITS_TYPE_INIT : constant ENCRYPT_FEATURE_CODE_BITS_TYPE := (FTR_REQUIRED => FALSE, FTR_COMMENT => FALSE, FTR_DEBUG => FALSE, FTR_SILENT => FALSE, FTR_NUMBER => 0, FILLER_1 => 0); -- -- CRC checking feature block value definitions -- ENCRYPT_K_FEATURE_CRC : constant := 33; -- -- Semantic tag feature block value definitions -- ENCRYPT_K_FEATURE_SEMTAG : constant := 17; type ENCRYPT_FEATURE_SEMTAG_TYPE is record SEMTAG_LENGTH : UNSIGNED_WORD; SEMTAG_VALUE : STRING(1 .. 64); end record; for ENCRYPT_FEATURE_SEMTAG_TYPE use record SEMTAG_LENGTH at 0 range 0 .. 15; SEMTAG_VALUE at 2 range 0 .. 511; end record; for ENCRYPT_FEATURE_SEMTAG_TYPE'SIZE use 528; ENCRYPT_FEATURE_SEMTAG_TYPE_INIT : constant ENCRYPT_FEATURE_SEMTAG_TYPE := (SEMTAG_LENGTH => 0, SEMTAG_VALUE => (others => ASCII.NUL)); ENCRYPT_K_FEATURES_MAX_LEN : constant := 86; -- -- Define the encrypted file structure version of the current implementation -- -- Bumped FILE_VERSION for Encrypt-AES from 3 to 4 -- ENCRYPT_K_FILE_VERSION : constant := 4; -- -- Statistics record returned by encrypt$statistics() -- type ENCRYPT_STAT_RECORD_TYPE is record -- -- Format returned for statistics type code = 1 -- -- STAT_TOTAL_RECORDS statistics: total records -- STAT_TOTAL_BYTES statistics: total bytes through stream -- STAT_TOTAL_TIME statistics: total time in facility -- STAT_FILL_10 statistics: expansion STAT_TOTAL_RECORDS : UNSIGNED_LONGWORD; STAT_TOTAL_BYTES : UNSIGNED_QUADWORD; STAT_TOTAL_TIME : UNSIGNED_QUADWORD; FILLER_1 : UNSIGNED_QUADWORD; end record; for ENCRYPT_STAT_RECORD_TYPE use record STAT_TOTAL_RECORDS at 0 range 0 .. 31; STAT_TOTAL_BYTES at 4 range 0 .. 63; STAT_TOTAL_TIME at 12 range 0 .. 63; FILLER_1 at 20 range 0 .. 63; end record; for ENCRYPT_STAT_RECORD_TYPE'SIZE use 224; ENCRYPT_STAT_RECORD_TYPE_INIT : constant ENCRYPT_STAT_RECORD_TYPE := (STAT_TOTAL_RECORDS => 0, STAT_TOTAL_BYTES => (0, 0), STAT_TOTAL_TIME => (0, 0), FILLER_1 => 0); end ENCRYPT_STRUCTURES;