receive packet; if (packet.pvno != 5) then either process using other protocol spec or error_out(KRB_AP_ERR_BADVERSION); endif if (packet.msg-type != KRB_SAFE) then error_out(KRB_AP_ERR_MSG_TYPE); endif if (packet.checksum.cksumtype is not both collision-proof and keyed) then error_out(KRB_AP_ERR_INAPP_CKSUM); endif if (safe_priv_common_checks_ok(packet)) then set computed_checksum := checksum(packet.body); if (computed_checksum != packet.checksum) then error_out(KRB_AP_ERR_MODIFIED); endif return (packet, PACKET_IS_GENUINE); else return common_checks_error; endif