collect user data in buffer; /* assemble packet: */ packet.pvno := protocol version; /* 5 */ packet.msg-type := message type; /* KRB_PRIV */ packet.enc-part.etype := encryption type; body.user-data := buffer; if (using timestamp) then get system_time; body.timestamp, body.usec := system_time; endif if (using sequence numbers) then body.seq-number := sequence number; endif body.s-address := sender host addresses; if (only one recipient) then body.r-address := recipient host address; endif encode body into OCTET STRING; select encryption type; encrypt OCTET STRING into packet.enc-part.cipher;