(5 . 21)(5 . 33)
145
146 with Raw_Types;
147 with Serpent;
148 with RSA_OAEP;
149
150 package Packing is
151 -- no side effects or internal state
152 Pragma Pure(Packing);
153 -- no side effects or internal state BUT it depends on non-pure:
154 -- rsa_oaep because it uses rng (exceptions and sequential_io)
155
156 -- Packing a Serpent message into Serpent package, using the given key
157 -- Packing a Serpent message into Serpent packet, using the given key
158 function Pack( Msg : in Raw_Types.Serpent_Msg;
159 K : in Serpent.Key )
160 return Raw_Types.Serpent_Pkt;
161 K : in Serpent.Key )
162 return Raw_Types.Serpent_Pkt;
163
164 -- Unpacking a Serpent packet into contained message, using the given key
165 function Unpack( Pkt : in Raw_Types.Serpent_Pkt;
166 K : in Serpent.Key)
167 K : in Serpent.Key)
168 return Raw_Types.Serpent_Msg;
169
170 -- Packing a RSA message into RSA packet, using the given key
171 function Pack( Msg : in Raw_Types.RSA_Msg;
172 K : in RSA_OAEP.RSA_pkey)
173 return Raw_Types.RSA_Pkt;
174
175 -- Unpacking a RSA packet into contained message, using the given key
176 function Unpack( Pkt : in Raw_Types.RSA_Pkt;
177 K : in RSA_OAEP.RSA_skey;
178 Success : out Boolean)
179 return Raw_Types.RSA_Msg;
180
181 -- internals of this package, NOT for outside use
182 private
183 -- length of 1 Serpent block