Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

config.h File Reference

Configuration settings. More...

Go to the source code of this file.

Defines

#define CONF_IODATA_SIZE   256
 Max. I/O data size. More...

#define CONF_WITH_FILESYSTEM   1
 En-/disables file system. More...

#define CONF_WITH_RECORD_FILES   0
 En-/disables support for fixed record files. More...

#define CONF_WITH_TRANSACTIONS   1
 En-/disables transactions. More...

#define CONF_WITH_TESTCMDS   1
 En-/disables test commands. More...

#define CONF_WITH_DELETECMD   1
 En-/disables DELETE. More...

#define CONF_WITH_CREATECMD   1
 En-/disables CREATE. More...

#define CONF_WITH_PINAUTH   1
 En-/disables PIN authentication functions. More...

#define CONF_WITH_PINCMDS   1
 En-/disables PIN commands. More...

#define CONF_WITH_KEYAUTH   1
 En-/disables key authentication functions. More...

#define CONF_WITH_KEYCMDS   1
 En-/disables key related commands. More...

#define CONF_WITH_I2CEEPROM   1
 En-/disables support for the external I2C EEPROM. More...

#define CONF_WITH_DECRYPT   1
 En-/disables support for decryption. More...

#define CONF_WITH_LOGGING   1
 En-/disables support for logging. More...

#define CONF_WITH_RETCODEMGR   0
 En-/disables return code manager. More...

#define CONF_WITH_FUNNY   0
 En-/disables funny commands. More...

#define CONF_WITH_TRNG   0
 En-/disables true random generator. Highly experimental!. More...

#define CONF_WITH_CRYPT_ALGO   0
 Set crypto algorithm. More...

#define CARD_STATE_ADDR   0x0000
 EEPROM address of the state of the card. More...

#define ATR_LEN_ADDR   (CARD_STATE_ADDR+1)
 EEPROM address of the ATR length. More...

#define ATR_MAXLEN   28
 Max. length of the ATR. More...

#define ATR_ADDR   (ATR_LEN_ADDR+1)
 EEPROM address of the ATR. More...

#define SERNUM_ADDR   (ATR_ADDR+ATR_MAXLEN)
 EEPROM address of the serial number of the card. More...

#define SERNUM_LEN   8
 Length of the serial number. More...

#define RAND_STATE_ADDR   (SERNUM_ADDR+SERNUM_LEN)
 EEPROM address of the state of the PRNG. More...

#define RAND_STATE_LEN   8+8+16
 Length of the state of the PRNG. (Counter[8], State[8], Key[16]). More...

#define TRANSAC_STATE_ADDR   (RAND_STATE_ADDR+RAND_STATE_LEN)
 EEPROM address of the transaction state. More...

#define TRANSAC_DATA_ADDR   (TRANSAC_STATE_ADDR+1)
 EEPROM address of the transaction data. More...

#define TRANSAC_DATA_LEN   19
 Length of the transaction data. More...

#define ADM_KEY_LEN   16
 Length of the External Authentication key. More...

#define INT_KEY_LEN   16
 Length of the Internal Authentication key. More...

#define PIN_LEN   8
 Length of the PIN. More...

#define PUK_LEN   8
 Length of the PUK. More...

#define DATA_END_1   (TRANSAC_DATA_ADDR+TRANSAC_DATA_LEN)
 Dummy address to handle the ifdefs here. More...

#define FS_START_PTR_ADDR   DATA_END_1
 EEPROM address of pointer to the file system start. More...

#define ENDIAN_LITTLE
 This is a little endian architecture. More...

#define EEPROM_SIZE   0x200
 Size of the internal EEPROM. More...

#define RAM_SIZE   0x200
 Size of the RAM. More...

#define CHIP   0x01
 Chip ID. More...

#define ESIZ   0x03
 External EEPROM ID. More...

#define ARCH   avr2
 AVR architecture. Needed for assembler. More...


Detailed Description

Configuration settings.

Id:
config.h,v 1.28 2003/05/10 17:26:58 m Exp


Define Documentation

#define ADM_KEY_LEN   16
 

Length of the External Authentication key.

#define ARCH   avr2
 

AVR architecture. Needed for assembler.

#define ATR_ADDR   (ATR_LEN_ADDR+1)
 

EEPROM address of the ATR.

#define ATR_LEN_ADDR   (CARD_STATE_ADDR+1)
 

EEPROM address of the ATR length.

#define ATR_MAXLEN   28
 

