diff options
author | Colin Watson <cjwatson@debian.org> | 2007-12-24 10:29:57 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2007-12-24 10:29:57 +0000 |
commit | c3e531b12b2335b7fa5a6bcc9a309d3c523ff64b (patch) | |
tree | b72c0867348e7e7914d64af6fc5e25c728922e03 /umac.h | |
parent | 6b222fdf3cb54c11a446df38e027fe7acf2220cb (diff) | |
parent | 70847d299887abb96f8703ca99db6d817b78960e (diff) |
* New upstream release (closes: #453367).
- CVE-2007-4752: Prevent ssh(1) from using a trusted X11 cookie if
creation of an untrusted cookie fails; found and fixed by Jan Pechanec
(closes: #444738).
- sshd(8) in new installations defaults to SSH Protocol 2 only. Existing
installations are unchanged.
- The SSH channel window size has been increased, and both ssh(1)
sshd(8) now send window updates more aggressively. These improves
performance on high-BDP (Bandwidth Delay Product) networks.
- ssh(1) and sshd(8) now preserve MAC contexts between packets, which
saves 2 hash calls per packet and results in 12-16% speedup for
arcfour256/hmac-md5.
- A new MAC algorithm has been added, UMAC-64 (RFC4418) as
"umac-64@openssh.com". UMAC-64 has been measured to be approximately
20% faster than HMAC-MD5.
- Failure to establish a ssh(1) TunnelForward is now treated as a fatal
error when the ExitOnForwardFailure option is set.
- ssh(1) returns a sensible exit status if the control master goes away
without passing the full exit status.
- When using a ProxyCommand in ssh(1), set the outgoing hostname with
gethostname(2), allowing hostbased authentication to work.
- Make scp(1) skip FIFOs rather than hanging (closes: #246774).
- Encode non-printing characters in scp(1) filenames. These could cause
copies to be aborted with a "protocol error".
- Handle SIGINT in sshd(8) privilege separation child process to ensure
that wtmp and lastlog records are correctly updated.
- Report GSSAPI mechanism in errors, for libraries that support multiple
mechanisms.
- Improve documentation for ssh-add(1)'s -d option.
- Rearrange and tidy GSSAPI code, removing server-only code being linked
into the client.
- Delay execution of ssh(1)'s LocalCommand until after all forwardings
have been established.
- In scp(1), do not truncate non-regular files.
- Improve exit message from ControlMaster clients.
- Prevent sftp-server(8) from reading until it runs out of buffer space,
whereupon it would exit with a fatal error (closes: #365541).
- pam_end() was not being called if authentication failed
(closes: #405041).
- Manual page datestamps updated (closes: #433181).
Diffstat (limited to 'umac.h')
-rw-r--r-- | umac.h | 123 |
1 files changed, 123 insertions, 0 deletions
@@ -0,0 +1,123 @@ | |||
1 | /* $OpenBSD: umac.h,v 1.1 2007/06/07 19:37:34 pvalchev Exp $ */ | ||
2 | /* ----------------------------------------------------------------------- | ||
3 | * | ||
4 | * umac.h -- C Implementation UMAC Message Authentication | ||
5 | * | ||
6 | * Version 0.93a of rfc4418.txt -- 2006 July 14 | ||
7 | * | ||
8 | * For a full description of UMAC message authentication see the UMAC | ||
9 | * world-wide-web page at http://www.cs.ucdavis.edu/~rogaway/umac | ||
10 | * Please report bugs and suggestions to the UMAC webpage. | ||
11 | * | ||
12 | * Copyright (c) 1999-2004 Ted Krovetz | ||
13 | * | ||
14 | * Permission to use, copy, modify, and distribute this software and | ||
15 | * its documentation for any purpose and with or without fee, is hereby | ||
16 | * granted provided that the above copyright notice appears in all copies | ||
17 | * and in supporting documentation, and that the name of the copyright | ||
18 | * holder not be used in advertising or publicity pertaining to | ||
19 | * distribution of the software without specific, written prior permission. | ||
20 | * | ||
21 | * Comments should be directed to Ted Krovetz (tdk@acm.org) | ||
22 | * | ||
23 | * ---------------------------------------------------------------------- */ | ||
24 | |||
25 | /* ////////////////////// IMPORTANT NOTES ///////////////////////////////// | ||
26 | * | ||
27 | * 1) This version does not work properly on messages larger than 16MB | ||
28 | * | ||
29 | * 2) If you set the switch to use SSE2, then all data must be 16-byte | ||
30 | * aligned | ||
31 | * | ||
32 | * 3) When calling the function umac(), it is assumed that msg is in | ||
33 | * a writable buffer of length divisible by 32 bytes. The message itself | ||
34 | * does not have to fill the entire buffer, but bytes beyond msg may be | ||
35 | * zeroed. | ||
36 | * | ||
37 | * 4) Two free AES implementations are supported by this implementation of | ||
38 | * UMAC. Paulo Barreto's version is in the public domain and can be found | ||
39 | * at http://www.esat.kuleuven.ac.be/~rijmen/rijndael/ (search for | ||
40 | * "Barreto"). The only two files needed are rijndael-alg-fst.c and | ||
41 | * rijndael-alg-fst.h. | ||
42 | * Brian Gladman's version is distributed with GNU Public lisence | ||
43 | * and can be found at http://fp.gladman.plus.com/AES/index.htm. It | ||
44 | * includes a fast IA-32 assembly version. | ||
45 | * | ||
46 | /////////////////////////////////////////////////////////////////////// */ | ||
47 | #ifndef HEADER_UMAC_H | ||
48 | #define HEADER_UMAC_H | ||
49 | |||
50 | |||
51 | #ifdef __cplusplus | ||
52 | extern "C" { | ||
53 | #endif | ||
54 | |||
55 | struct umac_ctx *umac_new(u_char key[]); | ||
56 | /* Dynamically allocate a umac_ctx struct, initialize variables, | ||
57 | * generate subkeys from key. | ||
58 | */ | ||
59 | |||
60 | #if 0 | ||
61 | int umac_reset(struct umac_ctx *ctx); | ||
62 | /* Reset a umac_ctx to begin authenicating a new message */ | ||
63 | #endif | ||
64 | |||
65 | int umac_update(struct umac_ctx *ctx, u_char *input, long len); | ||
66 | /* Incorporate len bytes pointed to by input into context ctx */ | ||
67 | |||
68 | int umac_final(struct umac_ctx *ctx, u_char tag[], u_char nonce[8]); | ||
69 | /* Incorporate any pending data and the ctr value, and return tag. | ||
70 | * This function returns error code if ctr < 0. | ||
71 | */ | ||
72 | |||
73 | int umac_delete(struct umac_ctx *ctx); | ||
74 | /* Deallocate the context structure */ | ||
75 | |||
76 | #if 0 | ||
77 | int umac(struct umac_ctx *ctx, u_char *input, | ||
78 | long len, u_char tag[], | ||
79 | u_char nonce[8]); | ||
80 | /* All-in-one implementation of the functions Reset, Update and Final */ | ||
81 | #endif | ||
82 | |||
83 | /* uhash.h */ | ||
84 | |||
85 | |||
86 | #if 0 | ||
87 | typedef struct uhash_ctx *uhash_ctx_t; | ||
88 | /* The uhash_ctx structure is defined by the implementation of the */ | ||
89 | /* UHASH functions. */ | ||
90 | |||
91 | uhash_ctx_t uhash_alloc(u_char key[16]); | ||
92 | /* Dynamically allocate a uhash_ctx struct and generate subkeys using */ | ||
93 | /* the kdf and kdf_key passed in. If kdf_key_len is 0 then RC6 is */ | ||
94 | /* used to generate key with a fixed key. If kdf_key_len > 0 but kdf */ | ||
95 | /* is NULL then the first 16 bytes pointed at by kdf_key is used as a */ | ||
96 | /* key for an RC6 based KDF. */ | ||
97 | |||
98 | int uhash_free(uhash_ctx_t ctx); | ||
99 | |||
100 | int uhash_set_params(uhash_ctx_t ctx, | ||
101 | void *params); | ||
102 | |||
103 | int uhash_reset(uhash_ctx_t ctx); | ||
104 | |||
105 | int uhash_update(uhash_ctx_t ctx, | ||
106 | u_char *input, | ||
107 | long len); | ||
108 | |||
109 | int uhash_final(uhash_ctx_t ctx, | ||
110 | u_char ouput[]); | ||
111 | |||
112 | int uhash(uhash_ctx_t ctx, | ||
113 | u_char *input, | ||
114 | long len, | ||
115 | u_char output[]); | ||
116 | |||
117 | #endif | ||
118 | |||
119 | #ifdef __cplusplus | ||
120 | } | ||
121 | #endif | ||
122 | |||
123 | #endif /* HEADER_UMAC_H */ | ||