# Encryption

Encryption functionality is available in OptiStruct input files to encrypt confidential information. It is possible to encrypt a full line or only certain fields in a line.

Currently, material, property and some table Bulk Data Entries are supported (see Supported Entries).

## Encryption Key

A typical encryption key is shown below. The first line contains the label ‘/ENCRYPT/’ and a unique encryption ID following it. The subsequent 5 lines are the encryption key required to decrypt the encrypted lines.

The encryption key(s) could be placed in either Case Control section or Bulk Data section, but it (they) must be placed before the corresponding encrypted lines. Up to 100 different encryption keys are allowed (including those in the include files).

Example Encryption key with ID ZB001:
/ENCRYPT/ZB001
1GcxRn2nMRIp575cxxQrdIBaZYBB6oPGNhPJh4lAZOH9HdVivEeMVIGEJWJM5T0q6O3zzUH3KyJRJ5OOjx6ojdd9OjHT4C63ko2I
%ZB001MGoRMaLooUWUaHxbHHbErfqmYfVVMh9h2TgKcZvYw13940WzdJv0cS2KuK77XBDGBvyMtNikHbfwlaasrGdSkKAZZrEdrP
%ZB001gbGGRgQ0GQMCYNi4HIdcbTbCFWcJDnCH7UfhSwwjZTammusHl9juHaAT5pxPeNVdkwv9OqH44OTmv5XeiD1uaSxTNH2u8i
%ZB001P0av0XqspIeqUWja5CVLjvismTRhTLOPOmTJyK3FPyeh77evhjFZxmANrKrdXpoML6xTMkK8emlwoN9vYumaBvqRLsg8zs
%ZB001H80ZXXnnhZ6cViaSBly3G4xhptIpGKWYjyXThW7R1ERUrmBjxBq7mpKX5hno4LdLitUvMUjOlSFJYy507eyyakjnKtzvU7

## Encryption Process

Encryption can be applied to full lines of numeric data or partial lines by choosing a few fields in a line. Specific entries (and the corresponding data on such entries, like MAT1), should be identified and such entries can be listed in an ASCII file. The encryption tool included with the Solvers package can then be used to encrypt the lines listed in the ASCII file. The encryption tool is included in the following locations in the Solvers installation:
• Windows:

$ALTAIR_HOME\hwsolvers\optistruct\bin\win64\os_encrypt_win.exe • Linux:$ALTAIR_HOME/hwsolvers/optistruct/bin/linux64/os_encrypt_linux

The following example illustrates the process of encrypting some material data in an OptiStruct input file.

Example:

In the non-encrypted OptiStruct input file (input_file.fem), if you have the following MAT1 entry:
MAT1    120     1.E6          0.0     3.57      1.0e-4
35.E3   35.E3   23.E3
Specify the following lines to encrypt all fields except for the MAT1 entry name and ID, then, in an ASCII file original.txt:
                 1.E6         0.0     3.57       1.0e-4
35.E3    35.E3  23.E3

The MAT1 entry name and ID have been removed, as shown above.

Next, the encrypted lines for the values/fields listed in the original.txt file could be obtained by running the encryption tool as follows:

On Windows, the os_encrypt_win.exe encryption tool can be used to encrypt lines, using the following example command:
os_encrypt_win.exe original.txt encrypted.txt
On Linux, the os_encrypt_linux encryption tool can be used to encrypt lines, using the following example command:
os_encrypt_linux original.txt encrypted.txt
After the encryption tool runs, the file encrypted.txt, will contain both the encryption key and the encrypted lines, as the following example data.
/ENCRYPT/SA001
8C6E0qxlqRSurzdzpaFk93kzJLuCxSAYseqRhFPBFaG1SoOJRDDyynNiaZjSEUHjRBqStVSYhQRM5ry8M0kJ1rJIvDO3k8w5SDXL
%SA001MGoRMaLooUWUaHxbHHbp7O3cswgTiO9703TesSogWarRCwQe5p9MfSXRsaWT357uMSIWQAJCJOk2c52pyVLF5mXFLIhBmu
%SA001gbGGRgQ0GQMCYNi4HIdIoVBlaqZl3n58MMkJ0779RKgMC84EVxFYcsxsLNe3SZhZDlXbDvAoOTqA4sHt7k1zDCcYYF96hr
%SA001P0av0XqspIeqUWja5CV1wxIR7nO9JLHGdeYvWVEfHpkHXLqsRXlDI4xm7sYHL10IovZvBpDsyr8KxAtAxRmfofOIIcZ6Kn
%SA001H80ZXXnnhZ6cViaSBlymF2Pj1cig3W04EcOn11EaAUV2FyLefxKj555uJDSQqVnF9g4L9Xa63VaffjnDU9w1BSMqTp451E
%SA001CJeM8FK1xQacReDR8E9G5w8BpP1vdbQAEAxSP4fjRVsR6vapexJOzhxqumnfUK6CtDJdkfDRig4EgHO88eVh0fdBk2uunT
%SA001iKC2I3czrRgT6NH18PAmc1t6YoiNWRY1oXKgFH5Q6hfkr6fvqbW9o6MQVtvLqqQoThoECm3LCAjusU9Zj3CMZFJiwxtTMD
Note: The encryption key ID for this example is the keyword SA001 following /ENCRYPT/.