Max. length of the ATR.

#define CARD_STATE_ADDR   0x0000
 

EEPROM address of the state of the card.

This is currently unused.

Warning: When using interrupts on the AVR, this byte may accidently be changed. See errata sheets of AVR.

#define CHIP   0x01
 

Chip ID.

#define CONF_IODATA_SIZE   256
 

Max. I/O data size.

#define CONF_WITH_CREATECMD   1
 

En-/disables CREATE.

#define CONF_WITH_CRYPT_ALGO   0
 

Set crypto algorithm.

  • 0: TEA
    • 1: Skipjack
    • 2: NEWDES-SK

#define CONF_WITH_DECRYPT   1
 

En-/disables support for decryption.

If set to 1, support for decryption side of the cryptographic algorithms are included.

#define CONF_WITH_DELETECMD   1
 

En-/disables DELETE.

#define CONF_WITH_FILESYSTEM   1
 

En-/disables file system.

Todo:
Make this define something happen.

#define CONF_WITH_FUNNY   0
 

En-/disables funny commands.

If set to 1, funny commands are included.

#define CONF_WITH_I2CEEPROM   1
 

En-/disables support for the external I2C EEPROM.

#define CONF_WITH_KEYAUTH   1
 

En-/disables key authentication functions.

If set to 1, functions impelementing calculations with challenges are included. This is a requirement for CONF_WITH_KEY_CMDS.

#define CONF_WITH_KEYCMDS   1
 

En-/disables key related commands.

If set to 1, commands EXTERNAL KEYENTIFICATION, GET CHALLENGE, INTERNAL KEYENTIFICATION and VERIFY KEY are included.

#define CONF_WITH_LOGGING   1
 

En-/disables support for logging.

If set to 1, support for logging is included.

#define CONF_WITH_PINAUTH   1
 

En-/disables PIN authentication functions.

If set to 1, functions to set and test PIN and PUK are included. This is a requirement for CONF_WITH_PINCMDS.

#define CONF_WITH_PINCMDS   1
 

En-/disables PIN commands.

If set to 1, commands CHANGE PIN and VERIFY PIN are included.

#define CONF_WITH_RECORD_FILES   0
 

En-/disables support for fixed record files.

#define CONF_WITH_RETCODEMGR   0
 

En-/disables return code manager.

If set to 1, the return code manager is included. This increases code size on the AVR.

#define CONF_WITH_TESTCMDS   1
 

En-/disables test commands.

If set to 1, commands READ EEPROM and WRITE EEPROM are included.

#define CONF_WITH_TRANSACTIONS   1
 

En-/disables transactions.

#define CONF_WITH_TRNG   0
 

En-/disables true random generator. Highly experimental!.

If set to 1, a true random number generator is included. This is currently only for test purposes and highly experimental!

#define DATA_END_1   (TRANSAC_DATA_ADDR+TRANSAC_DATA_LEN)
 

Dummy address to handle the ifdefs here.

#define EEPROM_SIZE   0x200
 

Size of the internal EEPROM.

#define ENDIAN_LITTLE
 

This is a little endian architecture.

#define ESIZ   0x03
 

External EEPROM ID.

#define FS_START_PTR_ADDR   DATA_END_1
 

EEPROM address of pointer to the file system start.

#define INT_KEY_LEN   16
 

Length of the Internal Authentication key.

#define PIN_LEN   8
 

Length of the PIN.

#define PUK_LEN   8
 

Length of the PUK.

#define RAM_SIZE   0x200
 

Size of the RAM.

#define RAND_STATE_ADDR   (SERNUM_ADDR+SERNUM_LEN)
 

EEPROM address of the state of the PRNG.

#define RAND_STATE_LEN   8+8+16
 

Length of the state of the PRNG. (Counter[8], State[8], Key[16]).

#define SERNUM_ADDR   (ATR_ADDR+ATR_MAXLEN)
 

EEPROM address of the serial number of the card.

#define SERNUM_LEN   8
 

Length of the serial number.

#define TRANSAC_DATA_ADDR   (TRANSAC_STATE_ADDR+1)
 

EEPROM address of the transaction data.

#define TRANSAC_DATA_LEN   19
 

Length of the transaction data.

#define TRANSAC_STATE_ADDR   (RAND_STATE_ADDR+RAND_STATE_LEN)
 

EEPROM address of the transaction state.


Copyright 2002 by Matthias Bruestle. This is licensed under the GNU General Public License.