[Ttssh2-commit] [9212] OpenSSH-8.5p1 から cipher-chachapoly, poly1305 のファイルを追加

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2021年 4月 17日 (土) 23:54:57 JST


Revision: 9212
          https://osdn.net/projects/ttssh2/scm/svn/commits/9212
Author:   nmaya
Date:     2021-04-17 23:54:57 +0900 (Sat, 17 Apr 2021)
Log Message:
-----------
OpenSSH-8.5p1 から cipher-chachapoly, poly1305 のファイルを追加

Modified Paths:
--------------
    branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.v16.vcxproj
    branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.v16.vcxproj.filters
    branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.v8.vcproj

Added Paths:
-----------
    branches/ssh_chacha20poly1305/ttssh2/ttxssh/cipher-chachapoly-libcrypto.c
    branches/ssh_chacha20poly1305/ttssh2/ttxssh/cipher-chachapoly.h
    branches/ssh_chacha20poly1305/ttssh2/ttxssh/poly1305.c
    branches/ssh_chacha20poly1305/ttssh2/ttxssh/poly1305.h

-------------- next part --------------
Added: branches/ssh_chacha20poly1305/ttssh2/ttxssh/cipher-chachapoly-libcrypto.c
===================================================================
--- branches/ssh_chacha20poly1305/ttssh2/ttxssh/cipher-chachapoly-libcrypto.c	                        (rev 0)
+++ branches/ssh_chacha20poly1305/ttssh2/ttxssh/cipher-chachapoly-libcrypto.c	2021-04-17 14:54:57 UTC (rev 9212)
@@ -0,0 +1,196 @@
+/* Imported from OpenSSH-8.5p1, TeraTerm Project */
+
+/*
+ * Copyright (c) 2013 Damien Miller <djm****@mindr*****>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $OpenBSD: cipher-chachapoly-libcrypto.c,v 1.1 2020/04/03 04:32:21 djm Exp $ */
+
+#include <sys/types.h>
+
+#include <stdarg.h> /* needed for log.h */
+#include <string.h>
+#include <stdio.h>  /* needed for misc.h */
+#include <windows.h>
+
+#include <openssl/evp.h>
+
+#include "ssherr.h"
+#include "cipher-chachapoly.h"
+
+
+// import from sshbuf.h
+/*	$OpenBSD: sshbuf.h,v 1.23 2020/06/22 05:54:10 djm Exp $	*/
+#define PEEK_U32(p) \
+	(((u_int32_t)(((const u_char *)(p))[0]) << 24) | \
+	 ((u_int32_t)(((const u_char *)(p))[1]) << 16) | \
+	 ((u_int32_t)(((const u_char *)(p))[2]) << 8) | \
+	  (u_int32_t)(((const u_char *)(p))[3]))
+#define POKE_U64(p, v) \
+	do { \
+		const u_int64_t __v = (v); \
+		((u_char *)(p))[0] = (__v >> 56) & 0xff; \
+		((u_char *)(p))[1] = (__v >> 48) & 0xff; \
+		((u_char *)(p))[2] = (__v >> 40) & 0xff; \
+		((u_char *)(p))[3] = (__v >> 32) & 0xff; \
+		((u_char *)(p))[4] = (__v >> 24) & 0xff; \
+		((u_char *)(p))[5] = (__v >> 16) & 0xff; \
+		((u_char *)(p))[6] = (__v >> 8) & 0xff; \
+		((u_char *)(p))[7] = __v & 0xff; \
+	} while (0)
+
+
+// import from openbsd-compat/timingsafe_bcmp.c
+/*	$OpenBSD: timingsafe_bcmp.c,v 1.1 2010/09/24 13:33:00 matthew Exp $	*/
+int
+timingsafe_bcmp(const void* b1, const void* b2, size_t n)
+{
+	const unsigned char* p1 = b1, * p2 = b2;
+	int ret = 0;
+
+	for (; n > 0; n--)
+		ret |= *p1++ ^ *p2++;
+	return (ret != 0);
+}
+
+
+struct chachapoly_ctx {
+	EVP_CIPHER_CTX *main_evp, *header_evp;
+};
+
+struct chachapoly_ctx *
+chachapoly_new(const u_char *key, u_int keylen)
+{
+	struct chachapoly_ctx *ctx;
+
+	if (keylen != (32 + 32)) /* 2 x 256 bit keys */
+		return NULL;
+	if ((ctx = calloc(1, sizeof(*ctx))) == NULL)
+		return NULL;
+	if ((ctx->main_evp = EVP_CIPHER_CTX_new()) == NULL ||
+	    (ctx->header_evp = EVP_CIPHER_CTX_new()) == NULL)
+		goto fail;
+	if (!EVP_CipherInit(ctx->main_evp, EVP_chacha20(), key, NULL, 1))
+		goto fail;
+	if (!EVP_CipherInit(ctx->header_evp, EVP_chacha20(), key + 32, NULL, 1))
+		goto fail;
+	if (EVP_CIPHER_CTX_iv_length(ctx->header_evp) != 16)
+		goto fail;
+	return ctx;
+ fail:
+	chachapoly_free(ctx);
+	return NULL;
+}
+
+void
+chachapoly_free(struct chachapoly_ctx *cpctx)
+{
+	if (cpctx == NULL)
+		return;
+	EVP_CIPHER_CTX_free(cpctx->main_evp);
+	EVP_CIPHER_CTX_free(cpctx->header_evp);
+	SecureZeroMemory(cpctx, sizeof(*cpctx));
+}
+
+/*
+ * chachapoly_crypt() operates as following:
+ * En/decrypt with header key 'aadlen' bytes from 'src', storing result
+ * to 'dest'. The ciphertext here is treated as additional authenticated
+ * data for MAC calculation.
+ * En/decrypt 'len' bytes at offset 'aadlen' from 'src' to 'dest'. Use
+ * POLY1305_TAGLEN bytes at offset 'len'+'aadlen' as the authentication
+ * tag. This tag is written on encryption and verified on decryption.
+ */
+int
+chachapoly_crypt(struct chachapoly_ctx *ctx, u_int seqnr, u_char *dest,
+    const u_char *src, u_int len, u_int aadlen, u_int authlen, int do_encrypt)
+{
+	u_char seqbuf[16]; /* layout: u64 counter || u64 seqno */
+	int r = SSH_ERR_INTERNAL_ERROR;
+	u_char expected_tag[POLY1305_TAGLEN], poly_key[POLY1305_KEYLEN];
+
+	/*
+	 * Run ChaCha20 once to generate the Poly1305 key. The IV is the
+	 * packet sequence number.
+	 */
+	memset(seqbuf, 0, sizeof(seqbuf));
+	POKE_U64(seqbuf + 8, seqnr);
+	memset(poly_key, 0, sizeof(poly_key));
+	if (!EVP_CipherInit(ctx->main_evp, NULL, NULL, seqbuf, 1) ||
+	    EVP_Cipher(ctx->main_evp, poly_key,
+	    poly_key, sizeof(poly_key)) < 0) {
+		r = SSH_ERR_LIBCRYPTO_ERROR;
+		goto out;
+	}
+
+	/* If decrypting, check tag before anything else */
+	if (!do_encrypt) {
+		const u_char *tag = src + aadlen + len;
+
+		poly1305_auth(expected_tag, src, aadlen + len, poly_key);
+		if (timingsafe_bcmp(expected_tag, tag, POLY1305_TAGLEN) != 0) {
+			r = SSH_ERR_MAC_INVALID;
+			goto out;
+		}
+	}
+
+	/* Crypt additional data */
+	if (aadlen) {
+		if (!EVP_CipherInit(ctx->header_evp, NULL, NULL, seqbuf, 1) ||
+		    EVP_Cipher(ctx->header_evp, dest, src, aadlen) < 0) {
+			r = SSH_ERR_LIBCRYPTO_ERROR;
+			goto out;
+		}
+	}
+
+	/* Set Chacha's block counter to 1 */
+	seqbuf[0] = 1;
+	if (!EVP_CipherInit(ctx->main_evp, NULL, NULL, seqbuf, 1) ||
+	    EVP_Cipher(ctx->main_evp, dest + aadlen, src + aadlen, len) < 0) {
+		r = SSH_ERR_LIBCRYPTO_ERROR;
+		goto out;
+	}
+
+	/* If encrypting, calculate and append tag */
+	if (do_encrypt) {
+		poly1305_auth(dest + aadlen + len, dest, aadlen + len,
+		    poly_key);
+	}
+	r = 0;
+ out:
+	SecureZeroMemory(expected_tag, sizeof(expected_tag));
+	SecureZeroMemory(seqbuf, sizeof(seqbuf));
+	SecureZeroMemory(poly_key, sizeof(poly_key));
+	return r;
+}
+
+/* Decrypt and extract the encrypted packet length */
+int
+chachapoly_get_length(struct chachapoly_ctx *ctx,
+    u_int *plenp, u_int seqnr, const u_char *cp, u_int len)
+{
+	u_char buf[4], seqbuf[16];
+
+	if (len < 4)
+		return SSH_ERR_MESSAGE_INCOMPLETE;
+	memset(seqbuf, 0, sizeof(seqbuf));
+	POKE_U64(seqbuf + 8, seqnr);
+	if (!EVP_CipherInit(ctx->header_evp, NULL, NULL, seqbuf, 0))
+		return SSH_ERR_LIBCRYPTO_ERROR;
+	if (EVP_Cipher(ctx->header_evp, buf, (u_char *)cp, sizeof(buf)) < 0)
+		return SSH_ERR_LIBCRYPTO_ERROR;
+	*plenp = PEEK_U32(buf);
+	return 0;
+}

