Encryption Program Communications Protocol [ HP DeskManager Customization ] MPE/iX 5.0 Documentation
HP DeskManager Customization
Encryption Program Communications Protocol
The communications protocol used by HP Desk to transfer data between
itself and an encryption program is quite straightforward.
When a user invokes the ENCRYPT or DECRYPT command, HP Desk presents a
menu of the available encryption routines that are installed on the
system and requests that one is chosen. When the user has chosen a
routine, HP Desk copies the item to be encrypted or decrypted out to an
MPE file. This MPE file will be a 128 word fixed binary file, with a
file code of 0, and will contain data from the user's item, preceded by
some HP Desk header information.
HP Desk also creates a second MPE file and again this will be a 128 word
fixed binary file with a file code of 0. This file is used to pick up
the encrypted or decrypted data after processing.
HP Desk then invokes the selected encryptor program using the MPE
CREATEPROCESS intrinsic which emulates a user :RUN command with the
following parameters:
:RUN ENCRYPTR.GROUP.ACCT;PARM=n;INFO="sname tname encryption key"
Where:
PARM=n The value of n is 1 for a call to encrypt the file,
and 2 for a call to decrypt the file.
INFO string The maximum length of the INFO string passed by HP
Desk is 48 characters made up of two eight
character filenames and a 32 character encryption
string.
sname This is the name of the binary file to which HP
Desk has copied the item to be encrypted or
decrypted. The sname will be up to 8 characters in
length. The original file code and file
information is actually stored in the file to be
encrypted. The file to be encrypted has a time
stamp at the start of the first record, this means
that encryptors generate a different result each
time they encrypt a particular file.
tname The tname parameter is the name of the file HP Desk
will expect the encrypted or decrypted data to be
placed in. The tname will be up to 8 characters in
length. The filenames generated by HP Desk for
encryption and decryption purposes are normally of
the form P#######. The target file size will
always be the same as the original file, you cannot
increase the size of the data unless your encryptor
rebuilds the target file.
encryption key This is a string of up to 32 characters that
represents the encryption string to be used to
encrypt or decrypt the item.
There is not necessarily a space between the sname and the tname
filenames in the INFO string - this depends on the filenames generated by
HP Desk.
Thus the INFO string should always be interpreted as:
:RUN PROG;INFO="<--8b--><--8b--><-------------32b-------------->"
You should always copy the filenames passed in the INFO string to your
own array so that you can terminate the name correctly with a space or a
semi-colon (;).
The reason that HP Desk creates a permanent target file is simply to
ensure that no other process can inadvertently create a file with the
same name. It is likely that the encryption program will not be able to
use the file as it is. Therefore the program is at liberty to purge the
tname file created by HP Desk, but it must use the same name to hold the
program output for HP Desk to pick up.
MPE/iX 5.0 Documentation