(9 . 13)(9 . 14)
128 with Ada.Unchecked_Conversion;
129
130 package Raw_Types is
131 -- no side effects or internal state
132 Pragma Pure(Raw_Types);
133
134 -- constants from SMG.COMMS standard specification
135 -- size of a serpent-encrypted packet and message, in octets
136 -- note that this corresponds to 1472/16 = 92 Serpent blocks
137 -- NB: lengths are the same but the distinction makes the code clearer
138 SERPENT_PKT_OCTETS : constant Positive := 1472;
139 SERPENT_MSG_OCTETS : constant Positive := SERPENT_PKT_OCTETS;
140 -- NB: lengths are the same!
141 SERPENT_OCTETS : constant Positive := 1472;
142
143 -- size of a RSA-encrypted packet and message in octets and bits
144 RSA_PKT_OCTETS : constant Positive := 1470;
(38 . 8)(39 . 8)
146
147 -- Serpent packets and contained raw messages
148 -- NB: length is the same but the distinction makes the code clearer
149 subtype Serpent_Pkt is Octets( 1 .. SERPENT_PKT_OCTETS );
150 subtype Serpent_Msg is Octets( 1 .. SERPENT_MSG_OCTETS );
151 subtype Serpent_Pkt is Octets( 1 .. SERPENT_OCTETS );
152 subtype Serpent_Msg is Octets( 1 .. SERPENT_OCTETS );
153
154 -- blind, unchecked casts ( memcpy style )
155 function Cast is new Ada.Unchecked_Conversion( Integer_8 , Octets_1 );