OpenCores
URL https://opencores.org/ocsvn/csa/csa/trunk

Subversion Repositories csa

[/] [csa/] [trunk/] [sw_sim/] [decrypt.c] - Blame information for rev 30

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 18 simon111
 
2
 
3
/*  this file simulates the decrypt function */
4
#include <stdio.h>
5
#include <string.h>
6
#include "misc.h"
7
#include "csa.h"
8
 
9
int main()
10
{
11
        struct key key;
12
        unsigned char cws[16];
13
        unsigned char encrypted[188];
14
        unsigned char decrypted[188];
15 22 simon111
        READ_DATA(cws,8*16);
16 18 simon111
        READ_DATA(encrypted,188*8);
17
        set_cws(cws,&key);
18
        decrypt(&key,encrypted,decrypted);
19 22 simon111
        DEBUG_OUTPUT_ARR(decrypted,64);
20 18 simon111
        WRITE_DATA(decrypted,188*8);
21
        return 0;
22
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.