summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/crypto/rijndael.c10
-rw-r--r--sys/crypto/rijndael.h10
2 files changed, 10 insertions, 10 deletions
diff --git a/sys/crypto/rijndael.c b/sys/crypto/rijndael.c
index 1edca913680..ab61c77f295 100644
--- a/sys/crypto/rijndael.c
+++ b/sys/crypto/rijndael.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rijndael.c,v 1.18 2005/05/25 05:47:53 markus Exp $ */
+/* $OpenBSD: rijndael.c,v 1.19 2008/06/09 07:49:45 djm Exp $ */
/**
* rijndael-alg-fst.c
@@ -1221,7 +1221,7 @@ rijndaelDecrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 ct[16],
/* setup key context for encryption only */
int
-rijndael_set_key_enc_only(rijndael_ctx *ctx, u_char *key, int bits)
+rijndael_set_key_enc_only(rijndael_ctx *ctx, const u_char *key, int bits)
{
int rounds;
@@ -1237,7 +1237,7 @@ rijndael_set_key_enc_only(rijndael_ctx *ctx, u_char *key, int bits)
/* setup key context for both encryption and decryption */
int
-rijndael_set_key(rijndael_ctx *ctx, u_char *key, int bits)
+rijndael_set_key(rijndael_ctx *ctx, const u_char *key, int bits)
{
int rounds;
@@ -1254,13 +1254,13 @@ rijndael_set_key(rijndael_ctx *ctx, u_char *key, int bits)
}
void
-rijndael_decrypt(rijndael_ctx *ctx, u_char *src, u_char *dst)
+rijndael_decrypt(rijndael_ctx *ctx, const u_char *src, u_char *dst)
{
rijndaelDecrypt(ctx->dk, ctx->Nr, src, dst);
}
void
-rijndael_encrypt(rijndael_ctx *ctx, u_char *src, u_char *dst)
+rijndael_encrypt(rijndael_ctx *ctx, const u_char *src, u_char *dst)
{
rijndaelEncrypt(ctx->ek, ctx->Nr, src, dst);
}
diff --git a/sys/crypto/rijndael.h b/sys/crypto/rijndael.h
index f9811956f44..845d23076da 100644
--- a/sys/crypto/rijndael.h
+++ b/sys/crypto/rijndael.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rijndael.h,v 1.12 2007/05/27 05:43:17 tedu Exp $ */
+/* $OpenBSD: rijndael.h,v 1.13 2008/06/09 07:49:45 djm Exp $ */
/**
* rijndael-alg-fst.h
@@ -45,10 +45,10 @@ typedef struct {
u32 dk[4*(AES_MAXROUNDS + 1)]; /* decrypt key schedule */
} rijndael_ctx;
-int rijndael_set_key(rijndael_ctx *, u_char *, int);
-int rijndael_set_key_enc_only(rijndael_ctx *, u_char *, int);
-void rijndael_decrypt(rijndael_ctx *, u_char *, u_char *);
-void rijndael_encrypt(rijndael_ctx *, u_char *, u_char *);
+int rijndael_set_key(rijndael_ctx *, const u_char *, int);
+int rijndael_set_key_enc_only(rijndael_ctx *, const u_char *, int);
+void rijndael_decrypt(rijndael_ctx *, const u_char *, u_char *);
+void rijndael_encrypt(rijndael_ctx *, const u_char *, u_char *);
int rijndaelKeySetupEnc(unsigned int [], const unsigned char [], int);
int rijndaelKeySetupDec(unsigned int [], const unsigned char [], int);