019b643e7f00ef1c548a59b30e1d870f96cdb7d1
2 * Copyright (C) 2005-2009 Andre Noll <maan@systemlinux.org>
4 * Licensed under the GPL v2. For licencing details see COPYING.
7 /** \file crypt.h prototypes for the RSA crypt functions */
9 #include <openssl/pem.h>
10 int para_encrypt_buffer(RSA
* rsa
, unsigned char *inbuf
, unsigned len
,
11 unsigned char *outbuf
);
12 int para_decrypt_buffer(char *key_file
, unsigned char *outbuf
, unsigned char *inbuf
,
14 int get_rsa_key(char *key_file
, RSA
**rsa
, int private);
16 void rsa_free(RSA
*rsa
);
17 void get_random_bytes_or_die(unsigned char *buf
, int num
);
18 void init_random_seed_or_die(void);
25 int rc4_send_bin_buffer(struct rc4_context
*rc4c
, const char *buf
, size_t len
);
26 int rc4_send_buffer(struct rc4_context
*rc4c
, const char *buf
);
27 __printf_2_3
int rc4_send_va_buffer(struct rc4_context
*rc4c
, const char *fmt
, ...);
28 int rc4_recv_bin_buffer(struct rc4_context
*rcc
, char *buf
, size_t size
);
29 int rc4_recv_buffer(struct rc4_context
*rcc
, char *buf
, size_t size
);
31 /** \cond used to distinguish between loading of private/public key */
32 #define LOAD_PUBLIC_KEY 0
33 #define LOAD_PRIVATE_KEY 1
34 #define CHALLENGE_SIZE 64