summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/acss/acss.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/acss/acss.h')
-rw-r--r--src/lib/libcrypto/acss/acss.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/lib/libcrypto/acss/acss.h b/src/lib/libcrypto/acss/acss.h
new file mode 100644
index 0000000000..c2d3550796
--- /dev/null
+++ b/src/lib/libcrypto/acss/acss.h
@@ -0,0 +1,47 @@
1/* $OpenBSD: acss.h,v 1.4 2005/04/25 13:20:52 miod Exp $ */
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#ifdef OPENSSL_NO_ACSS
22#error acss is disabled.
23#endif
24
25/* 40bit key */
26#define ACSS_KEYSIZE 5
27
28/* modes of acss */
29#define ACSS_MODE0 0
30#define ACSS_MODE1 1
31#define ACSS_MODE2 2
32#define ACSS_MODE3 3
33
34typedef struct acss_key_st {
35 unsigned int lfsr17; /* current state of lfsrs */
36 unsigned int lfsr25;
37 unsigned int lfsrsum;
38 unsigned char seed[ACSS_KEYSIZE];
39 unsigned char data[ACSS_KEYSIZE];
40 int encrypt;
41 int mode;
42} ACSS_KEY;
43
44void acss_setkey(ACSS_KEY *, const unsigned char *, int, int);
45void acss(ACSS_KEY *, unsigned long, const unsigned char *, unsigned char *);
46
47#endif /* ifndef _ACSS_H_ */