Added: branches/ssh_chacha20poly1305/ttssh2/ttxssh/cipher-chachapoly.h
===================================================================
--- branches/ssh_chacha20poly1305/ttssh2/ttxssh/cipher-chachapoly.h	                        (rev 0)
+++ branches/ssh_chacha20poly1305/ttssh2/ttxssh/cipher-chachapoly.h	2021-04-17 14:54:57 UTC (rev 9212)
@@ -0,0 +1,44 @@
+/* Imported from OpenSSH-8.5p1, TeraTerm Project */
+
+/* $OpenBSD: cipher-chachapoly.h,v 1.5 2020/04/03 04:27:03 djm Exp $ */
+
+/*
+ * Copyright (c) Damien Miller 2013 <djm****@mindr*****>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+#ifndef CHACHA_POLY_AEAD_H
+#define CHACHA_POLY_AEAD_H
+
+#include <sys/types.h>
+typedef unsigned int u_int32_t;
+typedef unsigned long long u_int64_t;
+
+#include "chacha.h"
+#include "poly1305.h"
+
+#define CHACHA_KEYLEN	32 /* Only 256 bit keys used here */
+
+struct chachapoly_ctx;
+typedef struct chachapoly_ctx chachapoly_ctx;
+
+struct chachapoly_ctx* chachapoly_new(const u_char* key, u_int keylen);
+void chachapoly_free(struct chachapoly_ctx* cpctx);
+
+int	chachapoly_crypt(struct chachapoly_ctx* cpctx, u_int seqnr,
+    u_char* dest, const u_char* src, u_int len, u_int aadlen, u_int authlen,
+    int do_encrypt);
+int	chachapoly_get_length(struct chachapoly_ctx* cpctx,
+    u_int* plenp, u_int seqnr, const u_char* cp, u_int len);
+
+#endif /* CHACHA_POLY_AEAD_H */