Following this encryption key ID, the first five lines correspond to the encryption key that will be used by OptiStruct to decrypt the encrypted data. The remaining lines (in this case, there are 2 lines after the encryption key), correspond to the encrypted form of the lines that were initially input in the original.txt file.

The encrypted fields in the original input_file.fem file should be replaced by %% for partially encrypted lines. For fully encrypted lines, the entire original lines should be removed and replaced with the encrypted form of the lines.
Note: The encryption key should be in the same input_file.fem file and should be placed above the corresponding lines which are being encrypted.
/ENCRYPT/SA001
8C6E0qxlqRSurzdzpaFk93kzJLuCxSAYseqRhFPBFaG1SoOJRDDyynNiaZjSEUHjRBqStVSYhQRM5ry8M0kJ1rJIvDO3k8w5SDXL
%SA001MGoRMaLooUWUaHxbHHbp7O3cswgTiO9703TesSogWarRCwQe5p9MfSXRsaWT357uMSIWQAJCJOk2c52pyVLF5mXFLIhBmu
%SA001gbGGRgQ0GQMCYNi4HIdIoVBlaqZl3n58MMkJ0779RKgMC84EVxFYcsxsLNe3SZhZDlXbDvAoOTqA4sHt7k1zDCcYYF96hr
%SA001P0av0XqspIeqUWja5CV1wxIR7nO9JLHGdeYvWVEfHpkHXLqsRXlDI4xm7sYHL10IovZvBpDsyr8KxAtAxRmfofOIIcZ6Kn
%SA001H80ZXXnnhZ6cViaSBlymF2Pj1cig3W04EcOn11EaAUV2FyLefxKj555uJDSQqVnF9g4L9Xa63VaffjnDU9w1BSMqTp451E
MAT1      120          %%                     %%          %%        %%
%SA001CJeM8FK1xQacReDR8E9G5w8BpP1vdbQAEAxSP4fjRVsR6vapexJOzhxqumnfUK6CtDJdkfDRig4EgHO88eVh0fdBk2uunT
%SA001iKC2I3czrRgT6NH18PAmc1t6YoiNWRY1oXKgFH5Q6hfkr6fvqbW9o6MQVtvLqqQoThoECm3LCAjusU9Zj3CMZFJiwxtTMD

In Encryption Key, (/ENCRYPT/SA001, and the first 5 lines) are placed above the actual lines to be encrypted. Additionally, all the encrypted fields in partially encrypted initial line of MAT1 entry are replaced with %%, and the continuation line of the MAT1 entry is completely removed. The first line beginning with %SA001 after the MAT1 entry above contains the encrypted data for the fields marked with %%, and the second line beginning with %SA001 contains the encrypted data for the continuation line.

