|
|
1.1 ! root 1: -- $Header: Authentication2.cr,v 2.2 86/06/05 08:37:06 jqj Exp $ -- ! 2: ! 3: -- $Log: Authentication2.cr,v $ ! 4: -- Revision 2.2 86/06/05 08:37:06 jqj ! 5: -- updated it to actual Authentication V 2 instead of subset ! 6: -- (compiler has been fixed to support everything) ! 7: -- ! 8: -- Revision 2.0 85/11/21 07:24:00 jqj ! 9: -- 4.3BSD standard release, still a small subset ! 10: -- ! 11: -- initial version was: ! 12: -- a subset of Authentication, hopefully big enough for some testing ! 13: -- ! 14: ! 15: Authentication: PROGRAM 14 VERSION 2 = ! 16: ! 17: BEGIN ! 18: DEPENDS UPON Time(15) VERSION 2; ! 19: ! 20: -- faked dependency: should be DEPENDS UPON Clearinghouse(2) VERSION 2; -- ! 21: ! 22: Organization: TYPE = STRING; ! 23: Domain: TYPE = STRING; ! 24: Object: TYPE = STRING; ! 25: ! 26: ThreePartName: TYPE = RECORD [ ! 27: organization: Organization, ! 28: domain: Domain, ! 29: object: Object ! 30: ]; ! 31: ! 32: Clearinghouse_Name: TYPE = ThreePartName; ! 33: ! 34: ! 35: -- TYPES -- ! 36: ! 37: -- Types supporting encoding -- ! 38: ! 39: Key: TYPE = ARRAY 4 OF UNSPECIFIED; -- lsb of each octet is odd parity bit -- ! 40: ! 41: Block: TYPE = ARRAY 4 OF UNSPECIFIED; -- cipher text or plain text block -- ! 42: ! 43: HashedPassword: TYPE = CARDINAL; ! 44: ! 45: -- Types describing credentials and verifiers -- ! 46: ! 47: CredentialsType: TYPE = {simple(0), strong(1)}; ! 48: ! 49: simpleCredentials: CredentialsType = simple; ! 50: ! 51: Credentials: TYPE = RECORD [type: CredentialsType, ! 52: value: SEQUENCE OF UNSPECIFIED]; ! 53: ! 54: CredentialsPackage: TYPE = RECORD [ ! 55: credentials: Credentials, ! 56: nonce: LONG CARDINAL, ! 57: recipient: Clearinghouse_Name, ! 58: conversationKey: Key ]; ! 59: ! 60: -- instances of the following type must be a multiple of 64 bits, padded -- ! 61: -- with zeros, before encryption -- ! 62: ! 63: StrongCredentials: TYPE = RECORD [ ! 64: conversationKey: Key, ! 65: expirationTime: Time.Time, ! 66: initiator: Clearinghouse_Name ]; ! 67: ! 68: SimpleCredentials: TYPE = Clearinghouse_Name; ! 69: ! 70: Verifier: TYPE = SEQUENCE 12 OF UNSPECIFIED; ! 71: ! 72: StrongVerifier: TYPE = RECORD [ ! 73: timeStamp: Time.Time, ! 74: ticks: LONG CARDINAL ]; ! 75: ! 76: SimpleVerifier: TYPE = HashedPassword; ! 77: ! 78: ! 79: -- ERRORS -- ! 80: ! 81: Problem: TYPE = { ! 82: credentialsInvalid(0), ! 83: verifierInvalid(1), ! 84: verifierExpired(2), ! 85: verifierReused(3), ! 86: credentialsExpired(4), ! 87: inappropriateCredentials(5) }; ! 88: AuthenticationError: ERROR[problem: Problem] = 2; ! 89: ! 90: CallProblem: TYPE = { ! 91: tooBusy(0), ! 92: accessRightsInsufficient(1), ! 93: keysUnavailable(2), ! 94: strongKeyDoesNotExist(3), ! 95: simpleKeyDoesNotExist(4), ! 96: strongKeyAlreadyRegistered(5), ! 97: simpleKeyAlreadyRegistered(6), ! 98: domainForNewKeyUnavailable(7), ! 99: domainForNewKeyUnknown(8), ! 100: badKey(9), ! 101: badName(10), ! 102: databaseFull(11), ! 103: other(12) }; ! 104: Which: TYPE = {notApplicable(0), initiator(1), recipient(2), client(3) }; ! 105: CallError: ERROR [problem: CallProblem, whichArg: Which] = 1; ! 106: ! 107: ! 108: -- PROCEDURES -- ! 109: ! 110: -- Strong Authentication -- ! 111: ! 112: GetStrongCredentials: PROCEDURE [ ! 113: initiator, recipient: Clearinghouse_Name, ! 114: nonce: LONG CARDINAL ] ! 115: RETURNS [ credentialsPackage: SEQUENCE OF UNSPECIFIED ] ! 116: REPORTS [ CallError ] = 1; ! 117: ! 118: CreateStrongKey: PROCEDURE [ ! 119: credentials: Credentials, verifier: Verifier, ! 120: name: Clearinghouse_Name, key: Key ] ! 121: REPORTS [ AuthenticationError, CallError ] = 3; ! 122: ! 123: ChangeStrongKey: PROCEDURE [ ! 124: credentials: Credentials, verifier: Verifier, ! 125: newKey: Block ] ! 126: REPORTS [ AuthenticationError, CallError ] = 4; ! 127: ! 128: DeleteStrongKey: PROCEDURE [ ! 129: credentials: Credentials, verifier: Verifier, ! 130: name: Clearinghouse_Name ] ! 131: REPORTS [ AuthenticationError, CallError ] = 5; ! 132: ! 133: ! 134: -- Simple Authentication -- ! 135: ! 136: CheckSimpleCredentials: PROCEDURE [ ! 137: credentials: Credentials, verifier: Verifier ] ! 138: RETURNS[ok: BOOLEAN] ! 139: REPORTS[AuthenticationError, CallError] = 2; ! 140: ! 141: CreateSimpleKey: PROCEDURE [ ! 142: credentials: Credentials, verifier: Verifier, ! 143: name: Clearinghouse_Name, key: HashedPassword ] ! 144: REPORTS[AuthenticationError, CallError] = 6; ! 145: ! 146: ChangeSimpleKey: PROCEDURE [ ! 147: credentials: Credentials, verifier: Verifier, ! 148: newKey: HashedPassword ] ! 149: REPORTS[AuthenticationError, CallError] = 7; ! 150: ! 151: DeleteSimpleKey: PROCEDURE [ ! 152: credentials: Credentials, verifier: Verifier, ! 153: name: Clearinghouse_Name ] ! 154: REPORTS[AuthenticationError, CallError] = 8; ! 155: ! 156: ! 157: END.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.