/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Key server protocol definition
* Copyright (C) 1990, 1991 Sun Microsystems, Inc.
*
* The keyserver is a public key storage/encryption/decryption service
* The encryption method used is based on the Diffie-Hellman exponential
* key exchange technology.
*
* The key server is local to each machine, akin to the portmapper.
* Under TI-RPC, communication with the keyserver is through the
* loopback transport.
*
* NOTE: This .x file generates the USER level headers for the keyserver.
* the KERNEL level headers are created by hand as they kernel has special
* requirements.
*/
%#pragma ident "%Z%%M% %I% %E% SMI"
%
%/* Copyright (c) 1990, 1991 Sun Microsystems, Inc. */
%
%/*
% * Compiled from key_prot.x using rpcgen.
% * DO NOT EDIT THIS FILE!
% * This is NOT source code!
% */
/*
* PROOT and MODULUS define the way the Diffie-Hellman key is generated.
*
* MODULUS should be chosen as a prime of the form: MODULUS == 2*p + 1,
* where p is also prime.
*
* PROOT satisfies the following two conditions:
* (1) (PROOT ** 2) % MODULUS != 1
* (2) (PROOT ** p) % MODULUS != 1
*
*/
const PROOT = 3;
const HEXMODULUS = "d4a0ba0250b6fd2ec626e7efd637df76c716e22d0944b88b";
/*
* The first 16 hex digits of the encrypted secret key are used as
* a checksum in the database.
*/
const KEYCHECKSUMSIZE = 16;
/*
* status of operation
*/
enum keystatus {
KEY_SUCCESS, /* no problems */
KEY_NOSECRET, /* no secret key stored */
KEY_UNKNOWN, /* unknown netname */
KEY_SYSTEMERR, /* system error (out of memory, encryption failure) */
KEY_BADALG, /* unknown algorithm type */
KEY_BADLEN /* unsupported keysize */
};
/*
* algorithm type & key size
*/
typedef int keylen_t;
typedef int algtype_t;
struct mechtype {
};
/*
* number of keys for KEY_GEN_3 to return
*/
typedef int keynum_t;
/*
* Result of KEY_GEN_3
*/
typedef des_block deskeyarray<>;
/*
* Argument to ENCRYPT or DECRYPT
*/
struct cryptkeyarg {
};
/*
* Argument to ENCRYPT_PK or DECRYPT_PK
*/
struct cryptkeyarg2 {
};
/*
* Argument to ENCRYPT_3, ENCRYPT_PK_3, DECRYPT_3, DECRYPT_PK_3
*/
struct cryptkeyarg3 {
};
/*
* Result of ENCRYPT, DECRYPT, ENCRYPT_PK, DECRYPT_PK, KEY_GET_CONV
*/
case KEY_SUCCESS:
default:
void;
};
/*
* Result of ENCRYPT_3, DECRYPT_3, ENCRYPT_PK_3, DECRYPT_PK_3, KEY_GET_CONV_3
*/
case KEY_SUCCESS:
default:
void;
};
/*
* Unix credential
*/
struct unixcred {
};
/*
* Unix credential, without arbitrary limit
*/
struct unixcred3 {
};
/*
* Result returned from GETCRED
*/
case KEY_SUCCESS:
default:
void;
};
/*
* Result returned from GETCRED_3
*/
case KEY_SUCCESS:
default:
void;
};
/*
* key_netstarg;
*/
struct key_netstarg {
};
struct key_netstarg3 {
};
case KEY_SUCCESS:
default:
void;
};
case KEY_SUCCESS:
default:
void;
};
/*
* Argument to KEY_GET_CONV_3
*/
struct deskeyarg3 {
int nkeys;
};
/*
* Argument to KEY_SET_3
*/
struct setkeyarg3 {
};
#ifdef RPC_HDR
%
%#ifndef opaque
%#define opaque char
%#endif
%
#endif
/*
* This is my secret key.
* Store it for me.
*/
/*
* I want to talk to X.
* Encrypt a conversation key for me.
*/
/*
* X just sent me a message.
* Decrypt the conversation key for me.
*/
/*
* Generate a secure conversation key for me
*/
KEY_GEN(void) = 4;
/*
* Get me the uid, gid and group-access-list associated
* with this netname (for kernel which cannot use NIS)
*/
} = 1;
/*
* #######
* Procedures 1-5 are identical to version 1
* #######
*/
/*
* This is my secret key.
* Store it for me.
*/
/*
* I want to talk to X.
* Encrypt a conversation key for me.
*/
/*
* X just sent me a message.
* Decrypt the conversation key for me.
*/
/*
* Generate a secure conversation key for me
*/
KEY_GEN(void) = 4;
/*
* Get me the uid, gid and group-access-list associated
* with this netname (for kernel which cannot use NIS)
*/
/*
* I want to talk to X. and I know X's public key
* Encrypt a conversation key for me.
*/
/*
* X just sent me a message. and I know X's public key
* Decrypt the conversation key for me.
*/
/*
* Store my public key, netname and private key.
*/
/*
* Retrieve my public key, netname and private key.
*/
KEY_NET_GET(void) = 9;
/*
* Return me the conversation (common) key that is constructed
* from my secret key and this publickey.
*/
} = 2;
/*
* #######
* Procedures 1-10 are identical to versions 1 & 2
* #######
*/
/*
* This is my secret key.
* Store it for me.
*/
/*
* I want to talk to X.
* Encrypt a conversation key for me.
*/
/*
* X just sent me a message.
* Decrypt the conversation key for me.
*/
/*
* Generate a secure conversation key for me
*/
KEY_GEN(void) = 4;
/*
* Get me the uid, gid and group-access-list associated
* with this netname (for kernel which cannot use NIS)
*/
/*
* I want to talk to X. and I know X's public key
* Encrypt a conversation key for me.
*/
/*
* X just sent me a message. and I know X's public key
* Decrypt the conversation key for me.
*/
/*
* Store my public key, netname and private key.
*/
/*
* Retrieve my public key, netname and private key.
*/
KEY_NET_GET(void) = 9;
/*
* Return me the conversation (common) key that is constructed
* from my secret key and this publickey.
*/
/*
* #######
* Procedures new in version 3 follow...
* #######
*/
/*
* This is my secret key.
* Store it for me.
*/
/*
* I want to talk to X.
* Encrypt a conversation key for me.
*/
/*
* X just sent me a message.
* Decrypt the conversation key for me.
*/
/*
* Generate secure conversation key(s) for me
*/
/*
* Get me the uid, gid and group-access-list associated
* with this netname (for kernel which cannot use NIS)
*/
/*
* I want to talk to X. and I know X's public key
* Encrypt a conversation key for me.
*/
/*
* X just sent me a message. and I know X's public key
* Decrypt the conversation key for me.
*/
/*
* Store my public key, netname and private key.
*/
/*
* Retrieve my public key, netname and private key.
*/
/*
* Return me the conversation (common) key that is constructed
* from my secret key and this publickey.
*/
/*
*/
KEY_CLEAR_3(void) = 21;
} = 3;
} = 100029;