summaryrefslogtreecommitdiff
path: root/acss.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2004-01-27 21:19:21 +1100
committerDamien Miller <djm@mindrot.org>2004-01-27 21:19:21 +1100
commit4f0fe684daa4f35e1c91224e144c91b4869946fa (patch)
tree650499929f514c84eb05da24595d97e113b2af2c /acss.h
parent01326ebada378a58c1797fb5a75f631a70a020e0 (diff)
- (djm) OpenBSD CVS Sync
- hshoexer@cvs.openbsd.org 2004/01/23 17:06:03 [cipher.c] enable acss for ssh ok deraadt@ markus@ - (djm) [acss.c acss.h cipher-acss.c] Portable support for ACSS if libcrypto lacks it
Diffstat (limited to 'acss.h')
-rw-r--r--acss.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/acss.h b/acss.h
new file mode 100644
index 000000000..fc6344dc8
--- /dev/null
+++ b/acss.h
@@ -0,0 +1,47 @@
1/* $Id: */
2/*
3 * Copyright (c) 2004 The OpenBSD project
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#ifndef _ACSS_H_
19#define _ACSS_H_
20
21/* 40bit key */
22#define ACSS_KEYSIZE 5
23
24/* modes of acss */
25#define ACSS_AUTHENTICATE 0
26#define ACSS_SESSIONKEY 1
27#define ACSS_TITLEKEY 2
28#define ACSS_DATA 3
29
30typedef struct acss_key_st {
31 unsigned int lfsr17; /* current state of lfsrs */
32 unsigned int lfsr25;
33 unsigned int lfsrsum;
34 unsigned char seed[ACSS_KEYSIZE];
35 unsigned char data[ACSS_KEYSIZE];
36 unsigned char subkey[ACSS_KEYSIZE];
37 int encrypt; /* XXX make these bit flags? */
38 int mode;
39 int seeded;
40 int subkey_avilable;
41} ACSS_KEY;
42
43void acss_setkey(ACSS_KEY *, const unsigned char *, int, int);
44void acss_setsubkey(ACSS_KEY *, const unsigned char *);
45int acss(ACSS_KEY *, unsigned long, const unsigned char *, unsigned char *);
46
47#endif /* ifndef _ACSS_H_ */