Commit b9def08e authored by Diego Elio Pettenò's avatar Diego Elio Pettenò

src: mark tables static and constant.

parent 391ba536
......@@ -763,13 +763,13 @@ static void CryptKey( int i_key_type, int i_variant,
uint8_t const *p_challenge, uint8_t *p_key )
{
/* Permutation table for challenge */
uint8_t pp_perm_challenge[3][10] =
static const uint8_t pp_perm_challenge[3][10] =
{ { 1, 3, 0, 7, 5, 2, 9, 6, 4, 8 },
{ 6, 1, 9, 3, 8, 5, 7, 4, 0, 2 },
{ 4, 0, 3, 5, 7, 2, 8, 6, 1, 9 } };
/* Permutation table for variant table for key2 and buskey */
uint8_t pp_perm_variant[2][32] =
static const uint8_t pp_perm_variant[2][32] =
{ { 0x0a, 0x08, 0x0e, 0x0c, 0x0b, 0x09, 0x0f, 0x0d,
0x1a, 0x18, 0x1e, 0x1c, 0x1b, 0x19, 0x1f, 0x1d,
0x02, 0x00, 0x06, 0x04, 0x03, 0x01, 0x07, 0x05,
......@@ -779,14 +779,14 @@ static void CryptKey( int i_key_type, int i_variant,
0x13, 0x1b, 0x17, 0x1f, 0x03, 0x0b, 0x07, 0x0f,
0x11, 0x19, 0x15, 0x1d, 0x01, 0x09, 0x05, 0x0d } };
uint8_t p_variants[32] =
static const uint8_t p_variants[32] =
{ 0xB7, 0x74, 0x85, 0xD0, 0xCC, 0xDB, 0xCA, 0x73,
0x03, 0xFE, 0x31, 0x03, 0x52, 0xE0, 0xB7, 0x42,
0x63, 0x16, 0xF2, 0x2A, 0x79, 0x52, 0xFF, 0x1B,
0x7A, 0x11, 0xCA, 0x1A, 0x9B, 0x40, 0xAD, 0x01 };
/* The "secret" key */
uint8_t p_secret[5] = { 0x55, 0xD6, 0xC4, 0xC5, 0x28 };
static const uint8_t p_secret[5] = { 0x55, 0xD6, 0xC4, 0xC5, 0x28 };
uint8_t p_bits[30], p_scratch[10], p_tmp1[5], p_tmp2[5];
uint8_t i_lfsr0_o; /* 1 bit used */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment