Changeset View
Changeset View
Standalone View
Standalone View
cipher.c
/* $OpenBSD: cipher.c,v 1.111 2018/02/23 15:58:37 markus Exp $ */ | /* $OpenBSD: cipher.c,v 1.113 2019/09/06 05:23:55 djm 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 | ||||
* software must be clearly marked as such, and if the derived work is | * software must be clearly marked as such, and if the derived work is | ||||
Show All 36 Lines | |||||
#include "cipher.h" | #include "cipher.h" | ||||
#include "misc.h" | #include "misc.h" | ||||
#include "sshbuf.h" | #include "sshbuf.h" | ||||
#include "ssherr.h" | #include "ssherr.h" | ||||
#include "digest.h" | #include "digest.h" | ||||
#include "openbsd-compat/openssl-compat.h" | #include "openbsd-compat/openssl-compat.h" | ||||
#ifndef WITH_OPENSSL | |||||
#define EVP_CIPHER_CTX void | |||||
#endif | |||||
struct sshcipher_ctx { | struct sshcipher_ctx { | ||||
int plaintext; | int plaintext; | ||||
int encrypt; | int encrypt; | ||||
EVP_CIPHER_CTX *evp; | EVP_CIPHER_CTX *evp; | ||||
struct chachapoly_ctx cp_ctx; /* XXX union with evp? */ | struct chachapoly_ctx cp_ctx; /* XXX union with evp? */ | ||||
struct aesctr_ctx ac_ctx; /* XXX union with evp? */ | struct aesctr_ctx ac_ctx; /* XXX union with evp? */ | ||||
const struct sshcipher *cipher; | const struct sshcipher *cipher; | ||||
▲ Show 20 Lines • Show All 466 Lines • Show Last 20 Lines |