Hi Wee Do,
Looking at the log, it seems that the problem is an invalid key. And looking at your procedure, I believe the problem is here:
cd keys
./hab4_pki_tree.sh (n,2048,10,n)
cd ../crts
By answering 'n' to the last question, the PKI tree is build for "fast authentication". Your CSF file is for normal authentication.
And example of fast authentication is:
[Header]
Version = 4.1
Hash Algorithm = sha256
Engine = ANY
Engine Configuration = 0
Certificate Format = X509
Signature Format = CMS
[Install SRK]
File = “../crts/TBL_1_sha256+tbl.bin”
Source index = 0
[Install NOCAK]
File = “../crts/SRK1_sha256_2048_65537_v3_usr_crt.pem”
[Authenticate CSF]
#whole line comment
[Authenticate Data] # part line comment
Verification index = 0
Blocks = 0x877fb000 0x000 0x48000 “signed-u-boot.bin"
By the way here is parsing of your log:
------------+----+------+----+-------------------------------------------------
Persistent | T | L | P | Contents
Memory | a | e | a |
Record | g | n | r |
Type | | g | |
| | t | |
| | h | |
------------+----+------+----+-------------------------------------------------
Event |0xdb|0x0014|0x41| SRCE Field: 33 0c a0 00
| | | | STS = HAB_FAILURE (0x33)
| | | | RSN = HAB_INV_ASSERTION (0x0C)
| | | | CTX = HAB_CTX_ASSERT (0xA0)
| | | | ENG = HAB_ENG_ANY (0x00)
| | | | Evt Data (hex):
| | | | 00 00 00 00 17 7f f4 00 00 00 00 20
------------+----+------+----+-------------------------------------------------
Event |0xdb|0x0014|0x41| SRCE Field: 33 0c a0 00
| | | | STS = HAB_FAILURE (0x33)
| | | | RSN = HAB_INV_ASSERTION (0x0C)
| | | | CTX = HAB_CTX_ASSERT (0xA0)
| | | | ENG = HAB_ENG_ANY (0x00)
| | | | Evt Data (hex):
| | | | 00 00 00 00 17 7f f4 2c 00 00 03 08
------------+----+------+----+-------------------------------------------------
Event |0xdb|0x0014|0x41| SRCE Field: 33 0c a0 00
| | | | STS = HAB_FAILURE (0x33)
| | | | RSN = HAB_INV_ASSERTION (0x0C)
| | | | CTX = HAB_CTX_ASSERT (0xA0)
| | | | ENG = HAB_ENG_ANY (0x00)
| | | | Evt Data (hex):
| | | | 00 00 00 00 17 7f f4 20 00 00 00 01
------------+----+------+----+-------------------------------------------------
Event |0xdb|0x0014|0x41| SRCE Field: 33 0c a0 00
| | | | STS = HAB_FAILURE (0x33)
| | | | RSN = HAB_INV_ASSERTION (0x0C)
| | | | CTX = HAB_CTX_ASSERT (0xA0)
| | | | ENG = HAB_ENG_ANY (0x00)
| | | | Evt Data (hex):
| | | | 00 00 00 00 17 80 00 00 00 00 00 04
------------+----+------+----+-------------------------------------------------
Event |0xdb|0x0014|0x41| SRCE Field: 33 1d c0 00
| | | | STS = HAB_FAILURE (0x33)
| | | | RSN = HAB_INV_KEY (0x1D)
| | | | CTX = HAB_CTX_COMMAND (0xC0)
| | | | ENG = HAB_ENG_ANY (0x00)
| | | | Cmd Field: 0xbe000c00
| | | | CMD: HAB_CMD_INS_KEY (0xbe)
| | | | LEN: 0x000c
| | | | FLG: 0x03
| | | | FLAGS: NOTHING YET
| | | | PAST Field: 0x03170000
| | | | Crt. addr: 0x00000048
------------+----+------+----+-------------------------------------------------
Regards,
Raul Cardenas