- 1190FB877B7956B9B38F1D817858FE872F6E93B7E4FAC674BF3C82D664ACB11204FC88DE2563B33298A2A9AD547343CDF03F2CF068B3B1208DB0B1EE0B3C246C+ 32CD2279D2E7501F1C713A414424C1BB37D4C54FD279B14221ED6409431C47F469DCCFFE0B5ED303B1E3B2C77B2D7BB81E7902A4FACD4D96B8E28522A71BB69Fsmg_comms/src/messages.ads(21 . 7)(21 . 11)
324 -- exception raised when given message to read fails sanity checks
325 Invalid_Msg: exception;
326
327 ------------------------------------------------
328 ----------------------
329 -- Serpent Messages --
330 ----------------------
331
332 -------------------------Keys----------------------------------------
333 -- Writes a Serpent Keyset to the given Serpent Message
334 --
335 -- Keyset - the set of keys to write to message
(37 . 6)(41 . 61)
337 Counter : out Interfaces.Unsigned_16;
338 Keyset : out Serpent_Keyset);
339
340 ------------------------Keys Management------------------------------
341 -- Writes a Key Management structure to the given Serpent Message
342 --
343 -- KMgm - the keys management structure to write to message
344 -- Counter - the message count
345 procedure Write_KMgm_SMsg( KMgm : in Keys_Mgm;
346 Counter : in Interfaces.Unsigned_16;
347 Msg : out Raw_Types.Serpent_Msg);
348
349 -- Reads a Key management structure from the given Serpent Message
350 -- The opposite of Write_KMgm_SMsg above
351 -- Raises Invalid_Message exception if given message fails sanity checks
352 procedure Read_KMgm_SMsg( Msg : in Raw_Types.Serpent_Msg;
353 Counter : out Interfaces.Unsigned_16;
354 KMgm : out Keys_Mgm);
355
356
357
358 ------------------
359 -- RSA Messages --
360 ------------------
361
362 -------------------------Keys----------------------------------------
363 -- Writes a Serpent Keyset to the given RSA Message
364 --
365 -- Keyset - the set of keys to write to message
366 -- Counter - the message count
367 procedure Write_SKeys_RMsg( Keyset : in Serpent_Keyset;
368 Counter : in Interfaces.Unsigned_16;
369 Msg : out Raw_Types.RSA_Msg);
370
371 -- Reads a Serpent Keyset from the given RSA Message
372 -- The opposite of Write_SKeys_RMsg above
373 -- Raises Invalid_Message exception if given message fails sanity checks
374 procedure Read_SKeys_RMsg( Msg : in Raw_Types.RSA_Msg;
375 Counter : out Interfaces.Unsigned_16;
376 Keyset : out Serpent_Keyset);
377
378 ------------------------Keys Management------------------------------
379 -- Writes a Key Management structure to the given RSA Message
380 --
381 -- KMgm - the keys management structure to write to message
382 -- Counter - the message count
383 procedure Write_KMgm_RMsg( KMgm : in Keys_Mgm;
384 Counter : in Interfaces.Unsigned_16;
385 Msg : out Raw_Types.RSA_Msg);
386
387 -- Reads a Key management structure from the given RSA Message
388 -- The opposite of Write_KMgm_SMsg above
389 -- Raises Invalid_Message exception if given message fails sanity checks
390 procedure Read_KMgm_RMsg( Msg : in Raw_Types.RSA_Msg;
391 Counter : out Interfaces.Unsigned_16;
392 KMgm : out Keys_Mgm);
393
394
395 private
396
397 -- if native is little endian, does nothing;
(74 . 4)(133 . 35)
399 Move_A_Type : constant Interfaces.Unsigned_8 := 6;
400 Train_A_Type : constant Interfaces.Unsigned_8 := 7;
401
402 -- internal read/write of Serpent Keys
403 -- those are called by both interface methods for RSA and Serpent messages
404
405 -- NB: caller HAS TO provide ENOUGH space in Msg AND valid Type_ID
406 -- Msg will be padded with random octets until full length.
407 procedure Write_SKeys( Keyset : in Serpent_Keyset;
408 Counter : in Interfaces.Unsigned_16;
409 Type_ID : in Interfaces.Unsigned_8;
410 Msg : out Raw_Types.Octets);
411
412 -- NB: caller has to ensure that Msg is a valid RSA or Serpent message
413 procedure Read_SKeys( Msg : in Raw_Types.Octets;
414 Counter : out Interfaces.Unsigned_16;
415 Keyset : out Serpent_Keyset);
416
417
418 -- internal read/write of Key Management structures
419 -- those are called by both interface methods for RSA and Serpent messages
420
421 -- NB: caller HAS TO provide ENOUGH space in Msg AND valid Type_ID
422 -- Msg will be padded with random octets until full length.
423 procedure Write_KMgm( KMgm : in Keys_Mgm;
424 Counter : in Interfaces.Unsigned_16;
425 Type_ID : in Interfaces.Unsigned_8;
426 Msg : out Raw_Types.Octets);
427
428 -- NB: caller has to ensure that Msg is a valid RSA or Serpent message
429 procedure Read_KMgm( Msg : in Raw_Types.Octets;
430 Counter : out Interfaces.Unsigned_16;
431 KMgm : out Keys_Mgm);
432
433 end Messages;