raw
smg_comms_rsa_oaep      1  -- S.MG, 2018
smg_comms_rsa_oaep 2
smg_comms_80cols 3 with Raw_Types;
smg_comms_80cols 4 with RSA_OAEP;
smg_comms_rsa_oaep 5
smg_comms_rsa_oaep 6 package Test_RSA_OAEP is
smg_comms_rsa_oaep 7 procedure test_char_array;
smg_comms_rsa_oaep 8 procedure test_oaep; -- test oaep only
smg_comms_rsa_oaep 9 procedure test_rsa; -- test rsa only
smg_comms_rsa_oaep 10 procedure test_rsa_oaep; -- test rsa+oaep
smg_comms_rsa_oaep 11
smg_comms_rsa_oaep 12 procedure Hex2Octets( Hex: in String; O: out Raw_Types.Octets );
smg_comms_rsa_oaep 13 procedure PrintOctets( O: in Raw_Types.Octets; Title: in String );
smg_comms_80cols 14 -- reads a full private key from specified file, in Hex format
smg_comms_80cols 15 -- one component per line, in order: n, e, d, p, q, u
smg_comms_80cols 16 -- NB: length of each component has to match *precisely* the expected length
smg_comms_80cols 17 -- specifically, using Raw_Types:
smg_comms_80cols 18 -- n, d are RSA_len'Length*2;
smg_comms_80cols 19 -- e, p, q, u are RSA_half'Length*2
smg_comms_80cols 20 procedure ReadRSAKey( Filename: in String; Key: out RSA_OAEP.RSA_skey );
smg_comms_rsa_oaep 21 end Test_RSA_OAEP;