diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libc/crypt/blowfish.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/lib/libc/crypt/blowfish.c b/src/lib/libc/crypt/blowfish.c index 558d6d7b38..21c492209d 100644 --- a/src/lib/libc/crypt/blowfish.c +++ b/src/lib/libc/crypt/blowfish.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: blowfish.c,v 1.2 1997/02/14 18:40:18 provos Exp $ */ | 1 | /* $OpenBSD: blowfish.c,v 1.3 1997/02/16 20:58:17 provos Exp $ */ |
2 | /* | 2 | /* |
3 | * Blowfish block cipher for OpenBSD | 3 | * Blowfish block cipher for OpenBSD |
4 | * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> | 4 | * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> |
@@ -16,7 +16,7 @@ | |||
16 | * documentation and/or other materials provided with the distribution. | 16 | * documentation and/or other materials provided with the distribution. |
17 | * 3. All advertising materials mentioning features or use of this software | 17 | * 3. All advertising materials mentioning features or use of this software |
18 | * must display the following acknowledgement: | 18 | * must display the following acknowledgement: |
19 | * This product includes software developed by Theo de Raadt. | 19 | * This product includes software developed by Niels Provos. |
20 | * 4. The name of the author may not be used to endorse or promote products | 20 | * 4. The name of the author may not be used to endorse or promote products |
21 | * derived from this software without specific prior written permission. | 21 | * derived from this software without specific prior written permission. |
22 | * | 22 | * |
@@ -56,12 +56,6 @@ | |||
56 | 56 | ||
57 | static inline u_int32_t F __P((blf_ctx * bc, u_int32_t x)); | 57 | static inline u_int32_t F __P((blf_ctx * bc, u_int32_t x)); |
58 | 58 | ||
59 | /* Standard Blowfish */ | ||
60 | |||
61 | void blf_key __P((blf_ctx * c, u_int8_t * k, u_int16_t len)); | ||
62 | void blf_enc __P((blf_ctx * c, u_int32_t * data, u_int16_t blocks)); | ||
63 | void blf_dec __P((blf_ctx * c, u_int32_t * data, u_int16_t blocks)); | ||
64 | |||
65 | /* Function for Feistel Networks */ | 59 | /* Function for Feistel Networks */ |
66 | 60 | ||
67 | static inline u_int32_t | 61 | static inline u_int32_t |
@@ -449,7 +443,7 @@ Blowfish_initstate(c) | |||
449 | 443 | ||
450 | u_int32_t | 444 | u_int32_t |
451 | Blowfish_stream2word(data, databytes, current) | 445 | Blowfish_stream2word(data, databytes, current) |
452 | u_int8_t *data; | 446 | const u_int8_t *data; |
453 | u_int16_t databytes; | 447 | u_int16_t databytes; |
454 | u_int16_t *current; | 448 | u_int16_t *current; |
455 | { | 449 | { |
@@ -473,7 +467,7 @@ Blowfish_stream2word(data, databytes, current) | |||
473 | void | 467 | void |
474 | Blowfish_expand0state(c, key, keybytes) | 468 | Blowfish_expand0state(c, key, keybytes) |
475 | blf_ctx *c; | 469 | blf_ctx *c; |
476 | u_int8_t *key; | 470 | const u_int8_t *key; |
477 | u_int16_t keybytes; | 471 | u_int16_t keybytes; |
478 | { | 472 | { |
479 | u_int16_t i; | 473 | u_int16_t i; |
@@ -515,9 +509,9 @@ Blowfish_expand0state(c, key, keybytes) | |||
515 | void | 509 | void |
516 | Blowfish_expandstate(c, data, databytes, key, keybytes) | 510 | Blowfish_expandstate(c, data, databytes, key, keybytes) |
517 | blf_ctx *c; | 511 | blf_ctx *c; |
518 | u_int8_t *data; | 512 | const u_int8_t *data; |
519 | u_int16_t databytes; | 513 | u_int16_t databytes; |
520 | u_int8_t *key; | 514 | const u_int8_t *key; |
521 | u_int16_t keybytes; | 515 | u_int16_t keybytes; |
522 | { | 516 | { |
523 | u_int16_t i; | 517 | u_int16_t i; |
@@ -562,7 +556,7 @@ Blowfish_expandstate(c, data, databytes, key, keybytes) | |||
562 | void | 556 | void |
563 | blf_key(c, k, len) | 557 | blf_key(c, k, len) |
564 | blf_ctx *c; | 558 | blf_ctx *c; |
565 | u_int8_t *k; | 559 | const u_int8_t *k; |
566 | u_int16_t len; | 560 | u_int16_t len; |
567 | { | 561 | { |
568 | /* Initalize S-boxes and subkeys with Pi */ | 562 | /* Initalize S-boxes and subkeys with Pi */ |