1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
$NetBSD: patch-bb,v 1.1 1999/12/25 05:28:37 kim Exp $
--- ssh-des.h.orig Wed May 12 07:19:25 1999
+++ ssh-des.h Fri Dec 24 21:50:04 1999
@@ -25,8 +25,8 @@
* $Endlog$
*/
-#ifndef DES_H
-#define DES_H
+#ifndef SSH_DES_H
+#define SSH_DES_H
typedef struct
{
@@ -35,40 +35,40 @@
/* Sets the des key for the context. Initializes the context. The least
significant bit of each byte of the key is ignored as parity. */
-void des_set_key(unsigned char *key, DESContext *ks);
+void ssh_des_set_key(unsigned char *key, DESContext *ks);
/* Encrypts 32 bits in l,r, and stores the result in output[0] and output[1].
Performs encryption if encrypt is non-zero, and decryption if it is zero.
- The key context must have been initialized previously with des_set_key. */
-void des_encrypt(word32 l, word32 r, word32 *output, DESContext *ks,
+ The key context must have been initialized previously with ssh_des_set_key. */
+void ssh_des_encrypt(word32 l, word32 r, word32 *output, DESContext *ks,
int encrypt);
/* Encrypts len bytes from src to dest in CBC modes. Len must be a multiple
of 8. iv will be modified at end to a value suitable for continuing
encryption. */
-void des_cbc_encrypt(DESContext *ks, unsigned char *iv, unsigned char *dest,
+void ssh_des_cbc_encrypt(DESContext *ks, unsigned char *iv, unsigned char *dest,
const unsigned char *src, unsigned int len);
/* Decrypts len bytes from src to dest in CBC modes. Len must be a multiple
of 8. iv will be modified at end to a value suitable for continuing
decryption. */
-void des_cbc_decrypt(DESContext *ks, unsigned char *iv, unsigned char *dest,
+void ssh_des_cbc_decrypt(DESContext *ks, unsigned char *iv, unsigned char *dest,
const unsigned char *src, unsigned int len);
/* Encrypts in CBC mode using triple-DES. */
-void des_3cbc_encrypt(DESContext *ks1, unsigned char *iv1,
+void ssh_des_3cbc_encrypt(DESContext *ks1, unsigned char *iv1,
DESContext *ks2, unsigned char *iv2,
DESContext *ks3, unsigned char *iv3,
unsigned char *dest, const unsigned char *src,
unsigned int len);
/* Decrypts in CBC mode using triple-DES. */
-void des_3cbc_decrypt(DESContext *ks1, unsigned char *iv1,
+void ssh_des_3cbc_decrypt(DESContext *ks1, unsigned char *iv1,
DESContext *ks2, unsigned char *iv2,
DESContext *ks3, unsigned char *iv3,
unsigned char *dest, const unsigned char *src,
unsigned int len);
-#endif /* DES_H */
+#endif /* SSH_DES_H */
|