<> <> <> <> DIRECTORY DESFace USING [ Key ], RPC USING [ matchAllVersions, ShortROPE, VersionRange ], RPCPkt USING [ Machine ]; Agent: DEFINITIONS = { <> <> <> Authentication: TYPE = LONG POINTER TO AuthenticationRecord; <> <<{KX}KA, spare, { {CK}KA, spare, nonce, B }KX .>> <> <> -- Intended to be returned along with an authenticator, also encrypted under KX (!) -- AuthenticationRecord: TYPE = MACHINE DEPENDENT RECORD [ kx: DESFace.Key, kxSpare: DESFace.Key, ck: DESFace.Key, ckSpare: DESFace.Key, nonceId: LONG INTEGER, <> b: CARDINAL, -- length bText: PACKED SEQUENCE maxLength: CARDINAL OF CHAR ]; Authenticator: TYPE = LONG POINTER TO AuthenticatorLayout; <> <> <<{KY}KB, spare, { {CK}KB, spare, time, A }KY .>> <> -- The rest is encrypted with CBC-check using a zero IV -- AuthenticatorLayout: TYPE = MACHINE DEPENDENT RECORD[ ky: DESFace.Key, kySpare: DESFace.Key, -- space for larger keys! -- ck: DESFace.Key, ckSpare: DESFace.Key, -- space for larger keys! -- time: LONG CARDINAL, -- String body for a -- a: CARDINAL, -- length aText: PACKED SEQUENCE maxLength: CARDINAL OF CHAR ]; Principal: TYPE = RPC.ShortROPE; <> Authenticate: PROC [nonceId: LONG INTEGER, a, b: Principal ] RETURNS [ an: Frob -- an encrypted authentication record--, ar: Frob -- an encrypted authenticator record-- ]; -- Length fields in authentication records will be encrypted! -- Frob: TYPE = REF FrobRecord; FrobLength: TYPE = [0..64); -- Prevents Frob-containing packets from getting too large -- FrobRecord: TYPE = RECORD [ s: SEQUENCE length: FrobLength OF WORD ]; <> <> Vitae: PROC[ clientMachine: RPCPkt.Machine, -- Lark or other machine with GV database entry range: RPC.VersionRange_RPC.matchAllVersions, -- acceptable versions interfaceType: RPC.ShortROPE] -- e.g., LarkSmarts.Lark RETURNS [ serverMachine: RPCPkt.Machine, -- e.g., 3#333# in binary form, used by C RPC to bind clientRname: Principal, -- client machine's own RName (e.g., Swinehart.pa.lark) clientInstance: RPC.ShortROPE, -- e.g., "Skylark" or "173#100#" serverInstance: RPC.ShortROPE -- e.g., "Morley.Lark", corr. to "LarkSmarts.Lark", NIL if none <> ]; }.