Added: branches/ssh_chacha20poly1305/ttssh2/ttxssh/poly1305.c
===================================================================
--- branches/ssh_chacha20poly1305/ttssh2/ttxssh/poly1305.c	                        (rev 0)
+++ branches/ssh_chacha20poly1305/ttssh2/ttxssh/poly1305.c	2021-04-17 14:54:57 UTC (rev 9212)
@@ -0,0 +1,162 @@
+/* Imported from OpenSSH-8.5p1, TeraTerm Project */
+
+/* 
+ * Public Domain poly1305 from Andrew Moon
+ * poly1305-donna-unrolled.c from https://github.com/floodyberry/poly1305-donna
+ */
+
+/* $OpenBSD: poly1305.c,v 1.3 2013/12/19 22:57:13 djm Exp $ */
+
+// #include "includes.h"
+
+#include <sys/types.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#include "poly1305.h"
+
+#define mul32x32_64(a,b) ((uint64_t)(a) * (b))
+
+#define U8TO32_LE(p) \
+	(((uint32_t)((p)[0])) | \
+	 ((uint32_t)((p)[1]) <<  8) | \
+	 ((uint32_t)((p)[2]) << 16) | \
+	 ((uint32_t)((p)[3]) << 24))
+
+#define U32TO8_LE(p, v) \
+	do { \
+		(p)[0] = (uint8_t)((v)); \
+		(p)[1] = (uint8_t)((v) >>  8); \
+		(p)[2] = (uint8_t)((v) >> 16); \
+		(p)[3] = (uint8_t)((v) >> 24); \
+	} while (0)
+
+void
+poly1305_auth(unsigned char out[POLY1305_TAGLEN], const unsigned char *m, size_t inlen, const unsigned char key[POLY1305_KEYLEN]) {
+	uint32_t t0,t1,t2,t3;
+	uint32_t h0,h1,h2,h3,h4;
+	uint32_t r0,r1,r2,r3,r4;
+	uint32_t s1,s2,s3,s4;
+	uint32_t b, nb;
+	size_t j;
+	uint64_t t[5];
+	uint64_t f0,f1,f2,f3;
+	uint32_t g0,g1,g2,g3,g4;
+	uint64_t c;
+	unsigned char mp[16];
+
+	/* clamp key */
+	t0 = U8TO32_LE(key+0);
+	t1 = U8TO32_LE(key+4);
+	t2 = U8TO32_LE(key+8);
+	t3 = U8TO32_LE(key+12);
+
+	/* precompute multipliers */
+	r0 = t0 & 0x3ffffff; t0 >>= 26; t0 |= t1 << 6;
+	r1 = t0 & 0x3ffff03; t1 >>= 20; t1 |= t2 << 12;
+	r2 = t1 & 0x3ffc0ff; t2 >>= 14; t2 |= t3 << 18;
+	r3 = t2 & 0x3f03fff; t3 >>= 8;
+	r4 = t3 & 0x00fffff;
+
+	s1 = r1 * 5;
+	s2 = r2 * 5;
+	s3 = r3 * 5;
+	s4 = r4 * 5;
+
+	/* init state */
+	h0 = 0;
+	h1 = 0;
+	h2 = 0;
+	h3 = 0;
+	h4 = 0;
+
+	/* full blocks */
+	if (inlen < 16) goto poly1305_donna_atmost15bytes;
+poly1305_donna_16bytes:
+	m += 16;
+	inlen -= 16;
+
+	t0 = U8TO32_LE(m-16);
+	t1 = U8TO32_LE(m-12);
+	t2 = U8TO32_LE(m-8);
+	t3 = U8TO32_LE(m-4);
+
+	h0 += t0 & 0x3ffffff;
+	h1 += ((((uint64_t)t1 << 32) | t0) >> 26) & 0x3ffffff;
+	h2 += ((((uint64_t)t2 << 32) | t1) >> 20) & 0x3ffffff;
+	h3 += ((((uint64_t)t3 << 32) | t2) >> 14) & 0x3ffffff;
+	h4 += (t3 >> 8) | (1 << 24);
+
+
+poly1305_donna_mul:
+	t[0]  = mul32x32_64(h0,r0) + mul32x32_64(h1,s4) + mul32x32_64(h2,s3) + mul32x32_64(h3,s2) + mul32x32_64(h4,s1);
+	t[1]  = mul32x32_64(h0,r1) + mul32x32_64(h1,r0) + mul32x32_64(h2,s4) + mul32x32_64(h3,s3) + mul32x32_64(h4,s2);
+	t[2]  = mul32x32_64(h0,r2) + mul32x32_64(h1,r1) + mul32x32_64(h2,r0) + mul32x32_64(h3,s4) + mul32x32_64(h4,s3);
+	t[3]  = mul32x32_64(h0,r3) + mul32x32_64(h1,r2) + mul32x32_64(h2,r1) + mul32x32_64(h3,r0) + mul32x32_64(h4,s4);
+	t[4]  = mul32x32_64(h0,r4) + mul32x32_64(h1,r3) + mul32x32_64(h2,r2) + mul32x32_64(h3,r1) + mul32x32_64(h4,r0);
+
+	                h0 = (uint32_t)t[0] & 0x3ffffff; c =           (t[0] >> 26);
+	t[1] += c;      h1 = (uint32_t)t[1] & 0x3ffffff; b = (uint32_t)(t[1] >> 26);
+	t[2] += b;      h2 = (uint32_t)t[2] & 0x3ffffff; b = (uint32_t)(t[2] >> 26);
+	t[3] += b;      h3 = (uint32_t)t[3] & 0x3ffffff; b = (uint32_t)(t[3] >> 26);
+	t[4] += b;      h4 = (uint32_t)t[4] & 0x3ffffff; b = (uint32_t)(t[4] >> 26);
+	h0 += b * 5;
+
+	if (inlen >= 16) goto poly1305_donna_16bytes;
+
+	/* final bytes */
+poly1305_donna_atmost15bytes:
+	if (!inlen) goto poly1305_donna_finish;
+
+	for (j = 0; j < inlen; j++) mp[j] = m[j];
+	mp[j++] = 1;
+	for (; j < 16; j++)	mp[j] = 0;
+	inlen = 0;
+
+	t0 = U8TO32_LE(mp+0);
+	t1 = U8TO32_LE(mp+4);
+	t2 = U8TO32_LE(mp+8);
+	t3 = U8TO32_LE(mp+12);
+
+	h0 += t0 & 0x3ffffff;
+	h1 += ((((uint64_t)t1 << 32) | t0) >> 26) & 0x3ffffff;
+	h2 += ((((uint64_t)t2 << 32) | t1) >> 20) & 0x3ffffff;
+	h3 += ((((uint64_t)t3 << 32) | t2) >> 14) & 0x3ffffff;
+	h4 += (t3 >> 8);
+
+	goto poly1305_donna_mul;
+
+poly1305_donna_finish:
+	             b = h0 >> 26; h0 = h0 & 0x3ffffff;
+	h1 +=     b; b = h1 >> 26; h1 = h1 & 0x3ffffff;
+	h2 +=     b; b = h2 >> 26; h2 = h2 & 0x3ffffff;
+	h3 +=     b; b = h3 >> 26; h3 = h3 & 0x3ffffff;
+	h4 +=     b; b = h4 >> 26; h4 = h4 & 0x3ffffff;
+	h0 += b * 5; b = h0 >> 26; h0 = h0 & 0x3ffffff;
+	h1 +=     b;
+
+	g0 = h0 + 5; b = g0 >> 26; g0 &= 0x3ffffff;
+	g1 = h1 + b; b = g1 >> 26; g1 &= 0x3ffffff;
+	g2 = h2 + b; b = g2 >> 26; g2 &= 0x3ffffff;
+	g3 = h3 + b; b = g3 >> 26; g3 &= 0x3ffffff;
+	g4 = h4 + b - (1 << 26);
+
+	b = (g4 >> 31) - 1;
+	nb = ~b;
+	h0 = (h0 & nb) | (g0 & b);
+	h1 = (h1 & nb) | (g1 & b);
+	h2 = (h2 & nb) | (g2 & b);
+	h3 = (h3 & nb) | (g3 & b);
+	h4 = (h4 & nb) | (g4 & b);
+
+	f0 = ((h0      ) | (h1 << 26)) + (uint64_t)U8TO32_LE(&key[16]);
+	f1 = ((h1 >>  6) | (h2 << 20)) + (uint64_t)U8TO32_LE(&key[20]);
+	f2 = ((h2 >> 12) | (h3 << 14)) + (uint64_t)U8TO32_LE(&key[24]);
+	f3 = ((h3 >> 18) | (h4 <<  8)) + (uint64_t)U8TO32_LE(&key[28]);
+
+	U32TO8_LE(&out[ 0], f0); f1 += (f0 >> 32);
+	U32TO8_LE(&out[ 4], f1); f2 += (f1 >> 32);
+	U32TO8_LE(&out[ 8], f2); f3 += (f2 >> 32);
+	U32TO8_LE(&out[12], f3);
+}

