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

Subversion Repositories csa

[/] [csa/] [trunk/] [sw_sim/] [block_decypher.c] - Blame information for rev 34

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

Line No. Rev Author Line
1 16 simon111
/* this file simulates the block_decypher function */
2
 
3
#include <stdio.h>
4
#include <string.h>
5 17 simon111
#include "misc.h"
6 16 simon111
 
7
extern void block_decypher(int *kk, unsigned char *ib, unsigned char *bd);
8
 
9
int main()
10
{
11
        int           kk[57];
12 17 simon111
        int           kkt[56];
13 16 simon111
        unsigned char ib[8];
14
        unsigned char bd[8];
15 17 simon111
        READ_DATA(kkt,56*8);
16
        memset(kk,0,sizeof kk);
17
        memcpy(kk+1,kkt,sizeof kkt);
18
        READ_DATA(ib,8*8);
19
        block_decypher(kk, ib, bd);
20
        WRITE_DATA(bd,8*8);
21
#ifdef DEBUG
22
        WRITE_DATA(kkt,56*8);
23
        WRITE_DATA(ib,8*8);
24
#endif
25 16 simon111
 
26
        return 0;
27
}

powered by: WebSVN 2.1.0

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