BSD 4_4_Lite1 development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Mon, 5 Jan 1987 01:36:00 +0000 (17:36 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Mon, 5 Jan 1987 01:36:00 +0000 (17:36 -0800)
Work on file usr/src/contrib/xns/courierlib/Authentication1.cr
Work on file usr/src/contrib/xns/examples/filing/Authentication1.cr
Work on file usr/src/contrib/xns/courierlib/Authentication2.cr

Synthesized-from: CSRG/cd2/4.4BSD-Lite1

usr/src/contrib/xns/courierlib/Authentication1.cr [new file with mode: 0644]
usr/src/contrib/xns/courierlib/Authentication2.cr [new file with mode: 0644]
usr/src/contrib/xns/examples/filing/Authentication1.cr [new file with mode: 0644]

diff --git a/usr/src/contrib/xns/courierlib/Authentication1.cr b/usr/src/contrib/xns/courierlib/Authentication1.cr
new file mode 100644 (file)
index 0000000..7324ef5
--- /dev/null
@@ -0,0 +1,82 @@
+-- $Header: Authentication1.cr,v 2.2 86/06/05 08:46:56 jqj Exp $ --
+
+Authentication: PROGRAM 14 VERSION 1 =
+
+-- $Log:       Authentication1.cr,v $
+-- Revision 2.2  86/06/05  08:46:56  jqj
+-- Added more values for AuthenticationError, since Clearinghouse (which
+-- DEPENDS UPON this version) might need to report inappropriateCredentials.
+-- 
+-- Revision 2.1  85/12/17  07:52:44  jqj
+-- cleaned up some comments
+-- 
+-- Revision 2.0  85/11/21  07:24:26  jqj
+-- 4.3BSD standard release
+-- 
+-- Revision 1.4  85/03/11  16:43:49  jqj
+-- *** empty log message ***
+-- 
+-- Revision 1.3  85/03/11  16:43:49  jqj
+-- Public alpha-test version, released 11 March 1985
+-- 
+-- Revision 1.2  85/03/01  06:12:50  jqj
+-- modifications for use with Unix Courier compiler:  eliminated dependency
+--   on Clearinghouse.  Added HashedPassword declaration which had been
+--   mysteriously forgotten.
+-- 
+-- Revision 1.1  85/03/01  06:06:51  jqj
+-- Initial revision - from Rochester
+-- 
+
+BEGIN
+
+-- faked dependency for Clearinghouse (2) VERSION 2 --
+-- note that the dependency has been deleted to eliminate circularity --
+
+       -- DEPENDS UPON
+       --      Clearinghouse (2) VERSION 2;
+
+ClearinghouseOrganization: TYPE = STRING;
+ClearinghouseDomain: TYPE = STRING;
+ClearinghouseObject: TYPE = STRING;
+
+ClearinghouseThreePartName: TYPE = RECORD [
+    organization: ClearinghouseOrganization,
+    domain: ClearinghouseDomain,
+    object: ClearinghouseObject
+    ];
+
+ClearinghouseName:  TYPE = ClearinghouseThreePartName;
+
+-- Types --
+
+CredentialsType: TYPE = CARDINAL;
+
+Credentials: TYPE = RECORD[
+       type: CredentialsType, 
+       value: SEQUENCE OF UNSPECIFIED];
+
+simpleCredentials: CredentialsType = 0;
+
+SimpleCredentials: TYPE = ClearinghouseName;
+
+Verifier: TYPE = SEQUENCE 12 OF UNSPECIFIED;
+
+HashedPassword: TYPE = CARDINAL;
+
+SimpleVerifier: TYPE = HashedPassword;
+
+-- remote errors --
+
+Which: TYPE = {notApplicable(0), initiator(1), recipient(2), client(3)};
+CallProblem: TYPE = CARDINAL;
+CallError: ERROR [problem: CallProblem, whichArg: Which] = 1;
+
+Problem: TYPE = {credentialsInvalid(0), verifierInvalid(1),
+       verifierExpired(2), verifierReused(3), credentialsExpired(4),
+       inappropriateCredentials(5)
+       };
+AuthenticationError: ERROR [problem: Problem] = 2;
+
+END.
+
diff --git a/usr/src/contrib/xns/courierlib/Authentication2.cr b/usr/src/contrib/xns/courierlib/Authentication2.cr
new file mode 100644 (file)
index 0000000..cb74201
--- /dev/null
@@ -0,0 +1,157 @@
+-- $Header: Authentication2.cr,v 2.2 86/06/05 08:37:06 jqj Exp $ --
+
+-- $Log:       Authentication2.cr,v $
+-- Revision 2.2  86/06/05  08:37:06  jqj
+-- updated it to actual Authentication V 2 instead of subset
+-- (compiler has been fixed to support everything)
+-- 
+-- Revision 2.0  85/11/21  07:24:00  jqj
+-- 4.3BSD standard release, still a small subset
+-- 
+-- initial version was:
+-- a subset of Authentication, hopefully big enough for some testing
+--
+
+Authentication: PROGRAM 14 VERSION 2 =
+
+BEGIN
+    DEPENDS UPON Time(15) VERSION 2;
+
+-- faked dependency: should be DEPENDS UPON Clearinghouse(2) VERSION 2; --
+
+Organization: TYPE = STRING;
+Domain: TYPE = STRING;
+Object: TYPE = STRING;
+
+ThreePartName: TYPE = RECORD [
+    organization: Organization,
+    domain: Domain,
+    object: Object
+    ];
+
+Clearinghouse_Name:  TYPE = ThreePartName;
+
+
+-- TYPES --
+
+-- Types supporting encoding --
+
+Key: TYPE = ARRAY 4 OF UNSPECIFIED;  -- lsb of each octet is odd parity bit --
+
+Block: TYPE = ARRAY 4 OF UNSPECIFIED;  -- cipher text or plain text block --
+
+HashedPassword: TYPE = CARDINAL;
+
+-- Types describing credentials and verifiers --
+
+CredentialsType: TYPE = {simple(0), strong(1)};
+
+simpleCredentials: CredentialsType = simple;
+
+Credentials: TYPE = RECORD [type: CredentialsType,
+                           value: SEQUENCE OF UNSPECIFIED];
+
+CredentialsPackage: TYPE = RECORD [
+       credentials: Credentials,
+       nonce: LONG CARDINAL,
+       recipient: Clearinghouse_Name,
+       conversationKey: Key ];
+
+-- instances of the following type must be a multiple of 64 bits, padded --
+-- with zeros, before encryption --
+
+StrongCredentials: TYPE = RECORD [
+       conversationKey: Key,
+       expirationTime: Time.Time,
+       initiator: Clearinghouse_Name ];
+
+SimpleCredentials: TYPE = Clearinghouse_Name;
+
+Verifier: TYPE = SEQUENCE 12 OF UNSPECIFIED;
+
+StrongVerifier: TYPE = RECORD [
+       timeStamp: Time.Time,
+       ticks: LONG CARDINAL ];
+
+SimpleVerifier: TYPE = HashedPassword;
+
+
+-- ERRORS --
+
+Problem: TYPE = {
+    credentialsInvalid(0),
+    verifierInvalid(1),
+    verifierExpired(2),
+    verifierReused(3),
+    credentialsExpired(4),
+    inappropriateCredentials(5) };
+AuthenticationError: ERROR[problem: Problem] = 2;
+
+CallProblem: TYPE = {
+    tooBusy(0),
+    accessRightsInsufficient(1),
+    keysUnavailable(2),
+    strongKeyDoesNotExist(3),
+    simpleKeyDoesNotExist(4),
+    strongKeyAlreadyRegistered(5),
+    simpleKeyAlreadyRegistered(6),
+    domainForNewKeyUnavailable(7),
+    domainForNewKeyUnknown(8),
+    badKey(9),
+    badName(10),
+    databaseFull(11),
+    other(12) };
+Which: TYPE = {notApplicable(0), initiator(1), recipient(2), client(3) };
+CallError: ERROR [problem: CallProblem, whichArg: Which] = 1;
+
+
+-- PROCEDURES --
+
+-- Strong Authentication --
+
+GetStrongCredentials: PROCEDURE [
+               initiator, recipient: Clearinghouse_Name,
+               nonce: LONG CARDINAL ]
+       RETURNS [ credentialsPackage: SEQUENCE OF UNSPECIFIED ]
+       REPORTS [ CallError ] = 1;
+
+CreateStrongKey: PROCEDURE [
+               credentials: Credentials, verifier: Verifier,
+               name: Clearinghouse_Name, key: Key ]
+       REPORTS [ AuthenticationError, CallError ] = 3;
+
+ChangeStrongKey: PROCEDURE [
+               credentials: Credentials, verifier: Verifier,
+               newKey: Block ]
+       REPORTS [ AuthenticationError, CallError ] = 4;
+
+DeleteStrongKey: PROCEDURE [
+               credentials: Credentials, verifier: Verifier,
+               name: Clearinghouse_Name ]
+       REPORTS [ AuthenticationError, CallError ] = 5;
+
+
+-- Simple Authentication -- 
+
+CheckSimpleCredentials: PROCEDURE [
+               credentials: Credentials, verifier: Verifier ]
+       RETURNS[ok: BOOLEAN]
+       REPORTS[AuthenticationError, CallError] = 2;
+
+CreateSimpleKey: PROCEDURE [
+               credentials: Credentials, verifier: Verifier,
+               name: Clearinghouse_Name, key: HashedPassword ]
+       REPORTS[AuthenticationError, CallError] = 6;
+
+ChangeSimpleKey: PROCEDURE [
+               credentials: Credentials, verifier: Verifier,
+               newKey: HashedPassword ]
+       REPORTS[AuthenticationError, CallError] = 7;
+
+DeleteSimpleKey: PROCEDURE [
+               credentials: Credentials, verifier: Verifier,
+               name: Clearinghouse_Name ]
+       REPORTS[AuthenticationError, CallError] = 8;
+
+
+END.
diff --git a/usr/src/contrib/xns/examples/filing/Authentication1.cr b/usr/src/contrib/xns/examples/filing/Authentication1.cr
new file mode 100644 (file)
index 0000000..7324ef5
--- /dev/null
@@ -0,0 +1,82 @@
+-- $Header: Authentication1.cr,v 2.2 86/06/05 08:46:56 jqj Exp $ --
+
+Authentication: PROGRAM 14 VERSION 1 =
+
+-- $Log:       Authentication1.cr,v $
+-- Revision 2.2  86/06/05  08:46:56  jqj
+-- Added more values for AuthenticationError, since Clearinghouse (which
+-- DEPENDS UPON this version) might need to report inappropriateCredentials.
+-- 
+-- Revision 2.1  85/12/17  07:52:44  jqj
+-- cleaned up some comments
+-- 
+-- Revision 2.0  85/11/21  07:24:26  jqj
+-- 4.3BSD standard release
+-- 
+-- Revision 1.4  85/03/11  16:43:49  jqj
+-- *** empty log message ***
+-- 
+-- Revision 1.3  85/03/11  16:43:49  jqj
+-- Public alpha-test version, released 11 March 1985
+-- 
+-- Revision 1.2  85/03/01  06:12:50  jqj
+-- modifications for use with Unix Courier compiler:  eliminated dependency
+--   on Clearinghouse.  Added HashedPassword declaration which had been
+--   mysteriously forgotten.
+-- 
+-- Revision 1.1  85/03/01  06:06:51  jqj
+-- Initial revision - from Rochester
+-- 
+
+BEGIN
+
+-- faked dependency for Clearinghouse (2) VERSION 2 --
+-- note that the dependency has been deleted to eliminate circularity --
+
+       -- DEPENDS UPON
+       --      Clearinghouse (2) VERSION 2;
+
+ClearinghouseOrganization: TYPE = STRING;
+ClearinghouseDomain: TYPE = STRING;
+ClearinghouseObject: TYPE = STRING;
+
+ClearinghouseThreePartName: TYPE = RECORD [
+    organization: ClearinghouseOrganization,
+    domain: ClearinghouseDomain,
+    object: ClearinghouseObject
+    ];
+
+ClearinghouseName:  TYPE = ClearinghouseThreePartName;
+
+-- Types --
+
+CredentialsType: TYPE = CARDINAL;
+
+Credentials: TYPE = RECORD[
+       type: CredentialsType, 
+       value: SEQUENCE OF UNSPECIFIED];
+
+simpleCredentials: CredentialsType = 0;
+
+SimpleCredentials: TYPE = ClearinghouseName;
+
+Verifier: TYPE = SEQUENCE 12 OF UNSPECIFIED;
+
+HashedPassword: TYPE = CARDINAL;
+
+SimpleVerifier: TYPE = HashedPassword;
+
+-- remote errors --
+
+Which: TYPE = {notApplicable(0), initiator(1), recipient(2), client(3)};
+CallProblem: TYPE = CARDINAL;
+CallError: ERROR [problem: CallProblem, whichArg: Which] = 1;
+
+Problem: TYPE = {credentialsInvalid(0), verifierInvalid(1),
+       verifierExpired(2), verifierReused(3), credentialsExpired(4),
+       inappropriateCredentials(5)
+       };
+AuthenticationError: ERROR [problem: Problem] = 2;
+
+END.
+