| Remote Access Control | |||||
This file contains the configuration options for the Remote Keyless Entry application. First, there are a set of user configurable options, then a lot of calculations based on the user configuration. Do not change the calculations unless you really know what you are doing.
Copyright (c) 2006, Atmel Corporation All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. The name of ATMEL may not be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file config.h.
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Defines | |
| #define | ASK |
| #define | BLOCK_SIZE 16 |
| #define | BPS_9600 |
| #define | BUTTON_MASK ((1<<PB1) | (1<<PB2)) |
| #define | CMAC_SUBKEY_SIZE BLOCK_SIZE |
| #define | COMMAND_CODE_BYTES 1 |
| #define | COMMAND_CODE_MAX 0xff |
| #define | COMMAND_CODE_TYPE byte |
| #define | CRC_POLY 0x8005 |
| #define | INVERTED_MANCHESTER |
| #define | KEY_BITS 128 |
| #define | KEY_SIZE 16 |
| #define | MAC_BYTES 4 |
| #define | MAX_WATCHDOG_RESETS 3 |
| #define | MESSAGE_SIZE_W_MAC (MESSAGE_SIZE_WO_MAC+MAC_BYTES) |
| #define | MESSAGE_SIZE_WO_MAC (SERIAL_NO_BYTES+COMMAND_CODE_BYTES+SERIAL_NO_BYTES) |
| #define | NOBOD |
| #define | NOWDT |
| #define | PREBURST_BYTES 16 |
| #define | ROUNDS 10 |
| #define | SCHEDULE_EXTRA (SCHEDULE_EXTRA_BLOCKS*BLOCK_SIZE) |
| #define | SCHEDULE_EXTRA_BLOCKS (SCHEDULE_SIZE_BLOCKS-SCHEDULE_SPLIT_BLOCKS) |
| #define | SCHEDULE_SIZE (SCHEDULE_SIZE_BLOCKS*BLOCK_SIZE) |
| #define | SCHEDULE_SIZE_BLOCKS (ROUNDS+1) |
| #define | SCHEDULE_SPLIT (SCHEDULE_SPLIT_BLOCKS*BLOCK_SIZE) |
| #define | SCHEDULE_SPLIT_BLOCKS 8 |
| #define | SECRET_KEY_ADDRESS (SEQ_COUNTER_ADDRESS+SEQ_COUNTER_BYTES) |
| #define | SEQ_COUNTER_ADDRESS (SERIAL_NO_ADDRESS+SERIAL_NO_BYTES) |
| #define | SEQ_COUNTER_BYTES 4 |
| #define | SEQ_COUNTER_MAX 0xffffffff |
| #define | SEQ_COUNTER_TYPE uint32_t |
| #define | SERIAL_NO_ADDRESS 0 |
| #define | SERIAL_NO_BYTES 4 |
| #define | SERIAL_NO_MAX 0xffffffff |
| #define | SERIAL_NO_TYPE uint32_t |
| #define | SHARED_KEY_ADDRESS (SECRET_KEY_ADDRESS+KEY_SIZE) |
| #define | TEACH_COMMAND ((1<<PB1) | (1<<PB2)) |
| #define BLOCK_SIZE 16 |
AES state block size in number of bytes.
Definition at line 117 of file config.h.
Referenced by calcCMAC(), calcCMACSubkey(), calcKeySchedule(), cipherLookup(), and transmitTeachMessage().
| #define BPS_9600 |
| #define BUTTON_MASK ((1<<PB1) | (1<<PB2)) |
Bitmask to use when masking out unwanted inputs when reading buttons.
Definition at line 105 of file config.h.
Referenced by pinChangeHandler(), setupPeripherals(), and sleepAndGetCommand().
| #define CMAC_SUBKEY_SIZE BLOCK_SIZE |
| #define COMMAND_CODE_BYTES 1 |
| #define COMMAND_CODE_TYPE byte |
Definition at line 178 of file config.h.
Referenced by main(), pinChangeHandler(), and sleepAndGetCommand().
| #define CRC_POLY 0x8005 |
| #define INVERTED_MANCHESTER |
| #define KEY_BITS 128 |
| #define KEY_SIZE 16 |
Key length in number of bytes.
Definition at line 124 of file config.h.
Referenced by calcKeySchedule(), and transmitTeachMessage().
| #define MAC_BYTES 4 |
Size in bytes of MAC (must be less than or equal to AES BLOCK_SIZE).
Definition at line 95 of file config.h.
Referenced by transmitCommandMessage().
| #define MAX_WATCHDOG_RESETS 3 |
Maximum number of watchdog resets before entering error loop.
Definition at line 102 of file config.h.
Referenced by handleResetFlags().
| #define MESSAGE_SIZE_W_MAC (MESSAGE_SIZE_WO_MAC+MAC_BYTES) |
| #define MESSAGE_SIZE_WO_MAC (SERIAL_NO_BYTES+COMMAND_CODE_BYTES+SERIAL_NO_BYTES) |
Message payload size in byte, excluding the MAC.
Definition at line 152 of file config.h.
Referenced by calcCMAC().
| #define NOBOD |
| #define NOWDT |
| #define PREBURST_BYTES 16 |
Number of preburst bytes for waking up the receiver. Empirical value.
Definition at line 83 of file config.h.
Referenced by transmitCommandMessage(), and transmitTeachMessage().
| #define ROUNDS 10 |
Number of rounds/iterations in algorithm.
Definition at line 123 of file config.h.
Referenced by cipherLookup().
| #define SCHEDULE_EXTRA (SCHEDULE_EXTRA_BLOCKS*BLOCK_SIZE) |
| #define SCHEDULE_EXTRA_BLOCKS (SCHEDULE_SIZE_BLOCKS-SCHEDULE_SPLIT_BLOCKS) |
| #define SCHEDULE_SIZE (SCHEDULE_SIZE_BLOCKS*BLOCK_SIZE) |
Number of bytes in precalculated key schedule.
Definition at line 138 of file config.h.
Referenced by calcKeySchedule().
| #define SCHEDULE_SIZE_BLOCKS (ROUNDS+1) |
| #define SCHEDULE_SPLIT (SCHEDULE_SPLIT_BLOCKS*BLOCK_SIZE) |
How many bytes before splitting schedule to secondary memory.
Definition at line 140 of file config.h.
Referenced by calcKeySchedule().
| #define SCHEDULE_SPLIT_BLOCKS 8 |
How many BLOCK_SIZE blocks of precalculated key schedule in SRAM (rest in EEPROM).
Definition at line 80 of file config.h.
Referenced by cipherLookup().
| #define SECRET_KEY_ADDRESS (SEQ_COUNTER_ADDRESS+SEQ_COUNTER_BYTES) |
| #define SEQ_COUNTER_ADDRESS (SERIAL_NO_ADDRESS+SERIAL_NO_BYTES) |
| #define SEQ_COUNTER_BYTES 4 |
Size in bytes of sequential counter (1, 2 or 4).
Definition at line 92 of file config.h.
Referenced by startCounterUpdate(), and transmitTeachMessage().
| #define SERIAL_NO_ADDRESS 0 |
| #define SERIAL_NO_BYTES 4 |
Size in bytes of serial number (1, 2 or 4).
Definition at line 86 of file config.h.
Referenced by transmitTeachMessage().
| #define SHARED_KEY_ADDRESS (SECRET_KEY_ADDRESS+KEY_SIZE) |
| #define TEACH_COMMAND ((1<<PB1) | (1<<PB2)) |
Generated on Fri Aug 8 11:03:24 2008 for AVR411 Secure Rolling Code Algorithm (Transmitter) by 1.4.7
|