Skip to content

Commit 4eec52a

Browse files
committed
Merge branch 'develop'
2 parents fcc352d + a06c5d6 commit 4eec52a

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

src/unit/atecc608.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ enum Error : uint8_t {
8686
constexpr uint32_t DELAY_READ{3};
8787
constexpr uint32_t DELAY_WRITE{4};
8888
constexpr uint32_t DELAY_INFO{2};
89-
constexpr uint32_t DELAY_NONCE{15};
89+
constexpr uint32_t DELAY_NONCE{16};
9090
constexpr uint32_t DELAY_SELFTEST{200};
9191
constexpr uint32_t DELAY_RANDOM{23};
9292
constexpr uint32_t DELAY_COUNTER{20};

src/unit/unit_ATECC608B.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,6 @@ bool UnitATECC608B::createNonce(uint8_t output[32], const uint8_t input[20], con
353353
const uint8_t mode = (updateSeed ? NONCE_MODE_RANDOM_UPDATE_SEED : NONCE_MODE_RANDOM_NOT_UPDATE_SEED);
354354
const uint16_t param2 = (useRNG ? NONCE_USE_TRNG : NONCE_USE_TEMPKEY);
355355

356-
M5_LIB_LOGE("createNonec:%02X, %04X", mode, param2);
357-
358356
if (send_command(OPCODE_NONCE, mode, param2, input, 20)) {
359357
m5::utility::delay(DELAY_NONCE);
360358
ok = receive_response(output ? output : buf, 32);
@@ -372,9 +370,6 @@ bool UnitATECC608B::write_nonce(const Destination dest, const uint8_t* input, co
372370
}
373371

374372
bool ok{};
375-
376-
M5_LIB_LOGE("writeNoncee%u:%02X %04X", ilen, mode, 0x0000);
377-
378373
if (send_command(OPCODE_NONCE, mode, 0x0000, input, ilen)) {
379374
m5::utility::delay(DELAY_NONCE);
380375
uint8_t status{};

test/embedded/test_id/id_test.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,6 @@ TEST_P(TestATECC608B_TNGTLS, Nonce)
284284
uint8_t nonce32[32]{0x11};
285285
uint8_t nonce64[64]{0x22};
286286

287-
// clear_tempkey(unit.get());
288-
// EXPECT_TRUE(unit->readDeviceState(state));
289-
// M5_LOGW("1S:%04X", state);
290-
291287
// RNG mode: useRNG = true, updateSeed = true
292288
EXPECT_TRUE(clear_tempkey(unit.get()));
293289
EXPECT_TRUE(unit->createNonce(output, input20, true, true));
@@ -871,7 +867,7 @@ TEST_P(TestATECC608B_TNGTLS, SignInternal)
871867
}
872868

873869
// Failed because illegal TempKey (TempKey need to made by GenDlg, GenKey)
874-
const uint8_t nin[20]{};
870+
const uint8_t nin[20]{0x12};
875871
EXPECT_TRUE(unit->createNonce(nullptr, nin));
876872
EXPECT_TRUE(unit->readDeviceState(state));
877873
EXPECT_TRUE(is_valid_tempkey(state));

0 commit comments

Comments
 (0)