Added: branches/ssh_chacha20poly1305/ttssh2/ttxssh/poly1305.h
===================================================================
--- branches/ssh_chacha20poly1305/ttssh2/ttxssh/poly1305.h	                        (rev 0)
+++ branches/ssh_chacha20poly1305/ttssh2/ttxssh/poly1305.h	2021-04-17 14:54:57 UTC (rev 9212)
@@ -0,0 +1,26 @@
+/* Imported from OpenSSH-8.5p1, TeraTerm Project */
+
+/* $OpenBSD: poly1305.h,v 1.4 2014/05/02 03:27:54 djm Exp $ */
+
+/* 
+ * Public Domain poly1305 from Andrew Moon
+ * poly1305-donna-unrolled.c from https://github.com/floodyberry/poly1305-donna
+ */
+
+#ifndef POLY1305_H
+#define POLY1305_H
+
+#include <sys/types.h>
+typedef unsigned char u_char;
+typedef unsigned int size_t;
+typedef unsigned char uint8_t;
+typedef unsigned int uint32_t;
+typedef unsigned long long uint64_t;
+
+#define POLY1305_KEYLEN		32
+#define POLY1305_TAGLEN		16
+
+void poly1305_auth(u_char out[POLY1305_TAGLEN], const u_char *m, size_t inlen,
+    const u_char key[POLY1305_KEYLEN]);
+
+#endif	/* POLY1305_H */

