URL
https://opencores.org/ocsvn/csa/csa/trunk
[/] [csa/] [trunk/] [sw_sim/] [decrypt.c] - Diff between revs 24 and 34
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 24 |
Rev 34 |
|
|
|
|
/* this file simulates the decrypt function */
|
/* this file simulates the decrypt function */
|
#include <stdio.h>
|
#include <stdio.h>
|
#include <string.h>
|
#include <string.h>
|
#include "misc.h"
|
#include "misc.h"
|
#include "csa.h"
|
#include "csa.h"
|
|
|
int main()
|
int main()
|
{
|
{
|
struct key key;
|
struct key key;
|
unsigned char cws[16];
|
unsigned char cws[16];
|
unsigned char encrypted[188];
|
unsigned char encrypted[188];
|
unsigned char decrypted[188];
|
unsigned char decrypted[188];
|
READ_DATA(cws,8*16);
|
READ_DATA(cws,16);
|
READ_DATA(encrypted,188*8);
|
READ_DATA(encrypted,188);
|
set_cws(cws,&key);
|
set_cws(cws,&key);
|
decrypt(&key,encrypted,decrypted);
|
decrypt(&key,encrypted,decrypted);
|
DEBUG_OUTPUT_ARR(decrypted,64);
|
DEBUG_OUTPUT_ARR(decrypted,64);
|
WRITE_DATA(decrypted,188*8);
|
WRITE_DATA(decrypted,188);
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.