This commit is contained in:
oddos-ma
2025-06-03 11:11:52 +02:00
parent 1bb273e8ac
commit 229b250177
2 changed files with 107 additions and 0 deletions

21
tp2/spn.h Normal file
View File

@@ -0,0 +1,21 @@
#ifndef _SPN_H
#define _SPN_H
unsigned char do_perm(unsigned char w, unsigned char perm[16]);
unsigned char do_subst(unsigned char w, unsigned char subst[16]);
unsigned short encrypt(
unsigned short w,
unsigned int key,
unsigned char perm[16],
unsigned char subst[16]
);
unsigned short decrypt(
unsigned short w,
unsigned int key,
unsigned char perm[16],
unsigned char subst[16]
);
#endif