
/*
 * This file is part of the Trezor project, https://trezor.io/
 *
 * Copyright (c) SatoshiLabs
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#pragma once

#include <rtl/sizedefs.h>
#include "secret_layout.h"

#include "bootloaders/bootloader_hashes.h"

#define MODEL_NAME "Safe 7"
#define MODEL_FULL_NAME "Trezor Safe 7"
#define MODEL_INTERNAL_NAME "T3W1"
#define MODEL_INTERNAL_NAME_TOKEN T3W1
#define MODEL_INTERNAL_NAME_QSTR MP_QSTR_T3W1
#define MODEL_USB_MANUFACTURER "Trezor Company"
#define MODEL_USB_PRODUCT MODEL_FULL_NAME
#define MODEL_HOMESCREEN_MAXSIZE 65536
#define MODEL_BLE_CODE 6

#define MODEL_BOARDLOADER_KEYS \
  (const uint8_t *)"\xe8\x91\x2f\x81\xb3\xe7\x80\xee\x65\x0e\xd3\x85\x6d\xb5\x32\x6e\x0b\x9e\xff\x10\x36\x4b\x33\x91\x93\xe7\xa8\xf1\x0f\x76\x21\xb9", \
  (const uint8_t *)"\xbd\xe7\x0a\x38\xee\xe6\x33\xd2\x6f\x43\x4e\xee\x2f\x53\x6d\xf4\x57\xb8\xde\xb8\xbd\x98\x82\x94\xf4\xa0\xc8\xd9\x05\x49\x03\xd2", \
  (const uint8_t *)"\xa8\x5b\x60\x1d\xfb\xda\x1d\x22\xcc\xb5\xdd\x49\x2d\x26\x03\x4d\x87\xf6\x7f\x2a\x0b\x85\x84\xb7\x77\x44\x39\x46\x1f\xc4\x71\xa9",

#define MODEL_BOARDLOADER_EC_KEYS \
  (const uint8_t *)"\xb0\xd7\x3e\x86\xae\x39\x2a\x26\xda\x72\x75\x99\x4e\x96\x50\x97\xae\x7e\xe8\xf8\x84\x55\x78\x8e\x8c\x53\x40\x21\xd5\xde\x18\x85", \
  (const uint8_t *)"\xa8\xf1\x8b\x94\x86\x16\x7c\x97\xb0\x59\xfd\x4f\x05\x3b\xe8\x24\xf7\xd5\xb0\xcb\x87\x10\xb3\xca\x12\xd2\x6d\x2d\xda\xc3\x51\xc9", \
  (const uint8_t *)"\xd2\x0f\xbd\xa4\x27\x1a\xeb\x06\xc1\x8c\x26\xc6\xf2\xad\xb6\xd6\xb0\xe3\x12\xf8\x45\xf9\x04\x41\xfd\x61\x4f\x39\x75\x54\xa8\x6e",

#define MODEL_BOARDLOADER_PQ_KEYS \
  (const uint8_t *)"\xec\x57\xa2\x64\x3e\x55\x3c\x59\x19\x47\x3c\xd5\x79\xcd\xdd\xa6\x50\x05\x7c\x2f\xd5\x98\xa4\x47\x57\x4b\xdb\x6c\x1f\x0f\x55\x21", \
  (const uint8_t *)"\xd2\x96\xd8\xcf\x9b\xe3\xe9\x23\xe1\x0a\xc0\x3f\x43\x56\x6d\x18\x9d\x11\xf6\xb5\xdd\xab\xdf\x8d\xc1\x2d\x29\xc0\x0e\x5a\x13\x6a", \
  (const uint8_t *)"\xb7\x2b\xd7\x1b\xf8\xe1\x09\xd3\x77\x4d\x91\xe3\xc1\xab\xd2\xa2\xe9\xff\x6b\x57\x11\x89\x6f\x8d\x87\x3a\x3d\xf9\xb9\xbe\x98\xd1",

#define MODEL_BOOTLOADER_KEYS \
  (const uint8_t *)"\x32\x0e\x11\x1e\x9d\xde\xd5\xfe\x7f\x5d\x41\xfd\x37\x2e\xf0\xe9\x1b\x2d\xfa\x4c\x6c\xdc\x9f\xe5\x22\x1b\xfb\x16\xaa\xf9\x17\x75", \
  (const uint8_t *)"\x2e\x34\x9f\x8d\x06\xb2\x33\x42\x62\xec\xb6\x03\xed\x04\xcb\x5a\x7c\xc0\xb6\x60\xeb\xe3\xcd\x5c\x29\x72\xb5\xcd\x1f\x38\xef\x85", \
  (const uint8_t *)"\xab\x0d\x3f\x91\xa4\xad\xf7\x44\x71\x9d\xba\x66\x17\x83\xec\x54\x9f\x73\xa4\xe4\x54\x57\xcb\x6d\x02\x75\x2a\x40\xfb\x63\xd3\xbf",

#define MODEL_SECMON_KEYS \
  (const uint8_t *)"\x7d\xa3\xdd\x47\x69\xfe\xf0\xf9\x48\x9d\x5f\xf7\xfb\xa8\xbe\x12\x2a\xef\x0f\x60\x77\x83\x02\x55\x7b\xa2\xcc\x67\xff\x2a\x6d\x9e", \
  (const uint8_t *)"\x4a\xe3\xbf\x88\xb0\xe5\x22\x63\x22\xd8\x67\x43\x29\x40\x26\x5b\x4b\xef\x46\xe5\xc4\x5b\x64\x73\x0e\x26\xca\x32\xee\x65\x3e\x0b", \
  (const uint8_t *)"\x6c\x16\x40\xf3\x8d\x03\x7c\x57\xe8\x69\x60\x86\x35\x05\xef\x70\xff\x60\xf9\x81\x57\x44\x0c\xf2\x5f\x1c\x13\x3b\x4a\x15\x96\x0e",

#define IMAGE_CHUNK_SIZE SIZE_256K
#define IMAGE_HASH_SHA256

#define DISPLAY_JUMP_BEHAVIOR DISPLAY_RESET_CONTENT

#define NORCOW_SECTOR_SIZE (16 * 8 * 1024)  // 128 kB
#define NORCOW_MIN_VERSION 0x00000006

#ifdef USE_SECMON_LAYOUT
#include "memory_secmon.h"
#else
#include "memory.h"
#endif
