@@ -168,7 +168,7 @@ otcrypto_status_t otcrypto_hmac(const otcrypto_blinded_key_t *key,
168168        HARDENED_CHECK_EQ (key -> config .security_level ,
169169                          kOtcryptoKeySecurityLevelLow );
170170        return  hmac_hmac_sha256_cl (& hmac_key , input_message .data ,
171-                                 input_message .len , tag .data );
171+                                     input_message .len , tag .data );
172172      } else  if  (launder32 (key -> config .security_level ) == 
173173                 kOtcryptoKeySecurityLevelMedium ) {
174174        // Call the HMAC core twice and compare both tags. This serves as a FI 
@@ -177,14 +177,15 @@ otcrypto_status_t otcrypto_hmac(const otcrypto_blinded_key_t *key,
177177        HARDENED_CHECK_EQ (key -> config .security_level ,
178178                          kOtcryptoKeySecurityLevelMedium );
179179        HARDENED_TRY (hmac_hmac_sha256_cl (& hmac_key , input_message .data ,
180-                                       input_message .len , tag .data ));
180+                                           input_message .len , tag .data ));
181181        // Second HMAC computation using the HMAC core. 
182182        uint32_t  tag_redundant [tag .len ];
183183        hmac_key_t  hmac_key_redundant ;
184184        HARDENED_TRY (hmac_key_construct (key , kHmacSha256BlockWords ,
185185                                        & hmac_key_redundant ));
186-         HARDENED_TRY (hmac_hmac_sha256_cl (& hmac_key_redundant , input_message .data ,
187-                                       input_message .len , tag_redundant ));
186+         HARDENED_TRY (hmac_hmac_sha256_cl (& hmac_key_redundant ,
187+                                          input_message .data , input_message .len ,
188+                                          tag_redundant ));
188189        // Comparison of both tags. 
189190        HARDENED_CHECK_EQ (
190191            hardened_memeq (& tag .data [0 ], & tag_redundant [0 ], tag .len ),
@@ -198,7 +199,7 @@ otcrypto_status_t otcrypto_hmac(const otcrypto_blinded_key_t *key,
198199                          kOtcryptoKeySecurityLevelHigh );
199200        // First HMAC computation using the HMAC core. 
200201        HARDENED_TRY (hmac_hmac_sha256_cl (& hmac_key , input_message .data ,
201-                                       input_message .len , tag .data ));
202+                                           input_message .len , tag .data ));
202203        // Second HMAC computation without using the HMAC core. 
203204        uint32_t  tag_redundant [tag .len ];
204205        hmac_key_t  hmac_key_redundant ;
0 commit comments