Modified: branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.v16.vcxproj
===================================================================
--- branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.v16.vcxproj	2021-04-17 09:52:01 UTC (rev 9211)
+++ branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.v16.vcxproj	2021-04-17 14:54:57 UTC (rev 9212)
@@ -155,6 +155,7 @@
     <ClCompile Include="chacha.c" />
     <ClCompile Include="cipher.c" />
     <ClCompile Include="cipher-3des1.c" />
+    <ClCompile Include="cipher-chachapoly-libcrypto.c" />
     <ClCompile Include="cipher-ctr.c" />
     <ClCompile Include="comp.c" />
     <ClCompile Include="crypt.c" />
@@ -178,6 +179,7 @@
     <ClCompile Include="keyfiles.c" />
     <ClCompile Include="mac.c" />
     <ClCompile Include="pkt.c" />
+    <ClCompile Include="poly1305.c" />
     <ClCompile Include="sftp.c" />
     <ClCompile Include="ssh.c" />
     <ClCompile Include="ssherr.c" />
@@ -192,6 +194,7 @@
     <ClInclude Include="buffer.h" />
     <ClInclude Include="chacha.h" />
     <ClInclude Include="cipher.h" />
+    <ClInclude Include="cipher-chachapoly.h" />
     <ClInclude Include="comp.h" />
     <ClInclude Include="config.h" />
     <ClInclude Include="crypt.h" />
