smg_comms_raw_types 1
smg_comms_raw_types 2
smg_comms_raw_types 3
smg_comms_raw_types 4
smg_comms_raw_types 5
smg_comms_raw_types 6
smg_comms_raw_types 7
smg_comms_raw_types 8 with Interfaces; use Interfaces;
smg_comms_raw_types 9 with Ada.Unchecked_Conversion;
smg_comms_raw_types 10
smg_comms_raw_types 11 package Raw_Types is
smg_comms_packing... 12
smg_comms_packing... 13 Pragma Pure(Raw_Types);
smg_comms_raw_types 14
smg_comms_packing... 15
smg_comms_packing... 16
smg_comms_packing... 17 type Octets is array( Natural range <> ) of Interfaces.Unsigned_8;
smg_comms_packing... 18
smg_comms_raw_types 19
smg_comms_rsa_oaep 20
smg_comms_rsa_oaep 21
smg_comms_rsa_oaep 22
smg_comms_rsa_oaep 23
smg_comms_rsa_oaep 24
smg_comms_rsa_oaep 25
smg_comms_rsa_oaep 26
smg_comms_rsa_oaep 27 RSA_KEY_OCTETS : constant Positive := 490;
smg_comms_packing... 28
smg_comms_packing... 29
smg_comms_packing... 30
smg_comms_packing... 31
smg_comms_packing... 32 OAEP_R_STR : constant String := "TMSR-RSA";
smg_comms_packing... 33
smg_comms_packing... 34 OAEP_RESERVED : constant Octets := (84,77,83,82,45,82,83,65);
smg_comms_packing... 35
smg_comms_packing... 36 OAEP_MAX_LEN : constant Natural := RSA_KEY_OCTETS / 2 -
smg_comms_packing... 37 OAEP_R_STR'Length - 3;
smg_comms_rsa_oaep 38
smg_comms_packing... 39
smg_comms_packing... 40 RSA_PKT_OCTETS : constant Positive := 1470;
smg_comms_packing... 41 RSA_MSG_OCTETS : constant Positive := RSA_PKT_OCTETS /
smg_comms_packing... 42 RSA_KEY_OCTETS *
smg_comms_packing... 43 OAEP_MAX_LEN;
smg_comms_packing... 44 RSA_MSG_BITS : constant Positive := RSA_MSG_OCTETS * 8;
smg_comms_rsa_oaep 45
smg_comms_raw_types 46
smg_comms_raw_types 47
smg_comms_packing... 48
smg_comms_packing... 49 SERPENT_OCTETS : constant Positive := 1472;
smg_comms_raw_types 50
smg_comms_raw_types 51
smg_comms_raw_types 52 subtype Octets_1 is Octets( 1 .. 1 );
smg_comms_raw_types 53 subtype Octets_2 is Octets( 1 .. 2 );
smg_comms_raw_types 54 subtype Octets_4 is Octets( 1 .. 4 );
smg_comms_raw_types 55 subtype Octets_8 is Octets( 1 .. 8 );
smg_comms_raw_types 56
smg_comms_rsa_oaep 57
smg_comms_rsa_oaep 58 subtype RSA_len is Octets ( 1 .. RSA_KEY_OCTETS);
smg_comms_rsa_oaep 59 subtype RSA_half is Octets( 1 .. RSA_KEY_OCTETS/2);
smg_comms_rsa_oaep 60
smg_comms_raw_types 61
smg_comms_raw_types 62 subtype RSA_Pkt is Octets( 1 .. RSA_PKT_OCTETS );
smg_comms_raw_types 63 subtype RSA_Msg is Octets( 1 .. RSA_MSG_OCTETS );
smg_comms_raw_types 64
smg_comms_raw_types 65
smg_comms_raw_types 66
smg_comms_packing... 67 subtype Serpent_Pkt is Octets( 1 .. SERPENT_OCTETS );
smg_comms_packing... 68 subtype Serpent_Msg is Octets( 1 .. SERPENT_OCTETS );
smg_comms_raw_types 69
smg_comms_raw_types 70
smg_comms_raw_types 71 function Cast is new Ada.Unchecked_Conversion( Integer_8 , Octets_1 );
smg_comms_raw_types 72 function Cast is new Ada.Unchecked_Conversion( Octets_1 , Integer_8 );
smg_comms_raw_types 73 function Cast is new Ada.Unchecked_Conversion( Unsigned_8 , Octets_1 );
smg_comms_raw_types 74 function Cast is new Ada.Unchecked_Conversion( Octets_1 , Unsigned_8 );
smg_comms_raw_types 75
smg_comms_raw_types 76 function Cast is new Ada.Unchecked_Conversion( Integer_16 , Octets_2 );
smg_comms_raw_types 77 function Cast is new Ada.Unchecked_Conversion( Octets_2 , Integer_16 );
smg_comms_raw_types 78 function Cast is new Ada.Unchecked_Conversion( Unsigned_16, Octets_2 );
smg_comms_raw_types 79 function Cast is new Ada.Unchecked_Conversion( Octets_2 , Unsigned_16 );
smg_comms_raw_types 80
smg_comms_raw_types 81 function Cast is new Ada.Unchecked_Conversion( Integer_32 , Octets_4 );
smg_comms_raw_types 82 function Cast is new Ada.Unchecked_Conversion( Octets_4 , Integer_32 );
smg_comms_raw_types 83 function Cast is new Ada.Unchecked_Conversion( Unsigned_32, Octets_4 );
smg_comms_raw_types 84 function Cast is new Ada.Unchecked_Conversion( Octets_4 , Unsigned_32 );
smg_comms_raw_types 85
smg_comms_raw_types 86
smg_comms_raw_types 87 function Cast is new Ada.Unchecked_Conversion( Float, Octets_4 );
smg_comms_raw_types 88 function Cast is new Ada.Unchecked_Conversion( Octets_4, Float );
smg_comms_raw_types 89
smg_comms_raw_types 90 function Cast is new Ada.Unchecked_Conversion( Integer_64, Octets_8 );
smg_comms_raw_types 91 function Cast is new Ada.Unchecked_Conversion( Octets_8, Integer_64 );
smg_comms_raw_types 92 function Cast is new Ada.Unchecked_Conversion( Unsigned_64, Octets_8 );
smg_comms_raw_types 93 function Cast is new Ada.Unchecked_Conversion( Octets_8, Unsigned_64 );
smg_comms_raw_types 94
smg_comms_raw_types 95 end Raw_Types;