secrets.h 917 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* Copyright 2016 The Chromium OS Authors. All rights reserved.
  2. * Use of this source code is governed by a BSD-style license that can be
  3. * found in the LICENSE file.
  4. */
  5. #ifndef VBOOT_REFERENCE_FIRMWARE_BDB_SECRETS_H_
  6. #define VBOOT_REFERENCE_FIRMWARE_BDB_SECRETS_H_
  7. #define BDB_SECRET_SIZE 32
  8. #define BDB_CONSTANT_BLOCK_SIZE 64
  9. enum bdb_secret_type {
  10. BDB_SECRET_TYPE_WSR,
  11. BDB_SECRET_TYPE_NVM_WP,
  12. BDB_SECRET_TYPE_NVM_RW,
  13. BDB_SECRET_TYPE_BDB,
  14. BDB_SECRET_TYPE_BOOT_VERIFIED,
  15. BDB_SECRET_TYPE_BOOT_PATH,
  16. BDB_SECRET_TYPE_BUC,
  17. BDB_SECRET_TYPE_COUNT, /* Last entry. Add new secrets before this. */
  18. };
  19. /*
  20. * Struct storing BDB secrets passed between SP-RO and SP-RW.
  21. */
  22. struct bdb_secrets {
  23. uint8_t nvm_rw[BDB_SECRET_SIZE];
  24. uint8_t bdb[BDB_SECRET_SIZE];
  25. uint8_t boot_verified[BDB_SECRET_SIZE];
  26. uint8_t boot_path[BDB_SECRET_SIZE];
  27. uint8_t nvm_wp[BDB_SECRET_SIZE];
  28. uint8_t buc[BDB_SECRET_SIZE];
  29. };
  30. #endif