Main Page | Data Structures | File List | Data Fields | Globals

fpga-auth-test.c File Reference


Detailed Description

This is a test program to test the FPGA authentatication and 3DES code.

OK this code will get a 64-bit number from /dev/urandom and a 3des key from the same place. Then it will set the secret key on the smart card to the new key read. The 64-bit number will then be encrypted using the new key and sent to the smart-card to perform the known operation. The smart card will decrypt perform a known operation and encrypt the result and send this back to the program for testing. The results will be displaied and tested.

Author:
Rod Boyce
Date:
01/12/04

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <zccri.h>
#include <zcbci.h>
#include "sec-game.h"
#include "sec-admin.h"
#include "key-game.h"
#include "key-admin.h"
#include "d3des.h"

Include dependency graph for fpga-auth-test.c:

Include dependency graph

Functions

void sec_DumpBuff (unsigned char *pabBuf, int lLen)
 Display the hex and ascii of a buffer.

void d3des_encrypt (unsigned char *pab8Data, unsigned char *pab24key)
void d3des_decrypt (unsigned char *pab8Data, unsigned char *pab24key)
int main (void)
 This is the program entry point.


Function Documentation

void d3des_decrypt unsigned char *  pab8Data,
unsigned char *  pab24key
[static]
 

Here is the call graph for this function:

void d3des_encrypt unsigned char *  pab8Data,
unsigned char *  pab24key
[static]
 

Here is the call graph for this function:

main void   ) 
 

This is the program entry point.

This is a test application to test out the basic card

Date:
01/12/04
Author:
Rod Boyce
Returns:
0

History

Here is the call graph for this function:

void sec_DumpBuff unsigned char *  pabBuf,
int  lLen
[static]
 

Display the hex and ascii of a buffer.

Given a pointer to a buffer and a length print the hex and ascii for that buffer.

Date:
23/11/04
Author:
Rod Boyce
Parameters:
pabBuf - Pointer to the buffer to print out
lLen - The number of bytes to print out


Generated on Thu Jan 20 16:17:05 2005 for Axis smart-card FPGA authentication scheme by doxygen 1.3.6