EncryptionKeys.mesa
Last Edited by: Feigenbaum, May 31, 1984 5:05:31 pm PDT
Last Edited by: Greene, June 27, 1984 4:22:55 pm PDT
DIRECTORY
BigCardinals USING[BigCARD],
Rope USING[ROPE];
EncryptionKeys: CEDAR DEFINITIONS =
BEGIN
KeyFail: ERROR [subclass: ATOM ← $Unspecified];
The subclass is one of $CannotOpenPublic, $CannotOpenPrivate, $PublicKeyNotFound, $CannotCopy, as explained below.
CreateKey: PROC[];
Generates a public key, private key pair by calling RSA.KeyGenerate. Converts both to
decimal ropes and stores the private key in ///Keys/UserName.PrivateKey, the public key in
/indigo/cryptography/UserName.PublicKey, where UserName is the login name without the
.pa or similar extension. Raises KeyFail if it 1) cannot open a local file named
///Keys/UserName.PrivateKey, or 2) cannot open a local file named ///Temp/UserName.PublicKey, or 3) cannot copy ///Temp/UserName.Publickey to /indigo/cryptography/UserName.PublicKey, with subclass $CannotOpenPrivate, $CannotOpenPublic, or $CannotCopy, respectively.
GetPrivateKey: PROC[] RETURNS[PrivateKey: BigCardinals.BigCARD];
--retrieves the user's private key from ///Keys/UserName.PrivateKey. Raises KeyFail with subclass
--$CannotOpenPrivate if there's a problem.
GetPublicKey: PROC[sender: Rope.ROPE, authenticate: BOOLEAN ← FALSE] RETURNS[PublicKey: BigCardinals.BigCARD];
--retrieves the user's public key from ///Indigo/Cryptography/UserName.PublicKey. Raises KeyFail
--with subclass $PublicKeyNotFound if there's a problem.
ToLowerCase: PROC[in: Rope.ROPE] RETURNS[out: Rope.ROPE];
END.