URL
https://opencores.org/ocsvn/csa/csa/trunk
[/] [csa/] [trunk/] [sw_sim/] [block_decypher.c] - Diff between revs 16 and 17
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 16 |
Rev 17 |
Line 1... |
Line 1... |
/* this file simulates the block_decypher function */
|
/* this file simulates the block_decypher function */
|
|
|
#include <stdio.h>
|
#include <stdio.h>
|
#include <string.h>
|
#include <string.h>
|
|
#include "misc.h"
|
|
|
extern void block_decypher(int *kk, unsigned char *ib, unsigned char *bd);
|
extern void block_decypher(int *kk, unsigned char *ib, unsigned char *bd);
|
|
|
int main()
|
int main()
|
{
|
{
|
int kk[57];
|
int kk[57];
|
|
int kkt[56];
|
unsigned char ib[8];
|
unsigned char ib[8];
|
unsigned char bd[8];
|
unsigned char bd[8];
|
|
READ_DATA(kkt,56*8);
|
|
memset(kk,0,sizeof kk);
|
|
memcpy(kk+1,kkt,sizeof kkt);
|
|
READ_DATA(ib,8*8);
|
|
block_decypher(kk, ib, bd);
|
|
WRITE_DATA(bd,8*8);
|
|
#ifdef DEBUG
|
|
WRITE_DATA(kkt,56*8);
|
|
WRITE_DATA(ib,8*8);
|
|
#endif
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.