Note:
• Only numerical fields are currently supported for encryption. Encrypting character data is not currently supported.
• Characters, entry names, identification numbers (IDs), and special signs cannot be encrypted. Only partial line encryption can be used in such cases, where these fields should not be identified for encryption using the encryption tool.
• Fixed short, fixed long and free format are all supported. A partially encrypted line in long format with two half lines must be followed by two encrypted half lines.
• If multiple lines/entries to be encrypted, are run through the encryption tool separately, then multiple encryption keys and encrypted line combinations, corresponding to each line/entry are received. However, the encryption key IDs will be the same. If such lines/entries are to be used in the same model, then the encryption key IDs should be manually changed to make sure that all encryption key IDs, used in the same model, are different.
For instance, if both the following encrypted lines, MAT1 ID 120 and MAT1 ID 220, below are to be used in the same model, then the encryption key for the second encrypted material (MAT1 ID 220) should be changed manually to a different ID (from SA001 to SA002), as:
/ENCRYPT/SA001
8C6E0qxlqRSurzdzpaFk93kzJLuCxSAYseqRhFPBFaG1SoOJRDDyynNiaZjSEUHjRBqStVSYhQRM5ry8M0kJ1rJIvDO3k8w5SDXL
%SA001MGoRMaLooUWUaHxbHHbp7O3cswgTiO9703TesSogWarRCwQe5p9MfSXRsaWT357uMSIWQAJCJOk2c52pyVLF5mXFLIhBmu
%SA001gbGGRgQ0GQMCYNi4HIdIoVBlaqZl3n58MMkJ0779RKgMC84EVxFYcsxsLNe3SZhZDlXbDvAoOTqA4sHt7k1zDCcYYF96hr
%SA001P0av0XqspIeqUWja5CV1wxIR7nO9JLHGdeYvWVEfHpkHXLqsRXlDI4xm7sYHL10IovZvBpDsyr8KxAtAxRmfofOIIcZ6Kn
%SA001H80ZXXnnhZ6cViaSBlymF2Pj1cig3W04EcOn11EaAUV2FyLefxKj555uJDSQqVnF9g4L9Xa63VaffjnDU9w1BSMqTp451E
MAT1    120     %%              %%      %%      %%
%SA001CJeM8FK1xQacReDR8E9G5w8BpP1vdbQAEAxSP4fjRVsR6vapexJOzhxqumnfUK6CtDJdkfDRig4EgHO88eVh0fdBk2uunT
/ENCRYPT/SA002
1GcxRn2nMRIp575cxxQrdIBaZYBB6oPGNhPJh4lAZOH9HdVivEeMVIGEJWJM5T0q6O3zzUH3KyJRJ5OOjx6ojdd9OjHT4C63ko2I
%SA002MGoRMaLooUWUaHxbHHbErfqmYfVVMh9h2TgKcZvYw13940WzdJv0cS2KuK77XBDGBvyMtNikHbfwlaasrGdSkKAZZrEdrP
%SA002gbGGRgQ0GQMCYNi4HIdcbTbCFWcJDnCH7UfhSwwjZTammusHl9juHaAT5pxPeNVdkwv9OqH44OTmv5XeiD1uaSxTNH2u8i
%SA002P0av0XqspIeqUWja5CVLjvismTRhTLOPOmTJyK3FPyeh77evhjFZxmANrKrdXpoML6xTMkK8emlwoN9vYumaBvqRLsg8zs
%SA002H80ZXXnnhZ6cViaSBly3G4xhptIpGKWYjyXThW7R1ERUrmBjxBq7mpKX5hno4LdLitUvMUjOlSFJYy507eyyakjnKtzvU7
MAT1    220     %%              %%      %%      %%
%SA002CJeM8FK1xQacReDR8E9G5w8BpP1vdbQAEAxSP4fjRVsR6vapexJOzhxqumnfUK6CtDJdkfDRig4EgHO88eVh0fdBk2uunT
• Encryption keys and encrypted lines could be placed in include files. GZIP format is also supported.
• Entries with encrypted data will not be printed by ECHO and ECHOON commands.
• Error/Warning messages related to material/property is protected by replacing real numbers with *****.
• Parameter (size) optimization using encrypted material/property is not supported.

## Supported Entries

The following entries are currently supported for encryption:
• Properties:

PBAR, PBARL, PBEAM, PBEAML, PBUSH, PCOMP, PDAMP, PELAS, PDUM1, PGAP, PHFSHL, PROD, PSHEAR, PSHELL, PSOLID, PVISC, PWELD, PMASS, PCOMPG, PTUBE, PAABSF, PACABS, PACBAR, PCOMPP, PFAT, PCONT, PAXI, PSEAM, PWELD, PLY, PBEAMX, PSOLIDX, PBARX, PCONTX, PSHELLX, PBUSHT, PELAST, PGASK, PGAPHT, PCONTHT, PLSOLID, PCNTX2, PCNTX7, PCNTX11, PCNTX20, PCNTX24, PCOMPLS, PJOINTG, PCOHE, PPLANE

• Materials:

MAT1, MAT2, MAT4, MAT5, MAT8, MAT9, MAT10, MATHF, MATT1, MATT2, MATT4, MATT5, MATT8, MATT9, MDUM1, MATFAT, MATEP, MATTEP, MATF, MATG, MATTG, MATHE, MATTHE, MATHP, BLKHDF, MATTORT, MATS1, MATTVE, MATVE, MATVORT, MATVP, MAT3, MATT3, MATHED, MATX0, MATX02, MATX13, MATX21, MATX25, MATX27, MATX33, MATX36, MATX42, MATX43, MATX44, MATX58, MATX60, MATX62, MATX65, MATX68, MATX70, MATX82, MGASK, MCOHE, MCOHED, DMGINI, DMGEVO

• Tables

TABLES1, TABLEST, TABLEG, TABLEMD, TABLEM1, TABLEM2, TABLEM3, TABLEM4