Skip to content

Commit 64fda6e

Browse files
TofMassilia13320Grom-
authored andcommitted
[Core/Services] pre-commit check
1 parent f78662f commit 64fda6e

5 files changed

Lines changed: 41 additions & 41 deletions

File tree

core/stse_generic_typedef.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,10 @@ typedef enum stse_ac_change_right_t {
249249

250250
#define STSE_NIST_P_256_ID_LENGTH_SIZE 2U
251251
#define STSE_NIST_P_256_ID_LENGTH \
252-
{ 0x00, 0x08 }
252+
{0x00, 0x08}
253253
#define STSE_NIST_P_256_ID_VALUE_SIZE 8U
254254
#define STSE_NIST_P_256_ID_VALUE \
255-
{ 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07 }
255+
{0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07}
256256
#define STSE_NIST_P_256_ID_SIZE \
257257
STSE_NIST_P_256_ID_LENGTH_SIZE \
258258
+STSE_NIST_P_256_ID_VALUE_SIZE
@@ -284,10 +284,10 @@ typedef enum stse_ac_change_right_t {
284284
*/
285285
#define STSE_NIST_P_384_ID_LENGTH_SIZE 2U
286286
#define STSE_NIST_P_384_ID_LENGTH \
287-
{ 0x00, 0x05 }
287+
{0x00, 0x05}
288288
#define STSE_NIST_P_384_ID_VALUE_SIZE 5U
289289
#define STSE_NIST_P_384_ID_VALUE \
290-
{ 0x2B, 0x81, 0x04, 0x00, 0x22 }
290+
{0x2B, 0x81, 0x04, 0x00, 0x22}
291291
#define STSE_NIST_P_384_ID_SIZE \
292292
STSE_NIST_P_384_ID_LENGTH_SIZE \
293293
+STSE_NIST_P_384_ID_VALUE_SIZE
@@ -322,10 +322,10 @@ typedef enum stse_ac_change_right_t {
322322
*/
323323
#define STSE_NIST_P_521_ID_LENGTH_SIZE 2U
324324
#define STSE_NIST_P_521_ID_LENGTH \
325-
{ 0x00, 0x05 }
325+
{0x00, 0x05}
326326
#define STSE_NIST_P_521_ID_VALUE_SIZE 5U
327327
#define STSE_NIST_P_521_ID_VALUE \
328-
{ 0x2B, 0x81, 0x04, 0x00, 0x23 }
328+
{0x2B, 0x81, 0x04, 0x00, 0x23}
329329
#define STSE_NIST_P_521_ID_SIZE \
330330
STSE_NIST_P_521_ID_LENGTH_SIZE \
331331
+STSE_NIST_P_521_ID_VALUE_SIZE
@@ -359,10 +359,10 @@ typedef enum stse_ac_change_right_t {
359359

360360
#define STSE_BRAINPOOL_P_256_ID_LENGTH_SIZE 2U
361361
#define STSE_BRAINPOOL_P_256_ID_LENGTH \
362-
{ 0x00, 0x09 }
362+
{0x00, 0x09}
363363
#define STSE_BRAINPOOL_P_256_ID_VALUE_SIZE 9U
364364
#define STSE_BRAINPOOL_P_256_ID_VALUE \
365-
{ 0x2B, 0x24, 0x03, 0x03, 0x02, 0x08, 0x01, 0x01, 0x07 }
365+
{0x2B, 0x24, 0x03, 0x03, 0x02, 0x08, 0x01, 0x01, 0x07}
366366
#define STSE_BRAINPOOL_P_256_ID_SIZE \
367367
STSE_BRAINPOOL_P_256_ID_LENGTH_SIZE \
368368
+STSE_BRAINPOOL_P_256_ID_VALUE_SIZE
@@ -397,10 +397,10 @@ typedef enum stse_ac_change_right_t {
397397

398398
#define STSE_BRAINPOOL_P_384_ID_LENGTH_SIZE 2U
399399
#define STSE_BRAINPOOL_P_384_ID_LENGTH \
400-
{ 0x00, 0x09 }
400+
{0x00, 0x09}
401401
#define STSE_BRAINPOOL_P_384_ID_VALUE_SIZE 9U
402402
#define STSE_BRAINPOOL_P_384_ID_VALUE \
403-
{ 0x2B, 0x24, 0x03, 0x03, 0x02, 0x08, 0x01, 0x01, 0x0B }
403+
{0x2B, 0x24, 0x03, 0x03, 0x02, 0x08, 0x01, 0x01, 0x0B}
404404
#define STSE_BRAINPOOL_P_384_ID_SIZE \
405405
STSE_BRAINPOOL_P_384_ID_LENGTH_SIZE \
406406
+STSE_BRAINPOOL_P_384_ID_VALUE_SIZE
@@ -437,10 +437,10 @@ typedef enum stse_ac_change_right_t {
437437

438438
#define STSE_BRAINPOOL_P_512_ID_LENGTH_SIZE 2U
439439
#define STSE_BRAINPOOL_P_512_ID_LENGTH \
440-
{ 0x00, 0x09 }
440+
{0x00, 0x09}
441441
#define STSE_BRAINPOOL_P_512_ID_VALUE_SIZE 9U
442442
#define STSE_BRAINPOOL_P_512_ID_VALUE \
443-
{ 0x2B, 0x24, 0x03, 0x03, 0x02, 0x08, 0x01, 0x01, 0x0D }
443+
{0x2B, 0x24, 0x03, 0x03, 0x02, 0x08, 0x01, 0x01, 0x0D}
444444
#define STSE_BRAINPOOL_P_512_ID_SIZE \
445445
STSE_BRAINPOOL_P_512_ID_LENGTH_SIZE \
446446
+STSE_BRAINPOOL_P_512_ID_VALUE_SIZE
@@ -474,10 +474,10 @@ typedef enum stse_ac_change_right_t {
474474

475475
#define STSE_X25519_ID_LENGTH_SIZE 2U
476476
#define STSE_X25519_ID_LENGTH \
477-
{ 0x00, 0x03 }
477+
{0x00, 0x03}
478478
#define STSE_X25519_ID_VALUE_SIZE 3U
479479
#define STSE_X25519_ID_VALUE \
480-
{ 0x2B, 0x65, 0x6E }
480+
{0x2B, 0x65, 0x6E}
481481
#define STSE_X25519_ID_SIZE \
482482
STSE_X25519_ID_LENGTH_SIZE \
483483
+STSE_X25519_ID_VALUE_SIZE
@@ -513,10 +513,10 @@ typedef enum stse_ac_change_right_t {
513513
#define STSE_ED25519_ID_SIZE 5U
514514
#define STSE_ED25519_ID_LENGTH_SIZE 2U
515515
#define STSE_ED25519_ID_LENGTH \
516-
{ 0x00, 0x03 }
516+
{0x00, 0x03}
517517
#define STSE_ED25519_ID_VALUE_SIZE 3U
518518
#define STSE_ED25519_ID_VALUE \
519-
{ 0x2B, 0x65, 0x70 }
519+
{0x2B, 0x65, 0x70}
520520
#define STSE_ED25519_PUBLIC_KEY_LENGTH_SIZE 2U
521521
#define STSE_ED25519_PUBLIC_KEY_VALUE_SIZE 32U
522522
#define STSE_ED25519_PUBLIC_KEY_SIZE \

core/stse_util.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
#ifndef STSAFE_UTIL_H
2020
#define STSAFE_UTIL_H
2121

22-
#define UI16_B0(ui16) ((ui16)&0x00FF)
23-
#define UI16_B1(ui16) (((ui16)&0xFF00) >> 8)
22+
#define UI16_B0(ui16) ((ui16) & 0x00FF)
23+
#define UI16_B1(ui16) (((ui16) & 0xFF00) >> 8)
2424
#define UI16_B0_SET(ui8) (ui8)
2525
#define UI16_B1_SET(ui8) ((ui8) << 8)
2626
#define UI16_SWAP(ui16) ((UI16_B0(ui16) << 8) + UI16_B1(ui16))
2727

28-
#define UI32_B0(ui32) ((ui32)&0x000000FF)
29-
#define UI32_B1(ui32) (((ui32)&0x0000FF00) >> 8)
30-
#define UI32_B2(ui32) (((ui32)&0x00FF0000) >> 16)
31-
#define UI32_B3(ui32) (((ui32)&0xFF000000) >> 24)
28+
#define UI32_B0(ui32) ((ui32) & 0x000000FF)
29+
#define UI32_B1(ui32) (((ui32) & 0x0000FF00) >> 8)
30+
#define UI32_B2(ui32) (((ui32) & 0x00FF0000) >> 16)
31+
#define UI32_B3(ui32) (((ui32) & 0xFF000000) >> 24)
3232

3333
#define ARRAY_2B_SWAP_TO_UI16(buf2) (PLAT_UI16)((buf2[0] << 8) + buf2[1])
3434
#define ARRAY_3B_SWAP_TO_UI32(buf3) (PLAT_UI32)((buf3[0] << 16) + (buf3[1] << 8) + buf3[2])

services/stsafea/stsafea_data_partition.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
#define STSAFEA_ZIR_AC_READ_Msk 112 /*0b01110000*/
4444
#define STSAFEA_ZIR_AC_UPDATE_CR_Msk 8 /*0b00001000*/
4545
#define STSAFEA_ZIR_AC_UPDATE_Msk 7 /*0b00000111*/
46-
#define STSAFEA_ZIR_AC_READ_CR_GET(x) (((x)&STSAFEA_ZIR_AC_READ_CR_Msk) >> STSAFEA_ZIR_AC_READ_CR_Pos)
47-
#define STSAFEA_ZIR_AC_READ_GET(x) (((x)&STSAFEA_ZIR_AC_READ_Msk) >> STSAFEA_ZIR_AC_READ_Pos)
48-
#define STSAFEA_ZIR_AC_UPDATE_CR_GET(x) (((x)&STSAFEA_ZIR_AC_UPDATE_CR_Msk) >> STSAFEA_ZIR_AC_UPDATE_CR_Pos)
49-
#define STSAFEA_ZIR_AC_UPDATE_GET(x) (((x)&STSAFEA_ZIR_AC_UPDATE_Msk) >> STSAFEA_ZIR_AC_UPDATE_Pos)
46+
#define STSAFEA_ZIR_AC_READ_CR_GET(x) (((x) & STSAFEA_ZIR_AC_READ_CR_Msk) >> STSAFEA_ZIR_AC_READ_CR_Pos)
47+
#define STSAFEA_ZIR_AC_READ_GET(x) (((x) & STSAFEA_ZIR_AC_READ_Msk) >> STSAFEA_ZIR_AC_READ_Pos)
48+
#define STSAFEA_ZIR_AC_UPDATE_CR_GET(x) (((x) & STSAFEA_ZIR_AC_UPDATE_CR_Msk) >> STSAFEA_ZIR_AC_UPDATE_CR_Pos)
49+
#define STSAFEA_ZIR_AC_UPDATE_GET(x) (((x) & STSAFEA_ZIR_AC_UPDATE_Msk) >> STSAFEA_ZIR_AC_UPDATE_Pos)
5050

5151
/**
5252
* \struct stsafea_read_option_t

services/stsafea/stsafea_hash.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,26 @@
5050
#define STSAFEA_HASH_ALGO_ID_SIZE (STSAFEA_HASH_ALGO_ID_LENGTH_SIZE + STSAFEA_HASH_ALGO_ID_VALUE_SIZE)
5151

5252
#define STSAFEA_SHA1_ALGO_ID_LENGTH \
53-
{ 0x00, 0x05 }
53+
{0x00, 0x05}
5454
#define STSAFEA_HASH_ALGO_ID_LENGTH \
55-
{ 0x00, 0x09 }
55+
{0x00, 0x09}
5656

5757
#define STSAFEA_HASH_ALGO_ID_SHA_1 \
58-
{ 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0, 0, 0, 0 }
58+
{0x2b, 0x0e, 0x03, 0x02, 0x1a, 0, 0, 0, 0}
5959
#define STSAFEA_HASH_ALGO_ID_SHA_224 \
60-
{ 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x04 }
60+
{0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x04}
6161
#define STSAFEA_HASH_ALGO_ID_SHA_256 \
62-
{ 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01 }
62+
{0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01}
6363
#define STSAFEA_HASH_ALGO_ID_SHA_384 \
64-
{ 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02 }
64+
{0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02}
6565
#define STSAFEA_HASH_ALGO_ID_SHA_512 \
66-
{ 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03 }
66+
{0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03}
6767
#define STSAFEA_HASH_ALGO_ID_SHA3_256 \
68-
{ 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x08 }
68+
{0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x08}
6969
#define STSAFEA_HASH_ALGO_ID_SHA3_384 \
70-
{ 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x09 }
70+
{0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x09}
7171
#define STSAFEA_HASH_ALGO_ID_SHA3_512 \
72-
{ 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x0A }
72+
{0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x0A}
7373

7474
/*!
7575
* \struct stsafea_hash_algorithm_identifier_t

services/stsafea/stsafea_host_key_slot.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949

5050
#define STSAFEA_KEK_KEY_SIZE STSAFEA_AES_256_KEY_SIZE
5151
#define STSAFEA_KEK_HKDF_SALT_SIZE STSAFEA_SHA_256_HASH_SIZE
52-
#define STSAFEA_KEK_HKDF_SALT \
53-
{ 0xE4, 0x5D, 0x4C, 0xFD, 0x20, 0x15, 0xDE, 0x9E, \
54-
0x0A, 0xA9, 0xA9, 0xF6, 0xA4, 0x9F, 0x45, 0x10, \
55-
0x0F, 0x99, 0xD9, 0x63, 0x3F, 0xB1, 0xB2, 0xDD, \
56-
0xDB, 0xEE, 0xE6, 0x75, 0xD5, 0x4D, 0xE2, 0x5B }
52+
#define STSAFEA_KEK_HKDF_SALT \
53+
{0xE4, 0x5D, 0x4C, 0xFD, 0x20, 0x15, 0xDE, 0x9E, \
54+
0x0A, 0xA9, 0xA9, 0xF6, 0xA4, 0x9F, 0x45, 0x10, \
55+
0x0F, 0x99, 0xD9, 0x63, 0x3F, 0xB1, 0xB2, 0xDD, \
56+
0xDB, 0xEE, 0xE6, 0x75, 0xD5, 0x4D, 0xE2, 0x5B}
5757
#define STSAFEA_WORKING_KEK_HKDF_INFO_SIZE 3U
5858
typedef enum {
5959
STSAFEA_AES_128_HOST_KEY = 0,

0 commit comments

Comments
 (0)