ID Chip Reader
mac3.h File Reference

Header file for ISO 9797 MAC algorithm 3 using DES encryption. More...

Go to the source code of this file.

Macros

#define CRYPTOGRAPHY_MAC3_H_
 

Functions

void des_mac3_checksum (int length, unsigned char buff[8], unsigned char *data, unsigned char *key)
 Calculates ISO 9797 MAC algorithm 3 using DES encryption with Padding Method 2, Initial Transformation 1, and Output transformation 3. More...
 

Detailed Description

Header file for ISO 9797 MAC algorithm 3 using DES encryption.

Author
Khoa Nguyen

This header file provides an API for calculating the checksum using the ISO 9797 MAC algorithm 3 with DES encryption.

Macro Definition Documentation

◆ CRYPTOGRAPHY_MAC3_H_

#define CRYPTOGRAPHY_MAC3_H_

Function Documentation

◆ des_mac3_checksum()

void des_mac3_checksum ( int  length,
unsigned char  buff[8],
unsigned char *  data,
unsigned char *  key 
)

Calculates ISO 9797 MAC algorithm 3 using DES encryption with Padding Method 2, Initial Transformation 1, and Output transformation 3.

Parameters
lengthLength of the input data.
buffBuffer to store the calculated checksum (8 bytes).
dataInput data for which the checksum is to be calculated.
keyEncryption key used in the calculation (16 bytes).