This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2017, Linaro Ltd and contributors | |
* SPDX-License-Identifier: Apache-2.0 | |
*/ | |
#define S96_AT_STATUS_OK 0x00 | |
#define S96_AT_STATUS_CHECKMAC_FAIL 0x01 | |
#define S96_AT_STATUS_EXEC_ERROR 0x0f | |
#define S96AT_CHALLENGE_LEN 32 | |
#define S96AT_HMAC_LEN 32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import hashlib | |
# Using mode = 0x06, ie: | |
# Bit 7 = 0: MBZ | |
# Bit 6 = 0: SN[2:3], SN[4:7] set to zero | |
# Bit 5 = 0: OTP[0:7] set to zero | |
# Bit 4 = 0: OTP[0:10] set to zero | |
# Bit 3 = 0: MBZ | |
# Bit 2 = 1: Value of TempKey.SourceFlag = Input |