2018-06-04 04:00:28 +00:00
|
|
|
#pragma once
|
|
|
|
#include <fnd/types.h>
|
2018-08-07 08:35:03 +00:00
|
|
|
#include <fnd/rsa.h>
|
2018-10-22 13:30:49 +00:00
|
|
|
#include <nn/hac/define/macro.h>
|
2018-06-04 04:00:28 +00:00
|
|
|
|
2018-08-07 07:17:51 +00:00
|
|
|
namespace nn
|
|
|
|
{
|
|
|
|
namespace hac
|
2018-06-04 04:00:28 +00:00
|
|
|
{
|
|
|
|
namespace nrr
|
|
|
|
{
|
2018-06-29 07:10:10 +00:00
|
|
|
static const uint32_t kNrrStructMagic = _MAKE_STRUCT_MAGIC_U32("NRR0");
|
2018-06-04 04:00:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#pragma pack(push,1)
|
|
|
|
struct sNrrCertificate
|
|
|
|
{
|
|
|
|
le_uint64_t application_id_mask;
|
|
|
|
le_uint64_t application_id_pattern;
|
2018-08-07 08:35:03 +00:00
|
|
|
byte_t nrr_body_modulus[fnd::rsa::kRsa2048Size];
|
|
|
|
byte_t nrr_cert_signature[fnd::rsa::kRsa2048Size];
|
2018-06-04 04:00:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct sNrrHeader
|
|
|
|
{
|
2018-06-26 04:23:40 +00:00
|
|
|
le_uint32_t st_magic;
|
2018-06-04 04:00:28 +00:00
|
|
|
byte_t reserved_0[28];
|
|
|
|
sNrrCertificate certificate;
|
2018-08-07 08:35:03 +00:00
|
|
|
byte_t nrr_body_signature[fnd::rsa::kRsa2048Size];
|
2018-06-04 04:00:28 +00:00
|
|
|
le_uint64_t application_id;
|
|
|
|
le_uint32_t size;
|
|
|
|
byte_t reserved_1[4];
|
|
|
|
le_uint32_t hash_offset;
|
|
|
|
le_uint32_t hash_count;
|
|
|
|
byte_t reserved_2[8];
|
|
|
|
};
|
|
|
|
#pragma pack(pop)
|
|
|
|
}
|
2018-08-07 07:17:51 +00:00
|
|
|
}
|