Changeset View
Changeset View
Standalone View
Standalone View
cipher.h
/* $OpenBSD: cipher.h,v 1.52 2017/05/07 23:12:57 djm Exp $ */ | /* $OpenBSD: cipher.h,v 1.55 2020/01/23 10:24:29 dtucker Exp $ */ | ||||
/* | /* | ||||
* Author: Tatu Ylonen <ylo@cs.hut.fi> | * Author: Tatu Ylonen <ylo@cs.hut.fi> | ||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | ||||
* All rights reserved | * All rights reserved | ||||
* | * | ||||
* As far as I am concerned, the code I have written for this software | * As far as I am concerned, the code I have written for this software | ||||
* can be used freely for any purpose. Any derived versions of this | * can be used freely for any purpose. Any derived versions of this | ||||
Show All 23 Lines | |||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
*/ | */ | ||||
#ifndef CIPHER_H | #ifndef CIPHER_H | ||||
#define CIPHER_H | #define CIPHER_H | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#ifdef WITH_OPENSSL | |||||
#include <openssl/evp.h> | #include <openssl/evp.h> | ||||
#endif | |||||
#include "cipher-chachapoly.h" | #include "cipher-chachapoly.h" | ||||
#include "cipher-aesctr.h" | #include "cipher-aesctr.h" | ||||
#define CIPHER_ENCRYPT 1 | #define CIPHER_ENCRYPT 1 | ||||
#define CIPHER_DECRYPT 0 | #define CIPHER_DECRYPT 0 | ||||
struct sshcipher; | struct sshcipher; | ||||
struct sshcipher_ctx; | struct sshcipher_ctx; | ||||
const struct sshcipher *cipher_by_name(const char *); | const struct sshcipher *cipher_by_name(const char *); | ||||
const char *cipher_warning_message(const struct sshcipher_ctx *); | const char *cipher_warning_message(const struct sshcipher_ctx *); | ||||
int ciphers_valid(const char *); | int ciphers_valid(const char *); | ||||
char *cipher_alg_list(char, int); | char *cipher_alg_list(char, int); | ||||
const char *compression_alg_list(int); | |||||
int cipher_init(struct sshcipher_ctx **, const struct sshcipher *, | int cipher_init(struct sshcipher_ctx **, const struct sshcipher *, | ||||
const u_char *, u_int, const u_char *, u_int, int); | const u_char *, u_int, const u_char *, u_int, int); | ||||
int cipher_crypt(struct sshcipher_ctx *, u_int, u_char *, const u_char *, | int cipher_crypt(struct sshcipher_ctx *, u_int, u_char *, const u_char *, | ||||
u_int, u_int, u_int); | u_int, u_int, u_int); | ||||
int cipher_get_length(struct sshcipher_ctx *, u_int *, u_int, | int cipher_get_length(struct sshcipher_ctx *, u_int *, u_int, | ||||
const u_char *, u_int); | const u_char *, u_int); | ||||
void cipher_free(struct sshcipher_ctx *); | void cipher_free(struct sshcipher_ctx *); | ||||
u_int cipher_blocksize(const struct sshcipher *); | u_int cipher_blocksize(const struct sshcipher *); | ||||
Show All 13 Lines |