Skip to content

Instantly share code, notes, and snippets.

View michpappas's full-sized avatar

Michalis Pappas michpappas

View GitHub Profile
/*
* 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
#!/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