File: dh1080.h

package info (click to toggle)
scrollz 2.2.3-2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 8,392 kB
  • sloc: ansic: 79,473; tcl: 2,866; makefile: 703; sh: 508
file content (37 lines) | stat: -rw-r--r-- 969 bytes parent folder | download | duplicates (6)
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
#ifndef _dh1080_h_
#define _dh1080_h_

/*
 * DH key exchange
 *
 * $Id: dh1080.h,v 1.3 2009-12-21 14:14:17 f Exp $
 */

#include <gmp.h>
#include <stdlib.h>

/* Input:  priv_key = buffer of 200 bytes
           pub_key  = buffer of 200 bytes
   Output: priv_key = Your private key
           pub_key  = Your public key */
void DH1080_gen(char *priv_key, char *pub_key);

/* Input:  MyPrivKey = Your private key
           HisPubKey = Someones pubic key
   Output: MyPrivKey has been destroyed for security reasons
           HisPubKey = the secret key */
int DH1080_comp(char *MyPrivKey, char *HisPubKey);


int b64toh(char *b, char *d);
int htob64(char *h, char *d, unsigned int l);

void SHA256_memory(unsigned char *buf, int len, unsigned char *hash);
int sha_file(unsigned char *filename, unsigned char *hash);

void memXOR(unsigned char *s1, const unsigned char *s2, int n);

extern unsigned char B64ABC[];
extern unsigned char iniPath[];

#endif /* _dh1080_h_ */