Alarm Sensor Module  0.1
⇒ back to Project Page
encryption_keys.h
Go to the documentation of this file.
1 
2 /****************************************************************************/
33 #ifndef ENCRYPTION_KEYS_H_INCLUDED
34 #define ENCRYPTION_KEYS_H_INCLUDED
35 
36 #include "compat_definitions.h"
37 
38 
39 
40 /******************************************
41  \internal
42  General Definitions
43 *******************************************/
44 
45 // keys generated from random numbers
46 // bash command for 32 Bit values: od -A n -t x -N 4 /dev/urandom
47 // or use the script "generate_keys" from directory "utils"
48 
49 // 16 Keys --> 256 Bit encryption
50 
51 #define NUMBER_OF_SYM_KEYS 16
52 
53 
54 /******************************************
55  \internal
56  Compatibility
57 *******************************************/
58 
59 #if defined(STM32)
60 
61 #define SYM_KEY_TAB1 sym_key_tab1
62 #define SYM_KEY_TAB2 sym_key_tab2
63 #define SYM_KEY_TAB3 sym_key_tab3
64 #define SYM_KEY_TAB4 sym_key_tab4
65 #define SYM_KEY_TAB5 sym_key_tab5
66 #define SYM_KEY_TAB6 sym_key_tab6
67 #define SYM_KEY_TAB7 sym_key_tab7
68 #define SYM_KEY_TAB8 sym_key_tab8
69 #define SYM_KEY_TAB9 sym_key_tab9
70 #define SYM_KEY_TAB10 sym_key_tab10
71 #define SYM_KEY_TAB11 sym_key_tab11
72 #define SYM_KEY_TAB12 sym_key_tab12
73 #define SYM_KEY_TAB13 sym_key_tab13
74 #define SYM_KEY_TAB14 sym_key_tab14
75 #define SYM_KEY_TAB15 sym_key_tab15
76 #define SYM_KEY_TAB16 sym_key_tab16
77 #define SYM_KEY_TAB17 sym_key_tab17
78 #define SYM_KEY_TAB18 sym_key_tab18
79 #define SYM_KEY_TAB19 sym_key_tab19
80 #define SYM_KEY_TAB20 sym_key_tab20
81 #define SYM_KEY_TAB21 sym_key_tab21
82 
83 #else
84 
85 #define SYM_KEY_TAB1 sym_key_tab
86 #define SYM_KEY_TAB2 sym_key_tab
87 #define SYM_KEY_TAB3 sym_key_tab
88 #define SYM_KEY_TAB4 sym_key_tab
89 #define SYM_KEY_TAB5 sym_key_tab
90 #define SYM_KEY_TAB6 sym_key_tab
91 #define SYM_KEY_TAB7 sym_key_tab
92 #define SYM_KEY_TAB8 sym_key_tab
93 #define SYM_KEY_TAB9 sym_key_tab
94 #define SYM_KEY_TAB10 sym_key_tab
95 #define SYM_KEY_TAB11 sym_key_tab
96 #define SYM_KEY_TAB12 sym_key_tab
97 #define SYM_KEY_TAB13 sym_key_tab
98 #define SYM_KEY_TAB14 sym_key_tab
99 #define SYM_KEY_TAB15 sym_key_tab
100 #define SYM_KEY_TAB16 sym_key_tab
101 #define SYM_KEY_TAB17 sym_key_tab
102 #define SYM_KEY_TAB18 sym_key_tab
103 #define SYM_KEY_TAB19 sym_key_tab
104 #define SYM_KEY_TAB20 sym_key_tab
105 #define SYM_KEY_TAB21 sym_key_tab
106 
107 #endif
108 
109 
110 /******************************************
111  \internal
112  Constant definitions
113 *******************************************/
114 
115 
116 #if defined(STM32) || ALARM_SENSOR_ID == 1
117 
118 const uint32_t SYM_KEY_TAB1[NUMBER_OF_SYM_KEYS] PROGMEM = {
119 0xac2543db,
120 0x24366dba,
121 0xe0a9f833,
122 0x8039917b,
123 0xeabf90bb,
124 0xa9126435,
125 0x74439288,
126 0xc4c4d31c,
127 0x04149fdc,
128 0x754f401a,
129 0x106d18fe,
130 0x2cf98808,
131 0xd705c179,
132 0xfce8f1c1,
133 0x84a752d5,
134 0x378d51a3
135 };
136 
137 #endif
138 
139 
140 #if defined(STM32) || ALARM_SENSOR_ID == 2
141 
142 const uint32_t SYM_KEY_TAB2[NUMBER_OF_SYM_KEYS] PROGMEM = {
143 0xac3cc591,
144 0x81850e5e,
145 0x38b07a95,
146 0xb748faa7,
147 0x36ecf1d5,
148 0x75b71edd,
149 0x5a0bb4dd,
150 0x4e31aad2,
151 0xbcfbf630,
152 0x2de4515e,
153 0xb398be67,
154 0x9d1fd5eb,
155 0x4b050fca,
156 0x8edd83c1,
157 0x703cd26f,
158 0xcab97052
159 };
160 
161 #endif
162 
163 
164 #if defined(STM32) || ALARM_SENSOR_ID == 3
165 
166 const uint32_t SYM_KEY_TAB3[NUMBER_OF_SYM_KEYS] PROGMEM = {
167 0x853c643e,
168 0x8bf1bf2e,
169 0x80ef8521,
170 0xe8da1f3c,
171 0xf26ed5d2,
172 0xe0fae219,
173 0xdac405a9,
174 0xc13cc46b,
175 0x01864034,
176 0xb24e8ddf,
177 0x9af2297d,
178 0x464c92e6,
179 0x4b9830c2,
180 0xe187b86d,
181 0x3800577b,
182 0x96ad3fd3
183 };
184 
185 #endif
186 
187 
188 #if defined(STM32) || ALARM_SENSOR_ID == 4
189 
190 const uint32_t SYM_KEY_TAB4[NUMBER_OF_SYM_KEYS] PROGMEM = {
191 0x851f985e,
192 0xbbdc9961,
193 0xe274c1f1,
194 0xba026f38,
195 0xc7614fc7,
196 0xd02d3e57,
197 0x7afdeae1,
198 0x3acaf7c5,
199 0x9d971d26,
200 0xb4a2d1ee,
201 0x0addf4bf,
202 0xdec553f3,
203 0x5b2561f8,
204 0x3cd8c980,
205 0x6c368bbb,
206 0xbfb42e83
207 };
208 
209 #endif
210 
211 
212 #if defined(STM32) || ALARM_SENSOR_ID == 5
213 
214 const uint32_t SYM_KEY_TAB5[NUMBER_OF_SYM_KEYS] PROGMEM = {
215 0xfc47f486,
216 0xebf5a22f,
217 0x90fb8534,
218 0x5310c3ac,
219 0xb1f09ad2,
220 0xa0e8aab4,
221 0xf00142d7,
222 0xf6102016,
223 0x768e55a3,
224 0xb7ca871d,
225 0x9b24f06a,
226 0x8d9c9098,
227 0x7a866e0c,
228 0x6d333018,
229 0x540bf876,
230 0x03c68c4c
231 };
232 
233 #endif
234 
235 
236 
237 #if defined(STM32) || ALARM_SENSOR_ID == 6
238 
239 const uint32_t SYM_KEY_TAB6[NUMBER_OF_SYM_KEYS] PROGMEM = {
240 0xc793a867,
241 0x8ea8f420,
242 0xccc23898,
243 0x36f98cf2,
244 0x1c3b62b1,
245 0xb593918e,
246 0x4376d4de,
247 0x413442c3,
248 0xf64e5519,
249 0xda4a5f5f,
250 0xe050ec21,
251 0x14a1331c,
252 0x9a851b36,
253 0xabe95b22,
254 0x573188ac,
255 0x6d796f57
256 };
257 
258 #endif // ALARM_SENSOR_ID
259 
260 
261 #if defined(STM32) || ALARM_SENSOR_ID == 7
262 
263 const uint32_t SYM_KEY_TAB7[NUMBER_OF_SYM_KEYS] PROGMEM = {
264 0xbe1e10b4,
265 0xf88375ba,
266 0xdff93076,
267 0xebf9299b,
268 0x26870474,
269 0x22dd2d3a,
270 0x0c721819,
271 0x3098a2f8,
272 0x4e9344c8,
273 0xa876acaf,
274 0x9f9ba1d6,
275 0x81906277,
276 0xccdeec6d,
277 0xecc2eef5,
278 0x952c9839,
279 0x41309799
280 };
281 
282 #endif
283 
284 
285 #if defined(STM32) || ALARM_SENSOR_ID == 8
286 
287 const uint32_t SYM_KEY_TAB8[NUMBER_OF_SYM_KEYS] PROGMEM = {
288 0xa938423e,
289 0x891ce4e6,
290 0x59bc2ead,
291 0x063a2353,
292 0x7406602d,
293 0x362bb524,
294 0xcda74dc7,
295 0xd6cad218,
296 0x089d7317,
297 0x8e5d9719,
298 0x1bbc22d8,
299 0x29c43347,
300 0xed1b4089,
301 0xc1aecd57,
302 0x9e337584,
303 0x1e36d4b7
304 };
305 
306 #endif
307 
308 
309 #if defined(STM32) || ALARM_SENSOR_ID == 9
310 
311 const uint32_t SYM_KEY_TAB9[NUMBER_OF_SYM_KEYS] PROGMEM = {
312 0xd0f5a797,
313 0x2ac78eb2,
314 0x1de6b969,
315 0x77cbb2cf,
316 0xf32fdfcd,
317 0x3cd56cf9,
318 0xf23a12aa,
319 0x0ca4c15d,
320 0xdf4383a9,
321 0xb772a299,
322 0xf9edb753,
323 0x58ea4399,
324 0x983eff54,
325 0xeb9f4e3c,
326 0x49dea35f,
327 0x35627cce
328 };
329 
330 #endif
331 
332 
333 #if defined(STM32) || ALARM_SENSOR_ID == 10
334 
335 const uint32_t SYM_KEY_TAB10[NUMBER_OF_SYM_KEYS] PROGMEM = {
336 0x47827f47,
337 0xc56c4128,
338 0x2e830512,
339 0xe16ae77f,
340 0x9a8138f9,
341 0xb123ca04,
342 0x18122b09,
343 0xaadd187b,
344 0xcc581832,
345 0xad3b4791,
346 0xd62269f1,
347 0x8ac9fdd8,
348 0x06f5f1e9,
349 0xf6f19b4c,
350 0xf468ec2a,
351 0x125aa23c
352 };
353 
354 #endif
355 
356 
357 #if defined(STM32) || ALARM_SENSOR_ID == 11
358 
359 const uint32_t SYM_KEY_TAB11[NUMBER_OF_SYM_KEYS] PROGMEM = {
360 0xb766b289,
361 0x85dfa1da,
362 0xdbc0fc79,
363 0x343e6411,
364 0x7bcafe45,
365 0x39416718,
366 0x0e438e84,
367 0x551ed257,
368 0xfa512fe5,
369 0xbf47099f,
370 0xccf750ee,
371 0xaddd42d0,
372 0x185efadb,
373 0xb8df36b2,
374 0x7e451eb5,
375 0x0fe2d40a
376 };
377 
378 #endif
379 
380 
381 #if defined(STM32) || ALARM_SENSOR_ID == 12
382 
383 const uint32_t SYM_KEY_TAB12[NUMBER_OF_SYM_KEYS] PROGMEM = {
384 0xaf8a7153,
385 0xc921e460,
386 0x92c939be,
387 0xe6bc1d7e,
388 0x1d060869,
389 0x90de4b19,
390 0xcb73ff3a,
391 0x9e8cc600,
392 0xf209373e,
393 0xae73e90b,
394 0xbce5b0ae,
395 0x8df3dc2a,
396 0xbfd1f457,
397 0x303f97a4,
398 0x52a0671f,
399 0x0eb75239
400 };
401 
402 #endif
403 
404 
405 #if defined(STM32) || ALARM_SENSOR_ID == 13
406 
407 const uint32_t SYM_KEY_TAB13[NUMBER_OF_SYM_KEYS] PROGMEM = {
408 0xa2931926,
409 0xd166e0ad,
410 0xc59a87dc,
411 0xe2a22fdd,
412 0x389be1b4,
413 0xd12b3aa6,
414 0x1308a0da,
415 0xea07b9f0,
416 0xd651ff9a,
417 0x10b9a19d,
418 0xdf31ce03,
419 0x7bc40a00,
420 0x7af424fc,
421 0x9ab7247c,
422 0xcf941519,
423 0x619aac03
424 };
425 
426 #endif
427 
428 
429 #if defined(STM32) || ALARM_SENSOR_ID ==14
430 
431 const uint32_t SYM_KEY_TAB14[NUMBER_OF_SYM_KEYS] PROGMEM = {
432 0x323d8f29,
433 0x7d82dff6,
434 0x61e2c4a7,
435 0xd7ed9e69,
436 0xf0bf475a,
437 0x5b879d36,
438 0x6a43f385,
439 0x4fca042c,
440 0xff8831b9,
441 0x36291183,
442 0xdece42a8,
443 0x6d0f4b03,
444 0xf3b8eadd,
445 0x2874704e,
446 0xf52a3c1c,
447 0x76d8e1f5
448 };
449 
450 #endif
451 
452 
453 #if defined(STM32) || ALARM_SENSOR_ID == 15
454 
455 const uint32_t SYM_KEY_TAB15[NUMBER_OF_SYM_KEYS] PROGMEM = {
456 0xa6ecf847,
457 0x97ec9e34,
458 0xa6bf52ba,
459 0xe0148320,
460 0x0f4ab0a7,
461 0x963f3967,
462 0x08273145,
463 0x0fae1d0b,
464 0xd2114cf1,
465 0x4a9e973f,
466 0xf2780324,
467 0x3ad2c897,
468 0xeb13e027,
469 0x84a20884,
470 0x455c1a1d,
471 0x9a9902cd
472 };
473 
474 #endif
475 
476 
477 #if defined(STM32) || ALARM_SENSOR_ID == 16
478 
479 const uint32_t SYM_KEY_TAB16[NUMBER_OF_SYM_KEYS] PROGMEM = {
480 0x2a9fb330,
481 0x5941a809,
482 0xcaa12e78,
483 0x7cf9b7c0,
484 0x323678aa,
485 0xd9f4f328,
486 0x8d3f9f12,
487 0x425bed6b,
488 0x11acd44f,
489 0x979857f9,
490 0x95a8b298,
491 0x982bb112,
492 0x79c774fc,
493 0x112a794d,
494 0xebe563b9,
495 0xd1c1c1ef
496 };
497 
498 #endif
499 
500 
501 #if defined(STM32) || ALARM_SENSOR_ID == 17
502 
503 const uint32_t SYM_KEY_TAB17[NUMBER_OF_SYM_KEYS] PROGMEM = {
504 0x44925bd3,
505 0x77eed379,
506 0xc6c86f5c,
507 0xff23288c,
508 0xf7ea163a,
509 0xd3da6f13,
510 0x8d77e5bc,
511 0xddd3072b,
512 0xce6d6a01,
513 0x5a3c3247,
514 0x711739bc,
515 0x7b6141c9,
516 0xf9468d43,
517 0x323f06cd,
518 0x99c7ccfd,
519 0x51756213
520 };
521 
522 #endif
523 
524 
525 #if defined(STM32) || ALARM_SENSOR_ID == 18
526 
527 const uint32_t SYM_KEY_TAB18[NUMBER_OF_SYM_KEYS] PROGMEM = {
528 0x3cdf4902,
529 0xf03f9382,
530 0xc3ff3d31,
531 0xc9b6f61e,
532 0x4c172d3f,
533 0xdfdb2f52,
534 0xd7394e2c,
535 0x42599321,
536 0x33260432,
537 0xeeef49d6,
538 0xe1a56a77,
539 0x7c10dccc,
540 0x884ed35a,
541 0x0c85aefc,
542 0x38189fd6,
543 0x7487fedb
544 };
545 
546 #endif
547 
548 
549 #if defined(STM32) || ALARM_SENSOR_ID == 19
550 
551 const uint32_t SYM_KEY_TAB19[NUMBER_OF_SYM_KEYS] PROGMEM = {
552 0x7c3937e5,
553 0x816d425e,
554 0xc68b8350,
555 0x7b2ecf4a,
556 0x4451449b,
557 0x663f7e51,
558 0x40f0f9b1,
559 0xf983984a,
560 0x3cb616dc,
561 0x302f12a3,
562 0xb92f6929,
563 0x511597ff,
564 0x506f66fa,
565 0x8f542f17,
566 0x34c81f9c,
567 0x0692a365
568 };
569 
570 #endif
571 
572 
573 #if defined(STM32) || ALARM_SENSOR_ID == 20
574 
575 const uint32_t SYM_KEY_TAB20[NUMBER_OF_SYM_KEYS] PROGMEM = {
576 0xcf36a157,
577 0x0d5c3805,
578 0x9494167c,
579 0xe07d6c3a,
580 0xc81c6e5e,
581 0x8ce1d4f2,
582 0xcb79025c,
583 0xcce46757,
584 0x20a031cf,
585 0xe08b6d3b,
586 0x1f82f1cb,
587 0x6fb271ce,
588 0x8a61edbe,
589 0xc5e0ff98,
590 0x892609d2,
591 0x92933b54
592 };
593 
594 #endif
595 
596 
597 #if defined(STM32) || ALARM_SENSOR_ID == 21
598 
599 const uint32_t SYM_KEY_TAB21[NUMBER_OF_SYM_KEYS] PROGMEM = {
600 0xa45916e8,
601 0x2259ab13,
602 0xb731b10b,
603 0xea81a46f,
604 0x021b9367,
605 0x755d02a4,
606 0x38634856,
607 0xf89acae2,
608 0x3b268185,
609 0xd39a82e4,
610 0xd1ca31a2,
611 0xafc01c6d,
612 0xc3bf352e,
613 0xd9751b2f,
614 0xb2ca3345,
615 0x29229c51
616 };
617 
618 #endif
619 
620 
621 
622 #endif // ENCRYPTION_KEYS_H_INCLUDED
#define SYM_KEY_TAB18
#define SYM_KEY_TAB13
#define SYM_KEY_TAB2
#define SYM_KEY_TAB21
#define SYM_KEY_TAB1
#define SYM_KEY_TAB10
#define SYM_KEY_TAB6
#define SYM_KEY_TAB14
#define SYM_KEY_TAB11
#define SYM_KEY_TAB3
#define SYM_KEY_TAB19
#define SYM_KEY_TAB9
#define NUMBER_OF_SYM_KEYS
specifies the number of keys in this list
#define SYM_KEY_TAB7
#define SYM_KEY_TAB12
#define SYM_KEY_TAB5
#define SYM_KEY_TAB15
#define SYM_KEY_TAB20
#define SYM_KEY_TAB16
#define SYM_KEY_TAB4
#define SYM_KEY_TAB8
#define SYM_KEY_TAB17