~mdw
/
secnet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
serpent: const-correct
[secnet]
/
serpent.c
diff --git
a/serpent.c
b/serpent.c
index
e41f3ce
..
34ef6aa
100644
(file)
--- a/
serpent.c
+++ b/
serpent.c
@@
-26,9
+26,10
@@
#include "serpentsboxes.h"
void serpent_makekey(struct keyInstance *key, int keyLen,
#include "serpentsboxes.h"
void serpent_makekey(struct keyInstance *key, int keyLen,
- uint8_t *keyMaterial)
+
const
uint8_t *keyMaterial)
{
{
- uint32_t i,j;
+ int i;
+ uint32_t j;
uint32_t w[132],k[132];
for(i=0; i<keyLen/32; i++)
uint32_t w[132],k[132];
for(i=0; i<keyLen/32; i++)
@@
-85,7
+86,7
@@
void serpent_makekey(struct keyInstance *key, int keyLen,
}
void serpent_encrypt(struct keyInstance *key,
}
void serpent_encrypt(struct keyInstance *key,
- uint8_t plaintext[16],
+
const
uint8_t plaintext[16],
uint8_t ciphertext[16])
{
register uint32_t x0, x1, x2, x3;
uint8_t ciphertext[16])
{
register uint32_t x0, x1, x2, x3;
@@
-203,7
+204,7
@@
void serpent_encrypt(struct keyInstance *key,
}
void serpent_decrypt(struct keyInstance *key,
}
void serpent_decrypt(struct keyInstance *key,
- uint8_t ciphertext[16],
+
const
uint8_t ciphertext[16],
uint8_t plaintext[16])
{
register uint32_t x0, x1, x2, x3;
uint8_t plaintext[16])
{
register uint32_t x0, x1, x2, x3;