summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--mac.c15
-rw-r--r--myproposal.h3
-rw-r--r--ssh.16
-rw-r--r--ssh_config.56
-rw-r--r--sshd.86
-rw-r--r--sshd_config.56
-rw-r--r--umac.h8
8 files changed, 38 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index e4899f36e..cb28e777d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,9 @@
28 - djm@cvs.openbsd.org 2012/10/02 07:07:45 28 - djm@cvs.openbsd.org 2012/10/02 07:07:45
29 [ssh-keygen.c] 29 [ssh-keygen.c]
30 fix -z option, broken in revision 1.215 30 fix -z option, broken in revision 1.215
31 - markus@cvs.openbsd.org 2012/10/04 13:21:50
32 [myproposal.h ssh_config.5 umac.h sshd_config.5 ssh.1 sshd.8 mac.c]
33 add umac128 variant; ok djm@ at n2k12
31 34
3220120917 3520120917
33 - (dtucker) OpenBSD CVS Sync 36 - (dtucker) OpenBSD CVS Sync
diff --git a/mac.c b/mac.c
index 9b450e4e2..47db127f5 100644
--- a/mac.c
+++ b/mac.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: mac.c,v 1.18 2012/06/28 05:07:45 dtucker Exp $ */ 1/* $OpenBSD: mac.c,v 1.19 2012/10/04 13:21:50 markus Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 * 4 *
@@ -48,6 +48,7 @@
48 48
49#define SSH_EVP 1 /* OpenSSL EVP-based MAC */ 49#define SSH_EVP 1 /* OpenSSL EVP-based MAC */
50#define SSH_UMAC 2 /* UMAC (not integrated with OpenSSL) */ 50#define SSH_UMAC 2 /* UMAC (not integrated with OpenSSL) */
51#define SSH_UMAC128 3
51 52
52struct { 53struct {
53 char *name; 54 char *name;
@@ -68,6 +69,7 @@ struct {
68 { "hmac-ripemd160", SSH_EVP, EVP_ripemd160, 0, -1, -1 }, 69 { "hmac-ripemd160", SSH_EVP, EVP_ripemd160, 0, -1, -1 },
69 { "hmac-ripemd160@openssh.com", SSH_EVP, EVP_ripemd160, 0, -1, -1 }, 70 { "hmac-ripemd160@openssh.com", SSH_EVP, EVP_ripemd160, 0, -1, -1 },
70 { "umac-64@openssh.com", SSH_UMAC, NULL, 0, 128, 64 }, 71 { "umac-64@openssh.com", SSH_UMAC, NULL, 0, 128, 64 },
72 { "umac-128@openssh.com", SSH_UMAC128, NULL, 0, 128, 128 },
71 { NULL, 0, NULL, 0, -1, -1 } 73 { NULL, 0, NULL, 0, -1, -1 }
72}; 74};
73 75
@@ -122,6 +124,9 @@ mac_init(Mac *mac)
122 case SSH_UMAC: 124 case SSH_UMAC:
123 mac->umac_ctx = umac_new(mac->key); 125 mac->umac_ctx = umac_new(mac->key);
124 return 0; 126 return 0;
127 case SSH_UMAC128:
128 mac->umac_ctx = umac128_new(mac->key);
129 return 0;
125 default: 130 default:
126 return -1; 131 return -1;
127 } 132 }
@@ -151,6 +156,11 @@ mac_compute(Mac *mac, u_int32_t seqno, u_char *data, int datalen)
151 umac_update(mac->umac_ctx, data, datalen); 156 umac_update(mac->umac_ctx, data, datalen);
152 umac_final(mac->umac_ctx, m, nonce); 157 umac_final(mac->umac_ctx, m, nonce);
153 break; 158 break;
159 case SSH_UMAC128:
160 put_u64(nonce, seqno);
161 umac128_update(mac->umac_ctx, data, datalen);
162 umac128_final(mac->umac_ctx, m, nonce);
163 break;
154 default: 164 default:
155 fatal("mac_compute: unknown MAC type"); 165 fatal("mac_compute: unknown MAC type");
156 } 166 }
@@ -163,6 +173,9 @@ mac_clear(Mac *mac)
163 if (mac->type == SSH_UMAC) { 173 if (mac->type == SSH_UMAC) {
164 if (mac->umac_ctx != NULL) 174 if (mac->umac_ctx != NULL)
165 umac_delete(mac->umac_ctx); 175 umac_delete(mac->umac_ctx);
176 } else if (mac->type == SSH_UMAC128) {
177 if (mac->umac_ctx != NULL)
178 umac128_delete(mac->umac_ctx);
166 } else if (mac->evp_md != NULL) 179 } else if (mac->evp_md != NULL)
167 HMAC_cleanup(&mac->evp_ctx); 180 HMAC_cleanup(&mac->evp_ctx);
168 mac->evp_md = NULL; 181 mac->evp_md = NULL;
diff --git a/myproposal.h b/myproposal.h
index b9b819c0a..996c40765 100644
--- a/myproposal.h
+++ b/myproposal.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: myproposal.h,v 1.29 2012/06/28 05:07:45 dtucker Exp $ */ 1/* $OpenBSD: myproposal.h,v 1.30 2012/10/04 13:21:50 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -86,6 +86,7 @@
86 "hmac-md5," \ 86 "hmac-md5," \
87 "hmac-sha1," \ 87 "hmac-sha1," \
88 "umac-64@openssh.com," \ 88 "umac-64@openssh.com," \
89+ "umac-128@openssh.com," \
89 SHA2_HMAC_MODES \ 90 SHA2_HMAC_MODES \
90 "hmac-ripemd160," \ 91 "hmac-ripemd160," \
91 "hmac-ripemd160@openssh.com," \ 92 "hmac-ripemd160@openssh.com," \
diff --git a/ssh.1 b/ssh.1
index e9bf3eaca..a5576edb6 100644
--- a/ssh.1
+++ b/ssh.1
@@ -33,8 +33,8 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: ssh.1,v 1.329 2012/09/26 16:12:13 jmc Exp $ 36.\" $OpenBSD: ssh.1,v 1.330 2012/10/04 13:21:50 markus Exp $
37.Dd $Mdocdate: September 26 2012 $ 37.Dd $Mdocdate: October 4 2012 $
38.Dt SSH 1 38.Dt SSH 1
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -674,7 +674,7 @@ it provides additional mechanisms for confidentiality
674(the traffic is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour) 674(the traffic is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour)
675and integrity (hmac-md5, hmac-sha1, 675and integrity (hmac-md5, hmac-sha1,
676hmac-sha2-256, hmac-sha2-512, 676hmac-sha2-256, hmac-sha2-512,
677umac-64, hmac-ripemd160). 677umac-64, umac-128, hmac-ripemd160).
678Protocol 1 lacks a strong mechanism for ensuring the 678Protocol 1 lacks a strong mechanism for ensuring the
679integrity of the connection. 679integrity of the connection.
680.Pp 680.Pp
diff --git a/ssh_config.5 b/ssh_config.5
index 36b1af195..d3e801df0 100644
--- a/ssh_config.5
+++ b/ssh_config.5
@@ -33,8 +33,8 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: ssh_config.5,v 1.157 2012/06/29 13:57:25 naddy Exp $ 36.\" $OpenBSD: ssh_config.5,v 1.158 2012/10/04 13:21:50 markus Exp $
37.Dd $Mdocdate: June 29 2012 $ 37.Dd $Mdocdate: October 4 2012 $
38.Dt SSH_CONFIG 5 38.Dt SSH_CONFIG 5
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -792,7 +792,7 @@ for data integrity protection.
792Multiple algorithms must be comma-separated. 792Multiple algorithms must be comma-separated.
793The default is: 793The default is:
794.Bd -literal -offset indent 794.Bd -literal -offset indent
795hmac-md5,hmac-sha1,umac-64@openssh.com, 795hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,
796hmac-sha2-256,hmac-sha2-512,hmac-ripemd160, 796hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,
797hmac-sha1-96,hmac-md5-96 797hmac-sha1-96,hmac-md5-96
798.Ed 798.Ed
diff --git a/sshd.8 b/sshd.8
index a1a74d86a..132397839 100644
--- a/sshd.8
+++ b/sshd.8
@@ -33,8 +33,8 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: sshd.8,v 1.266 2012/06/18 12:07:07 dtucker Exp $ 36.\" $OpenBSD: sshd.8,v 1.267 2012/10/04 13:21:50 markus Exp $
37.Dd $Mdocdate: June 18 2012 $ 37.Dd $Mdocdate: October 4 2012 $
38.Dt SSHD 8 38.Dt SSHD 8
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -316,7 +316,7 @@ The client selects the encryption algorithm
316to use from those offered by the server. 316to use from those offered by the server.
317Additionally, session integrity is provided 317Additionally, session integrity is provided
318through a cryptographic message authentication code 318through a cryptographic message authentication code
319(hmac-md5, hmac-sha1, umac-64, hmac-ripemd160, 319(hmac-md5, hmac-sha1, umac-64, umac-128, hmac-ripemd160,
320hmac-sha2-256 or hmac-sha2-512). 320hmac-sha2-256 or hmac-sha2-512).
321.Pp 321.Pp
322Finally, the server and the client enter an authentication dialog. 322Finally, the server and the client enter an authentication dialog.
diff --git a/sshd_config.5 b/sshd_config.5
index 314ecfb0e..987558ae8 100644
--- a/sshd_config.5
+++ b/sshd_config.5
@@ -33,8 +33,8 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: sshd_config.5,v 1.144 2012/06/29 13:57:25 naddy Exp $ 36.\" $OpenBSD: sshd_config.5,v 1.145 2012/10/04 13:21:50 markus Exp $
37.Dd $Mdocdate: June 29 2012 $ 37.Dd $Mdocdate: October 4 2012 $
38.Dt SSHD_CONFIG 5 38.Dt SSHD_CONFIG 5
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -656,7 +656,7 @@ for data integrity protection.
656Multiple algorithms must be comma-separated. 656Multiple algorithms must be comma-separated.
657The default is: 657The default is:
658.Bd -literal -offset indent 658.Bd -literal -offset indent
659hmac-md5,hmac-sha1,umac-64@openssh.com, 659hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,
660hmac-sha2-256,hmac-sha2-512,hmac-ripemd160, 660hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,
661hmac-sha1-96,hmac-md5-96 661hmac-sha1-96,hmac-md5-96
662.Ed 662.Ed
diff --git a/umac.h b/umac.h
index 055c705f8..6795112a3 100644
--- a/umac.h
+++ b/umac.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: umac.h,v 1.1 2007/06/07 19:37:34 pvalchev Exp $ */ 1/* $OpenBSD: umac.h,v 1.2 2012/10/04 13:21:50 markus Exp $ */
2/* ----------------------------------------------------------------------- 2/* -----------------------------------------------------------------------
3 * 3 *
4 * umac.h -- C Implementation UMAC Message Authentication 4 * umac.h -- C Implementation UMAC Message Authentication
@@ -116,6 +116,12 @@ int uhash(uhash_ctx_t ctx,
116 116
117#endif 117#endif
118 118
119/* matching umac-128 API, we reuse umac_ctx, since it's opaque */
120struct umac_ctx *umac128_new(u_char key[]);
121int umac128_update(struct umac_ctx *ctx, u_char *input, long len);
122int umac128_final(struct umac_ctx *ctx, u_char tag[], u_char nonce[8]);
123int umac128_delete(struct umac_ctx *ctx);
124
119#ifdef __cplusplus 125#ifdef __cplusplus
120 } 126 }
121#endif 127#endif