-
Notifications
You must be signed in to change notification settings - Fork 1
/
secshare.h
73 lines (53 loc) · 1.87 KB
/
secshare.h
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
65
66
67
68
69
70
71
72
73
/***************************************************************************
seth.h - description
-------------------
begin : Fri Apr 9 2004
copyright : (C) 2004 by Konrad Rosenbaum
email : [email protected]
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include <sys/types.h> /* for byte and u32 typedefs */
typedef u_int8_t byte;
typedef u_int32_t u32;
/*#include "config.h"*/
#include "endianess.h"
/*Return values*/
#define SELFTEST_FAILED -1
#define INV_KEYLEN -2
/*Modi*/
#define ENCRYPT 0
#define DECRYPT 1
#define MASK_CRYPT 0xf
/*I've made CBC 0 so that you are more secure if you forget it. Use of ECB is
discouraged. You may try it for experiments, but don't use it on production
data.*/
#define ECB 0x10
#define CBC 0x00
#define MASK_MODE 0xf0
/*seth.c*/
extern int verbose;
extern int fdin;
extern int fdout;
/*encrypt.c*/
int secshare_encrypt();
/*decrypt.c*/
int secshare_decrypt();
/*common.c*/
void genkey();
byte randbyte();
char* key_prints(char*,byte*);
extern byte key[16];
extern byte hashv[16];
/*share.c*/
void sharecalc();
void share(char*);
void unshare(char*);
void sharevector(int);
void sharematrix(int);