summaryrefslogtreecommitdiff
path: root/cipher.h
diff options
context:
space:
mode:
Diffstat (limited to 'cipher.h')
-rw-r--r--cipher.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/cipher.h b/cipher.h
index b878d50f4..133d2e73d 100644
--- a/cipher.h
+++ b/cipher.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: cipher.h,v 1.40 2013/04/19 01:06:50 djm Exp $ */ 1/* $OpenBSD: cipher.h,v 1.44 2014/01/25 10:12:50 dtucker Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -38,6 +38,8 @@
38#define CIPHER_H 38#define CIPHER_H
39 39
40#include <openssl/evp.h> 40#include <openssl/evp.h>
41#include "cipher-chachapoly.h"
42
41/* 43/*
42 * Cipher types for SSH-1. New types can be added, but old types should not 44 * Cipher types for SSH-1. New types can be added, but old types should not
43 * be removed for compatibility. The maximum allowed value is 31. 45 * be removed for compatibility. The maximum allowed value is 31.
@@ -66,6 +68,7 @@ struct CipherContext {
66 int plaintext; 68 int plaintext;
67 int encrypt; 69 int encrypt;
68 EVP_CIPHER_CTX evp; 70 EVP_CIPHER_CTX evp;
71 struct chachapoly_ctx cp_ctx; /* XXX union with evp? */
69 const Cipher *cipher; 72 const Cipher *cipher;
70}; 73};
71 74
@@ -75,15 +78,18 @@ const Cipher *cipher_by_number(int);
75int cipher_number(const char *); 78int cipher_number(const char *);
76char *cipher_name(int); 79char *cipher_name(int);
77int ciphers_valid(const char *); 80int ciphers_valid(const char *);
78char *cipher_alg_list(void); 81char *cipher_alg_list(char, int);
79void cipher_init(CipherContext *, const Cipher *, const u_char *, u_int, 82void cipher_init(CipherContext *, const Cipher *, const u_char *, u_int,
80 const u_char *, u_int, int); 83 const u_char *, u_int, int);
81void cipher_crypt(CipherContext *, u_char *, const u_char *, 84int cipher_crypt(CipherContext *, u_int, u_char *, const u_char *,
82 u_int, u_int, u_int); 85 u_int, u_int, u_int);
86int cipher_get_length(CipherContext *, u_int *, u_int,
87 const u_char *, u_int);
83void cipher_cleanup(CipherContext *); 88void cipher_cleanup(CipherContext *);
84void cipher_set_key_string(CipherContext *, const Cipher *, const char *, int); 89void cipher_set_key_string(CipherContext *, const Cipher *, const char *, int);
85u_int cipher_blocksize(const Cipher *); 90u_int cipher_blocksize(const Cipher *);
86u_int cipher_keylen(const Cipher *); 91u_int cipher_keylen(const Cipher *);
92u_int cipher_seclen(const Cipher *);
87u_int cipher_authlen(const Cipher *); 93u_int cipher_authlen(const Cipher *);
88u_int cipher_ivlen(const Cipher *); 94u_int cipher_ivlen(const Cipher *);
89u_int cipher_is_cbc(const Cipher *); 95u_int cipher_is_cbc(const Cipher *);