diff options
author | tedu <> | 2014-12-08 20:36:18 +0000 |
---|---|---|
committer | tedu <> | 2014-12-08 20:36:18 +0000 |
commit | 10acb2de70dd4a4b42dd0d116bac4d41520e3ca5 (patch) | |
tree | 3a8e5aa42b3c2460510a803fb0fd503de59f49a1 /src/lib/libc/crypt/crypt.c | |
parent | c52b1aafaaead44ed582498ae01421c9181a789a (diff) | |
download | openbsd-10acb2de70dd4a4b42dd0d116bac4d41520e3ca5.tar.gz openbsd-10acb2de70dd4a4b42dd0d116bac4d41520e3ca5.tar.bz2 openbsd-10acb2de70dd4a4b42dd0d116bac4d41520e3ca5.zip |
remove setkey and encrypt interfaces. they are useless and dangerous.
ok deraadt naddy
Diffstat (limited to 'src/lib/libc/crypt/crypt.c')
-rw-r--r-- | src/lib/libc/crypt/crypt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libc/crypt/crypt.c b/src/lib/libc/crypt/crypt.c index a4c864dea3..c7ff5d970b 100644 --- a/src/lib/libc/crypt/crypt.c +++ b/src/lib/libc/crypt/crypt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: crypt.c,v 1.24 2014/11/25 03:23:22 tedu Exp $ */ | 1 | /* $OpenBSD: crypt.c,v 1.25 2014/12/08 20:36:18 tedu Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * FreeSec: libcrypt | 4 | * FreeSec: libcrypt |
@@ -158,7 +158,7 @@ const u_int32_t _des_bits32[32] = | |||
158 | 0x00000008, 0x00000004, 0x00000002, 0x00000001 | 158 | 0x00000008, 0x00000004, 0x00000002, 0x00000001 |
159 | }; | 159 | }; |
160 | 160 | ||
161 | const u_char _des_bits8[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 }; | 161 | static const u_char _des_bits8[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 }; |
162 | 162 | ||
163 | static const u_int32_t *bits28, *bits24; | 163 | static const u_int32_t *bits28, *bits24; |
164 | static u_char init_perm[64], final_perm[64]; | 164 | static u_char init_perm[64], final_perm[64]; |
@@ -196,7 +196,7 @@ ascii_to_bin(char ch) | |||
196 | return(0); | 196 | return(0); |
197 | } | 197 | } |
198 | 198 | ||
199 | void | 199 | static void |
200 | _des_init(void) | 200 | _des_init(void) |
201 | { | 201 | { |
202 | int i, j, b, k, inbit, obit; | 202 | int i, j, b, k, inbit, obit; |
@@ -324,7 +324,7 @@ _des_init(void) | |||
324 | _des_initialised = 1; | 324 | _des_initialised = 1; |
325 | } | 325 | } |
326 | 326 | ||
327 | u_int32_t | 327 | static u_int32_t |
328 | _des_setup_salt(int32_t salt) | 328 | _des_setup_salt(int32_t salt) |
329 | { | 329 | { |
330 | u_int32_t obit, saltbit, saltbits; | 330 | u_int32_t obit, saltbit, saltbits; |
@@ -342,7 +342,7 @@ _des_setup_salt(int32_t salt) | |||
342 | return saltbits; | 342 | return saltbits; |
343 | } | 343 | } |
344 | 344 | ||
345 | int | 345 | static int |
346 | des_setkey(const char *key) | 346 | des_setkey(const char *key) |
347 | { | 347 | { |
348 | u_int32_t k0, k1, rawkey0, rawkey1; | 348 | u_int32_t k0, k1, rawkey0, rawkey1; |
@@ -422,7 +422,7 @@ des_setkey(const char *key) | |||
422 | return(0); | 422 | return(0); |
423 | } | 423 | } |
424 | 424 | ||
425 | int | 425 | static int |
426 | _des_do_des(u_int32_t l_in, u_int32_t r_in, u_int32_t *l_out, u_int32_t *r_out, | 426 | _des_do_des(u_int32_t l_in, u_int32_t r_in, u_int32_t *l_out, u_int32_t *r_out, |
427 | int count, u_int32_t saltbits) | 427 | int count, u_int32_t saltbits) |
428 | { | 428 | { |
@@ -539,7 +539,7 @@ _des_do_des(u_int32_t l_in, u_int32_t r_in, u_int32_t *l_out, u_int32_t *r_out, | |||
539 | return(0); | 539 | return(0); |
540 | } | 540 | } |
541 | 541 | ||
542 | int | 542 | static int |
543 | des_cipher(const char *in, char *out, int32_t salt, int count) | 543 | des_cipher(const char *in, char *out, int32_t salt, int count) |
544 | { | 544 | { |
545 | u_int32_t l_out, r_out, rawl, rawr, saltbits; | 545 | u_int32_t l_out, r_out, rawl, rawr, saltbits; |