summaryrefslogtreecommitdiff
path: root/rijndael.h
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-03-30 14:49:51 -0700
committerAdam Langley <agl@google.com>2015-04-07 17:50:50 -0700
commitd059297112922cabb0c674840589be8db821fd9a (patch)
tree9c2045d28ec1c8594090f38bc32e9f523dc6c68d /rijndael.h
parentf5c67b478bef9992de9e9ec91ce10af4f6205e0d (diff)
external/openssh: update to 6.8p1.
In preparation for some updates to external/openssh to make it work with BoringSSL, this change updates the code to a recent version. The current version (5.9p1) is coming up on four years old now. * Confirmed that f5c67b478bef9992de9e9ec91ce10af4f6205e0d matches OpenSSH 5.9p1 exactly (save for the removal of the scard subdirectory). * Downloaded openssh-6.8p1.tar.gz (SHA256: 3ff64ce73ee124480b5bf767b9830d7d3c03bbcb6abe716b78f0192c37ce160e) and verified with PGP signature. (I've verified Damien's key in person previously.) * Applied changes between f5c67b478bef9992de9e9ec91ce10af4f6205e0d and OpenSSH 5.9p1 to 6.8p1 and updated the build as best I can. The ugliest change is probably the duplication of umac.c to umac128.c because Android conditionally compiles that file twice. See the comment in those files. Change-Id: I63cb07a8118afb5a377f116087a0882914cea486
Diffstat (limited to 'rijndael.h')
-rw-r--r--rijndael.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/rijndael.h b/rijndael.h
index c614bb18..53e74e0a 100644
--- a/rijndael.h
+++ b/rijndael.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rijndael.h,v 1.12 2001/12/19 07:18:56 deraadt Exp $ */
+/* $OpenBSD: rijndael.h,v 1.14 2014/04/29 15:42:07 markus Exp $ */
/**
* rijndael-alg-fst.h
@@ -25,27 +25,32 @@
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef __RIJNDAEL_H
-#define __RIJNDAEL_H
+#ifndef _PRIVATE_RIJNDAEL_H
+#define _PRIVATE_RIJNDAEL_H
-#define MAXKC (256/32)
-#define MAXKB (256/8)
-#define MAXNR 14
+#define AES_MAXKEYBITS (256)
+#define AES_MAXKEYBYTES (AES_MAXKEYBITS/8)
+/* for 256-bit keys, fewer for less */
+#define AES_MAXROUNDS 14
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
+int rijndaelKeySetupEnc(unsigned int [], const unsigned char [], int);
+void rijndaelEncrypt(const unsigned int [], int, const unsigned char [],
+ unsigned char []);
+
/* The structure for key information */
typedef struct {
int decrypt;
- int Nr; /* key-length-dependent number of rounds */
- u32 ek[4*(MAXNR + 1)]; /* encrypt key schedule */
- u32 dk[4*(MAXNR + 1)]; /* decrypt key schedule */
+ int Nr; /* key-length-dependent number of rounds */
+ u32 ek[4*(AES_MAXROUNDS + 1)]; /* encrypt key schedule */
+ u32 dk[4*(AES_MAXROUNDS + 1)]; /* decrypt key schedule */
} rijndael_ctx;
void rijndael_set_key(rijndael_ctx *, u_char *, int, int);
void rijndael_decrypt(rijndael_ctx *, u_char *, u_char *);
void rijndael_encrypt(rijndael_ctx *, u_char *, u_char *);
-#endif /* __RIJNDAEL_H */
+#endif /* _PRIVATE_RIJNDAEL_H */