@@ -211,6 +214,7 @@
     <ClInclude Include="keyfiles.h" />
     <ClInclude Include="mac.h" />
     <ClInclude Include="pkt.h" />
+    <ClInclude Include="poly1305.h" />
     <ClInclude Include="resource.h" />
     <ClInclude Include="sftp.h" />
     <ClInclude Include="ssh.h" />

Modified: branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.v16.vcxproj.filters
===================================================================
--- branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.v16.vcxproj.filters	2021-04-17 09:52:01 UTC (rev 9211)
+++ branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.v16.vcxproj.filters	2021-04-17 14:54:57 UTC (rev 9212)
@@ -19,6 +19,9 @@
     <ClCompile Include="cipher-3des1.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="cipher-chachapoly-libcrypto.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
     <ClCompile Include="cipher-ctr.c">
       <Filter>Source Files</Filter>
     </ClCompile>
@@ -91,6 +94,9 @@
     <ClCompile Include="pkt.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="poly1305.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
     <ClCompile Include="sftp.c">
       <Filter>Source Files</Filter>
     </ClCompile>
@@ -159,6 +165,9 @@
     <ClInclude Include="cipher.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="cipher-chachapoly.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
     <ClInclude Include="config.h">
       <Filter>Header Files</Filter>
     </ClInclude>
@@ -213,6 +222,9 @@
     <ClInclude Include="pkt.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="poly1305.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
     <ClInclude Include="sftp.h">
       <Filter>Header Files</Filter>
     </ClInclude>

Modified: branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.v8.vcproj
===================================================================
--- branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.v8.vcproj	2021-04-17 09:52:01 UTC (rev 9211)
+++ branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.v8.vcproj	2021-04-17 14:54:57 UTC (rev 9212)
@@ -236,6 +236,10 @@
 				>
 			</File>
 			<File
+				RelativePath="cipher-chachapoly.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\teraterm\common\codeconv.h"
 				>
 			</File>
@@ -316,6 +320,10 @@
 				>
 			</File>
 			<File
+				RelativePath="poly1305.h"
+				>
+			</File>
+			<File
 				RelativePath="resource.h"
 				>
 			</File>
@@ -376,6 +384,10 @@
 				>
 			</File>
 			<File
+				RelativePath="cipher-chachapoly-libcrypto.c"
+				>
+			</File>
+			<File
 				RelativePath="cipher-ctr.c"
 				>
 			</File>
@@ -488,6 +500,10 @@
 				>
 			</File>
 			<File
+				RelativePath="poly1305.c"
+				>
+			</File>
+			<File
 				RelativePath="sftp.c"
 				>
 			</File>


Ttssh2-commit メーリングリストの案内
Back to archive index