!************************************************************************* !* * !* HP CONFIDENTIAL. This software is confidential proprietary software * !* licensed by Hewlett-Packard Development Company, L.P., and is not * !* authorized to be used, duplicated OR disclosed to anyone without the * !* prior written permission of HP. * !* © 2021 Copyright Hewlett-Packard Development Company, L.P. * !* * !* VMS SOFTWARE, INC. CONFIDENTIAL. This software is confidential * !* proprietary software licensed by VMS Software, Inc., and is not * !* authorized to be used, duplicated or disclosed to anyone without * !* the prior written permission of VMS Software, Inc. * !* © 2021 Copyright VMS Software, Inc. * !* * !************************************************************************* !******************************************************************************************************************************** ! Created: 9-Mar-2021 22:27:20 by OpenVMS SDL EV3-3 ! Source: 13-JAN-2012 16:21:42 $1$DGA8085:[ENCRYPT.SRC]ENCRYPT_DEF.SDL;1 !******************************************************************************************************************************** ! *** PREDECLARED TYPES %IF %DECLARED(%BASIC$QUADWORD_DECLARED) = 0 %THEN RECORD BASIC$QUADWORD LONG FILL(2) END RECORD %LET %BASIC$QUADWORD_DECLARED = 1 %END %IF %IF %DECLARED(%BASIC$OCTAWORD_DECLARED) = 0 %THEN RECORD BASIC$OCTAWORD LONG FILL(4) END RECORD %LET %BASIC$OCTAWORD_DECLARED = 1 %END %IF %IF %DECLARED(%BASIC$HFLOAT_AXP_DECLARED) = 0 %THEN RECORD BASIC$HFLOAT_AXP LONG FILL(4) END RECORD %LET %BASIC$HFLOAT_AXP_DECLARED = 1 %END %IF %IF %DECLARED(%BASIC$F_FLOATING_COMPLEX_DECL) = 0 %THEN RECORD BASIC$F_FLOATING_COMPLEX SINGLE REAL_PART SINGLE IMAGINARY_PART END RECORD %LET %BASIC$F_FLOATING_COMPLEX_DECL = 1 %END %IF %IF %DECLARED(%BASIC$D_FLOATING_COMPLEX_DECL) = 0 %THEN RECORD BASIC$D_FLOATING_COMPLEX DOUBLE REAL_PART DOUBLE IMAGINARY_PART END RECORD %LET %BASIC$D_FLOATING_COMPLEX_DECL = 1 %END %IF %IF %DECLARED(%BASIC$G_FLOATING_COMPLEX_DECL) = 0 %THEN RECORD BASIC$G_FLOATING_COMPLEX GFLOAT REAL_PART GFLOAT IMAGINARY_PART END RECORD %LET %BASIC$G_FLOATING_COMPLEX_DECL = 1 %END %IF %IF %DECLARED(%BASIC$H_FLOAT_AXP_CMPLX_DCL) = 0 %THEN RECORD BASIC$H_FLOATING_COMPLEX_AXP BASIC$HFLOAT_AXP REAL_PART BASIC$HFLOAT_AXP IMAGINARY_PART END RECORD %LET %BASIC$H_FLOAT_AXP_CMPLX_DCL = 1 %END %IF !*** MODULE encrypt_def IDENT V01.10 *** ! ! Initialize context for encrypt/decrypt operations ! Accepts following arguments ! context : type - longword integer signed; access - write only; mechanism - by reference ! algorithm : type - char_string; access - read/write; mechanism - by descriptor ! key-type : type - longword logical unsigned; access - read only; mechanism - by reference ! key-name : type - char_string; access - read only; mechanism - by descriptor ! [ p1 ] : type - quadword[1] (DES), quadword[2] (AES); access - read only; mechanism - by reference ! EXTERNAL LONG FUNCTION encrypt$init & ( & LONG BY REF, & STRING BY DESC, & LONG BY REF, & STRING BY DESC, & OPTIONAL LONG BY REF & ) ! ! Perform encryption of next record of plaintext ! Accepts following arguments ! context : type - longword integer signed; access - write only; mechanism - by reference ! input : type - char_string; access - read only; mechanism - by descriptor ! output : type - char_string; access - write only; mechanism - by descriptor ! [output-length] : type - word integer; access - write only; mechanism - by reference ! [p1] : type - quadword[1] (DES), quadword[2] (AES); access - read only; mechanism - by reference ! EXTERNAL LONG FUNCTION encrypt$encrypt & ( & LONG BY REF, & STRING BY DESC, & STRING BY DESC, & OPTIONAL LONG BY REF, & LONG BY REF & ) ! ! Perform decryption of next record of plaintext ! Accepts following arguments ! context : type - longword integer signed; access - write only; mechanism - by reference ! input : type - char_string; access - read only; mechanism - by descriptor ! output : type - char_string; access - write only; mechanism - by descriptor ! [output-length] : type - word integer; access - write only; mechanism - by reference ! [p1] : type - quadword[1] (DES), quadword[2] (AES); access - read only; mechanism - by reference ! EXTERNAL LONG FUNCTION encrypt$decrypt & ( & LONG BY REF, & STRING BY DESC, & STRING BY DESC, & OPTIONAL LONG BY REF, & LONG BY REF & ) ! ! Disassociates the encryption context and releases it ! Accepts following arguments ! context : type - longword integer signed; access - read/write; mechanism - by reference ! EXTERNAL LONG FUNCTION encrypt$fini & ( & LONG BY REF, & OPTIONAL LONG BY REF & ) ! ! Gains access to the statistics maintained by the Encryption software ! Accepts following arguments ! context : type - longword; access - read only; mechanism - by reference ! code : type - longword; access - read only; mechanism - by reference ! destination : type - char_string; access - write only; mechanism - by descriptor ! return-length : type - longword; access - write only; mechanism - by reference ! EXTERNAL LONG FUNCTION encrypt$statistics & ( & LONG BY REF, & LONG BY REF, & STRING BY DESC, & LONG BY REF & ) ! ! Places a key definition into the process, group, job, or system key storage table ! Accepts following arguments ! key-name : type - char_string; access - read only; mechanism - by descriptor ! key-value : type - char_string; access - read only; mechanism - by descriptor ! key-flags : type - longword; access - read only; mechanism - by reference ! EXTERNAL LONG FUNCTION encrypt$define_key & ( & STRING BY DESC, & STRING BY DESC, & LONG BY REF, & OPTIONAL LONG BY REF & ) ! ! Deletes a key definition from a key storage table ! Accepts following arguments ! key-name : type - char_string; access - read only; mechanism - by descriptor ! key-flags : type - longword; access - read only; mechanism - by reference ! EXTERNAL LONG FUNCTION encrypt$delete_key & ( & STRING BY DESC, & LONG BY REF & ) ! ! Encrypts or decrypts data files ! Accepts following arguments ! input-file : type - char_string; access - read only; mechanism - by descriptor ! output-file : type - char_string; access - read only; mechanism - by descriptor ! key-name : type - char_string; access - read only; mechanism - by descriptor ! algorithm : type - char_string; access - read only; mechanism - by descriptor ! file-flags : type - longword; access - read only; mechanism - by reference ! [item-list] : type - item_list_3; access - read only; mechanism - by descriptor ! EXTERNAL LONG FUNCTION encrypt$encrypt_file & ( & STRING BY DESC, & STRING BY DESC, & STRING BY DESC, & STRING BY DESC, & LONG BY REF, & OPTIONAL LONG BY REF & ) ! ! Encrypts a small amount of data in an encrypt stream ! Accepts following arguments ! input : type - char_string; access - read only; mechanism - by descriptor ! output : type - char_string; access - write only; mechanism - by descriptor ! key-name : type - char_string; access - read only; mechanism - by descriptor ! algorithm : type - char_string; access - read only; mechanism - by descriptor ! EXTERNAL LONG FUNCTION encrypt$encrypt_one_record & ( & STRING BY DESC, & STRING BY DESC, & STRING BY DESC, & STRING BY DESC & ) ! ! Decrypts a small amount of data on a decrypt stream ! Accepts following arguments ! input : type - char_string; access - read only; mechanism - by descriptor ! output : type - char_string; access - write only; mechanism - by descriptor ! key-name : type - char_string; access - read only; mechanism - by descriptor ! algorithm : type - char_string; access - read only; mechanism - by descriptor ! EXTERNAL LONG FUNCTION encrypt$decrypt_one_record & ( & STRING BY DESC, & STRING BY DESC, & STRING BY DESC, & STRING BY DESC & ) ! ! Generates a random key value ! Accepts following arguments ! algorithm-name : type - char_string; access - read only; mechanism - by descriptor ! key-length : type - word unsigned; access - read only; mechanism - by reference ! [factor-a] : type - char_string; access - read only; mechanism - by descriptor ! [factor-b] : type - char_string; access - read only; mechanism - by descriptor ! [factor-c] : type - char_string; access - read only; mechanism - by descriptor ! [key-buffer] : type - char_string; access - write; mechanism - by descriptor ! EXTERNAL LONG FUNCTION encrypt$generate_key & ( & STRING BY DESC, & LONG BY REF, & STRING BY DESC, & STRING BY DESC, & STRING BY DESC, & STRING BY DESC & ) ! ! Unsupported calls ! EXTERNAL LONG FUNCTION encrypt$init_asyn & ( & LONG BY REF, & LONG BY REF, & LONG BY REF, & LONG BY REF, & BASIC$QUADWORD BY REF, & LONG BY REF & ) EXTERNAL LONG FUNCTION encrypt$encrypt_asyn & ( & LONG BY REF, & LONG BY REF, & STRING BY DESC, & STRING BY DESC, & LONG BY REF, & LONG BY REF, & BASIC$QUADWORD BY REF, & LONG BY REF & ) EXTERNAL LONG FUNCTION encrypt$decrypt_asyn & ( & LONG BY REF, & LONG BY REF, & STRING BY DESC, & STRING BY DESC, & LONG BY REF, & LONG BY REF, & BASIC$QUADWORD BY REF, & LONG BY REF & ) EXTERNAL LONG FUNCTION encrypt$fini_asyn & ( & LONG BY REF, & LONG BY REF, & LONG BY REF, & LONG BY REF, & BASIC$QUADWORD BY REF, & LONG BY REF & ) EXTERNAL LONG FUNCTION encrypt$sync_asyn & ( & LONG BY REF, & LONG BY REF, & BASIC$QUADWORD BY REF & )