alder_lake_bios/Board/Oem/L05AlderLakeSMultiBoardPkg/Library/SmmDxeOemSvcNotebookPasswor.../OemSvcGenerateSecureKey.c

51 lines
1.8 KiB
C

/** @file
Provides an interface to Generate Secure Key by EC.
;******************************************************************************
;* Copyright (c) 2020, Insyde Software Corp. All Rights Reserved.
;*
;* You may not reproduce, distribute, publish, display, perform, modify, adapt,
;* transmit, broadcast, present, recite, release, license or otherwise exploit
;* any part of this publication in any form, by any means, without the prior
;* written permission of Insyde Software Corporation.
;*
;******************************************************************************
*/
#include <SmmDxeOemSvcNotebookPasswordDesignLib.h>
/**
Provides an interface to Generate Secure Key by EC.
@param SecureKey A pointer to the secure key for UHDP encryption.
@retval EFI_SUCCESS Feature will use the secure key generated by EC.
@retval EFI_UNSUPPORTED Feature will use the secure key generated by BIOS.
Returns unsupported by default.
**/
EFI_STATUS
OemSvcGenerateSecureKey (
UINT8 **SecureKey
)
{
//
// [Natural File Guard Design Guide V1.01]
// 2.2.1 Secure Key Generation
// A 256-bits AES key is needed for UHDP encryption. Product could choose one of below methods
// to generate this secure key. Proposal A is preferred.
// Proposal A: Generate by EC (if EC have internal RNG, like ITE5507)
// Proposal B: Generate by BIOS
//
// Procedure
// 1. When enable Natural File Guard or retrieve Secure Key fail, BIOS inform the EC RNG module to
// generate a 32 byte secure key or generate by itself. Then store this key in EC space.
//
//
// Todo:
// Add project specific code in here.
//
return EFI_UNSUPPORTED;
}