Print this page
first pass
*** 58,68 ****
static char hexval();
int passwd2des(char *, char *);
static int weak_DES_key(des_block);
- /* EXPORT DELETE START */
/*
* For export control reasons, we want to limit the maximum size of
* data that can be encrypted or decrypted. We limit this to 1024
* bits of key data, which amounts to 128 bytes.
*
--- 58,67 ----
*** 71,81 ****
* being used by the new 1024bit keys plus 16 bytes MD5 checksum.
* We discussed this with Sun's export control office and lawyers
* and we have reason to believe this is ok for export.
*/
#define MAX_KEY_CRYPT_LEN 144
- /* EXPORT DELETE END */
/*
* Encrypt a secret key given passwd
* The secret key is passed and returned in hex notation.
* Its length must be a multiple of 16 hex digits (64 bits).
--- 70,79 ----
*** 83,93 ****
int
xencrypt(secret, passwd)
char *secret;
char *passwd;
{
- /* EXPORT DELETE START */
char key[8];
char ivec[8];
char *buf;
int err;
int len;
--- 81,90 ----
*** 106,121 ****
return (0);
}
(void) bin2hex(len, (unsigned char *) buf, secret);
free(buf);
return (1);
- #if 0
- /* EXPORT DELETE END */
- return (0);
- /* EXPORT DELETE START */
- #endif
- /* EXPORT DELETE END */
}
/*
* Decrypt secret key using passwd
* The secret key is passed and returned in hex notation.
--- 103,112 ----
*** 124,134 ****
int
xdecrypt(secret, passwd)
char *secret;
char *passwd;
{
- /* EXPORT DELETE START */
char key[8];
char ivec[8];
char *buf;
int err;
int len;
--- 115,124 ----
*** 148,163 ****
return (0);
}
(void) bin2hex(len, (unsigned char *) buf, secret);
free(buf);
return (1);
- #if 0
- /* EXPORT DELETE END */
- return (0);
- /* EXPORT DELETE START */
- #endif
- /* EXPORT DELETE END */
}
/*
* Turn password into DES key
*/
--- 138,147 ----
*** 262,272 ****
const char *passwd, /* in */
const char netname[], /* in */
char **encrypted_secret, /* out */
bool_t do_chksum) /* in */
{
- /* EXPORT DELETE START */
des_block key;
char ivec[8];
char *binkeybuf;
int err;
const int classic_des = keylen == 192 && algtype == 0;
--- 246,255 ----
*** 340,355 ****
}
(void) bin2hex(binkeybytes, (unsigned char *) binkeybuf, hexkeybuf);
free(binkeybuf);
*encrypted_secret = hexkeybuf;
return (1);
- #if 0
- /* EXPORT DELETE END */
- return (0);
- /* EXPORT DELETE START */
- #endif
- /* EXPORT DELETE END */
}
/*
* Generic key len and alg type for version of xdecrypt.
*
--- 323,332 ----
*** 373,383 ****
int algtype, /* in */
const char *passwd, /* in */
const char netname[], /* in */
bool_t do_chksum) /* in */
{
- /* EXPORT DELETE START */
des_block key;
char ivec[8];
char *buf;
int err;
int len;
--- 350,359 ----
*** 441,456 ****
}
secret[hexkeybytes] = '\0';
return (1);
- #if 0
- /* EXPORT DELETE END */
- return (0);
- /* EXPORT DELETE START */
- #endif
- /* EXPORT DELETE END */
}
/*
* Modified version of passwd2des(). passwd2des_g() uses the Kerberos
--- 417,426 ----