Print this page
3882 remove xmod & friends
@@ -40,11 +40,10 @@
#include <stdlib.h>
#include <thread.h>
#include <pthread.h>
#include <sys/types.h>
-/* EXPORT DELETE START */
/*
* This program implements the
* Proposed Federal Information Processing
* Data Encryption Standard.
* See Federal Register, March 17, 1975 (40FR12134)
@@ -152,17 +151,13 @@
* Set up the key schedule from the key.
*/
static mutex_t lock = DEFAULTMUTEX;
-/* EXPORT DELETE END */
-
-
static void
des_setkey_nolock(const char *key)
{
-/* EXPORT DELETE START */
int i, j, k;
char t;
/*
* First, generate C and D by permuting
@@ -202,24 +197,20 @@
}
}
for (i = 0; i < 48; i++)
E[i] = e2[i];
-/* EXPORT DELETE END */
}
void
des_setkey(const char *key)
{
-/* EXPORT DELETE START */
(void) mutex_lock(&lock);
des_setkey_nolock(key);
(void) mutex_unlock(&lock);
-/* EXPORT DELETE END */
}
-/* EXPORT DELETE START */
/*
* The 8 selection functions.
* For some reason, they give a 0-origin
* index, unlike everything else.
*/
@@ -293,35 +284,28 @@
static char preS[48];
/*
* The payoff: encrypt a block.
*/
-/* EXPORT DELETE END */
static void
des_encrypt_nolock(char *block, int edflag)
{
-/* EXPORT DELETE START */
-
if (edflag)
(void) _des_decrypt1(block, L, IP, &L[32],
preS, E, KS, S, f, tempL, P, FP);
else
(void) des_encrypt1(block, L, IP, &L[32],
preS, E, KS, S, f, tempL, P, FP);
-
-/* EXPORT DELETE END */
}
void
des_encrypt(char *block, int edflag)
{
-/* EXPORT DELETE START */
(void) mutex_lock(&lock);
des_encrypt_nolock(block, edflag);
(void) mutex_unlock(&lock);
-/* EXPORT DELETE END */
}
#define IOBUF_SIZE 16
@@ -345,11 +329,10 @@
}
char *
des_crypt(const char *pw, const char *salt)
{
-/* EXPORT DELETE START */
int i, j;
char c, temp;
char block[66];
static thread_key_t key = THR_ONCE_KEY;
char *iobuf = _get_iobuf(&key, IOBUF_SIZE);
@@ -404,12 +387,6 @@
iobuf[i+2] = 0;
if (iobuf[1] == 0)
iobuf[1] = iobuf[0];
(void) mutex_unlock(&lock);
return (iobuf);
-#if 0
-/* EXPORT DELETE END */
- return (0);
-/* EXPORT DELETE START */
-#endif
-/* EXPORT DELETE END */
}