chiark / gitweb /
Static buffers: Provide new rotating static buffer macros
[secnet] / serpent.h
CommitLineData
2fe58dfd
SE
1#ifndef serpent_h
2#define serpent_h
3
4struct keyInstance {
5 uint32_t key[8]; /* The key in binary */
6 uint32_t subkeys[33][4]; /* Serpent subkeys */
7};
8
9/* Function protoypes */
10void serpent_makekey(struct keyInstance *key, int keyLen,
d357bccb 11 const uint8_t *keyMaterial);
af43f0b7
IJ
12void serpentbe_makekey(struct keyInstance *key, int keyLen,
13 const uint8_t *keyMaterial);
2fe58dfd 14
d357bccb 15void serpent_encrypt(struct keyInstance *key, const uint8_t plaintext[16],
3b83c932 16 uint8_t ciphertext[16]);
af43f0b7
IJ
17void serpentbe_encrypt(struct keyInstance *key, const uint8_t plaintext[16],
18 uint8_t ciphertext[16]);
2fe58dfd 19
d357bccb 20void serpent_decrypt(struct keyInstance *key, const uint8_t ciphertext[16],
3b83c932 21 uint8_t plaintext[16]);
af43f0b7
IJ
22void serpentbe_decrypt(struct keyInstance *key, const uint8_t ciphertext[16],
23 uint8_t plaintext[16]);
2fe58dfd
SE
24
25#endif /* serpent_h */