TWI436280B - Authentication method for accessing profile of basic input/output system - Google Patents

Authentication method for accessing profile of basic input/output system Download PDF

Info

Publication number
TWI436280B
TWI436280B TW100129977A TW100129977A TWI436280B TW I436280 B TWI436280 B TW I436280B TW 100129977 A TW100129977 A TW 100129977A TW 100129977 A TW100129977 A TW 100129977A TW I436280 B TWI436280 B TW I436280B
Authority
TW
Taiwan
Prior art keywords
key
basic input
output system
random number
data
Prior art date
Application number
TW100129977A
Other languages
Chinese (zh)
Other versions
TW201310344A (en
Inventor
Po Jen Cheng
Yih Chiou
Rung Lung Lin
Original Assignee
Acer Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Acer Inc filed Critical Acer Inc
Priority to TW100129977A priority Critical patent/TWI436280B/en
Publication of TW201310344A publication Critical patent/TW201310344A/en
Application granted granted Critical
Publication of TWI436280B publication Critical patent/TWI436280B/en

Links

Landscapes

  • Storage Device Security (AREA)
  • Stored Programmes (AREA)

Description

存取基本輸入輸出系統設定的認證方法Access authentication method for accessing basic input/output system settings

本發明是有關於一種電腦系統,且特別是有關於電腦系統中一種存取基本輸入輸出系統的設定的認證方法。The present invention relates to a computer system, and more particularly to an authentication method for accessing a basic input/output system setting in a computer system.

基本輸入輸出系統(Basic Input/Output System,以下稱BIOS)是電腦在開機時最早載入的一段程式碼,具有初始化和檢測硬體及周邊設備,以及在完成上述工作後引導電腦載入作業系統(Operating System,OS)之功能。而BIOS中的設定檔(PROFILE)內容中包括了許多參數,例如各個硬體及周邊設備所對應之裝置編號以及該裝置啟用與否,或是中央處理器(Central Processing Unit,CPU)的操作頻率,甚至開機畫面及電腦製造商或品牌商的商標等,在BIOS開始執行時這些參數就會被載入作為初始化的依據。The Basic Input/Output System (BIOS) is the first code loaded by the computer at boot time. It has initialization and detection hardware and peripheral devices, and guides the computer to load the operating system after completing the above work. (Operating System, OS) features. The PROFILE content in the BIOS includes many parameters, such as the device number corresponding to each hardware and peripheral device, and whether the device is enabled or not, or the operating frequency of the Central Processing Unit (CPU). Even the boot screen and the trademark of the computer manufacturer or brand, etc., will be loaded as the basis for initialization when the BIOS starts executing.

由於目前的BIOS以及其設定檔目前都存放在快閃記憶體(Flash Memory)或電子抹除式可複寫唯讀記憶體(Electrically-Erasable Programmable Read-Only Memory,EEPROM)之中,使用者可以輕易的更新BIOS的內容。例如,在作業系統中透過應用軟體將新的設定檔或是韌體程式碼寫入BIOS,以支援新的硬體及修正舊有的錯誤。Since the current BIOS and its configuration files are currently stored in Flash Memory or Electrically-Erasable Programmable Read-Only Memory (EEPROM), users can easily Update the contents of the BIOS. For example, in the operating system, the new profile or firmware code is written to the BIOS through the application software to support new hardware and correct old errors.

然而,BIOS的設定檔往往不希望被一般使用者任意存取。例如,電腦銷售商可能不希望設定檔中的商標圖案被更動。又或者,電腦銷售商可能不希望使用者透過修改BIOS的設定檔,而在低價位的電腦機種中致能(enable)了高價位電腦的功能。若是在設定檔中的參數有誤,例如超出硬體本身的極限,或啟用了其實並不存在的硬體,就會增加系統在執行時的不穩定因素,甚至造成電腦或裝置無法正常使用。However, BIOS profiles are often not expected to be arbitrarily accessed by the average user. For example, a computer vendor may not want the logo pattern in the profile to be changed. Or, the computer vendor may not want the user to enable the function of the high-priced computer in the low-cost computer model by modifying the BIOS profile. If the parameters in the configuration file are incorrect, such as exceeding the limit of the hardware itself, or enabling the hardware that does not exist, it will increase the instability of the system during execution, and even cause the computer or device to be unable to use normally.

本發明提供一種存取基本輸入輸出系統之設定的認證方法,以防止非法應用程式存取基本輸入輸出系統之設定檔。The present invention provides an authentication method for accessing a setting of a basic input/output system to prevent an illegal application from accessing a profile of a basic input/output system.

一種存取基本輸入輸出系統之設定的認證方法,包括以下步驟。首先分別配置相同的第一固定密鑰與第二固定密鑰於基本輸入輸出系統與應用程式。接著由嵌入式控制器產生第一亂數密鑰。然後利用第一亂數密鑰與該第一固定密鑰計算得到第一安全密鑰。再者,透過管理介面提供第一亂數密鑰給應用程式作為一第二亂數密鑰。並且,由應用程式利用第二亂數密鑰與第二固定密鑰計算得到一第二安全密鑰。此外,若應用程式欲將一客製化設定資料存入該基本輸入輸出系統,則由應用程式使用第二安全密鑰對客製化設定資料進行加密以獲得第一加密資料,以及透過管理介面傳送第一加密資料至基本輸入輸出系統。由基本輸入輸出系統使用第一安全密鑰對第一加密資料進行解密以獲得客製化設定資料。若基本輸入輸出系統成功解密該第一加密資料,則基本輸入輸出系統儲存客製化設定資料。An authentication method for accessing settings of a basic input/output system includes the following steps. First, the same first fixed key and second fixed key are respectively configured in the basic input/output system and the application. The first random number key is then generated by the embedded controller. The first security key is then calculated using the first random number key and the first fixed key. Furthermore, the first random key is provided to the application as a second random number key through the management interface. And, the second security key is calculated by the application by using the second random key and the second fixed key. In addition, if the application wants to store a customized setting data into the basic input/output system, the application encrypts the customized setting data by using the second security key to obtain the first encrypted data, and through the management interface. The first encrypted data is transmitted to the basic input/output system. The first encrypted data is decrypted by the basic input/output system using the first security key to obtain customized configuration data. If the basic input/output system successfully decrypts the first encrypted data, the basic input/output system stores the customized setting data.

基於上述,本發明提供了一種存取基本輸入輸出系統之設定的認證方法,使得當應用程式欲將設定資料存入基本輸入輸出系統時,需將設定資料以加密的方式透過一管理介面傳送至基本輸入輸出系統。基本輸入輸出系統會對驗證應用程式的存取要求是否合法。當驗證成功時,基本輸入輸出系統才會儲存這個設定資料。Based on the above, the present invention provides an authentication method for accessing a setting of a basic input/output system, so that when an application wants to store setting data in a basic input/output system, the setting data is transmitted to the management interface through an management interface in an encrypted manner. Basic input and output system. Whether the basic I/O system will legally access the authentication application. The basic input and output system will store this setting data when the verification is successful.

為讓本發明之上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。The above described features and advantages of the present invention will be more apparent from the following description.

圖1所繪示一種電腦的裝置方塊圖。請參照圖1,中央處理器101、唯讀記憶體單元103、嵌入式控制器104、儲存單元105及記憶體單元106皆與晶片組單元102連接,並透過晶片組單元102聯繫並交換信息。儲存單元105可以是磁碟機、光碟機、隨身碟等可開機儲存裝置。記憶體單元106可以是隨機存取記憶體(random access memory,RAM)。一般而言在電腦的電源開啟後,儲存於唯讀記憶體單元103的基本輸入輸出系統(Basic Input/Output System,以下稱BIOS)韌體碼1031會開始被讀取執行之。自此以後,BIOS開始運作。FIG. 1 is a block diagram of a device of a computer. Referring to FIG. 1, the central processing unit 101, the read-only memory unit 103, the embedded controller 104, the storage unit 105, and the memory unit 106 are all connected to the chip set unit 102, and communicate and exchange information through the wafer set unit 102. The storage unit 105 can be a bootable storage device such as a disk drive, a CD player, or a flash drive. The memory unit 106 can be a random access memory (RAM). Generally, after the power of the computer is turned on, the basic input/output system (Basic Input/Output System, hereinafter referred to as BIOS) firmware code 1031 stored in the read-only memory unit 103 is started to be read and executed. Since then, the BIOS has been in operation.

BIOS會控制嵌入式控制器104以讀取儲存於嵌入式控制器104的設定檔(PROFILE),接著BIOS根據設定檔中的內容初始化各個重要的硬體元件(例如嵌入式控制器104等),以及執行電源開啟自我測試(Power On Self Test,簡稱POST)以診斷並確保這些裝置可以正確運作。在POST完成了工作之後,BIOS將接著使系統讀入儲存於儲存單元105上之作業系統程式碼1051。自此以後,作業系統開始運作。在進入作業系統環境後,製造商可以在作業系統中透過合法應用程式(工具程式)存取BIOS設定檔之內容。The BIOS controls the embedded controller 104 to read the profile (PROFILE) stored in the embedded controller 104, and then the BIOS initializes various important hardware components (eg, the embedded controller 104, etc.) according to the contents of the profile. And perform Power On Self Test (POST) to diagnose and ensure that these devices work correctly. After the POST has completed its work, the BIOS will then cause the system to read the operating system code 1051 stored on the storage unit 105. Since then, the operating system has been operational. After entering the operating system environment, the manufacturer can access the contents of the BIOS configuration file through the legitimate application (tool program) in the operating system.

圖2為根據本發明一實施例所繪示運作於圖1之電腦裝置上的一種存取BIOS之設定的認證方法的流程圖。請參照圖2,在步驟S201中,分別配置相同的第一固定密鑰與第二固定密鑰於BIOS與應用程式。此固定密鑰可以在製造過程中便已被製造商配置於BIOS中。唯有製造商的合法應用程式具有相同的固定密鑰。FIG. 2 is a flow chart showing an authentication method for setting a BIOS for accessing the computer device of FIG. 1 according to an embodiment of the invention. Referring to FIG. 2, in step S201, the same first fixed key and second fixed key are respectively configured in the BIOS and the application. This fixed key can be configured in the BIOS by the manufacturer during the manufacturing process. Only legitimate applications of the manufacturer have the same fixed key.

在步驟S202中,在每次電子裝置(例如電腦)開機後,嵌入式控制器即產生第一亂數密鑰。或者,在嵌入式控制器上電(power on)後的初始化階段,嵌入式控制器便可以產生第一亂數密鑰。由於嵌入式控制器隨機決定第一亂數密鑰,因此在每次開機後嵌入式控制器產生的第一亂數密鑰是無法預期的。在步驟S203中,利用第一亂數密鑰與該第一固定密鑰計算得到第一安全密鑰。在步驟S204中,BIOS透過管理介面提供第一亂數密鑰給合法應用程式作為一第二亂數密鑰。在步驟S205中,由應用程式利用BIOS所提供的第二亂數密鑰與本身的第二固定密鑰計算得到一第二安全密鑰。應用程式會保存此第二安全密鑰,以便稍後存取BIOS設定時進行認證與加密。In step S202, the embedded controller generates a first random number key each time the electronic device (for example, a computer) is turned on. Alternatively, the embedded controller can generate the first random number key during the initialization phase after the embedded controller is powered on. Since the embedded controller randomly determines the first random number key, the first random number key generated by the embedded controller after each boot is unpredictable. In step S203, the first security key is calculated by using the first random number key and the first fixed key. In step S204, the BIOS provides the first random key to the legitimate application as a second random number key through the management interface. In step S205, the second security key is calculated by the application using the second random key provided by the BIOS and the second fixed key of the BIOS. The application will save this second security key for authentication and encryption when accessing the BIOS settings later.

在步驟S206中,若應用程式欲將一客製化設定資料(例如系統組態設定值)存入該BIOS,則由應用程式使用第二安全密鑰對客製化設定資料進行加密以獲得第一加密資料,以及透過管理介面傳送第一加密資料至BIOS。在步驟S207中,由BIOS使用第一安全密鑰對第一加密資料進行解密以獲得客製化設定資料。最後在步驟S208中,若BIOS成功解密該第一加密資料,則BIOS儲存客製化設定資料。In step S206, if the application wants to store a customized setting data (for example, a system configuration setting value) into the BIOS, the application encrypts the customized setting data by using the second security key to obtain the first An encrypted data and a first encrypted data transmitted to the BIOS through the management interface. In step S207, the first encrypted data is decrypted by the BIOS using the first security key to obtain customized configuration data. Finally, in step S208, if the BIOS successfully decrypts the first encrypted data, the BIOS stores the customized setting data.

圖3為根據本發明一示範實施例所繪示存取BIOS之設定的認證方法的時序流程圖。請參照圖3,應用程式300是一個已經經過製造商或品牌商授權的合法程式,因此在應用程式300中會預先配置一個第二固定密鑰,而此第二固定密鑰與配置在BIOS 302中之第一固定密鑰相同。在本實施例中,第一及第二固定密鑰長度為16個位元組(Byte)固定密鑰內容則可以視製造需求而決定之,例如為”88740de3-3f73-4028-bfbe-1c3108a52968”。FIG. 3 is a timing diagram showing a method of authenticating an access BIOS setting according to an exemplary embodiment of the invention. Referring to FIG. 3, the application 300 is a legal program that has been authorized by the manufacturer or the brand. Therefore, a second fixed key is pre-configured in the application 300, and the second fixed key is configured in the BIOS 302. The first fixed key is the same. In this embodiment, the first and second fixed key lengths of 16 bytes (Byte) fixed key content may be determined according to manufacturing requirements, for example, "88740de3-3f73-4028-bfbe-1c3108a52968" .

首先,在每次電腦開機後,嵌入式控制器303即隨機地產生第一亂數密鑰(步驟S301)。其中,此第一亂數密鑰可由嵌入式控制器303擷取系統中的時間函數或一電容器之電壓值等數值經由計算產生一隨機數值。此隨機數值可以是理想亂數或非理想亂數。但本發明不限於上述。第一亂數密鑰只會在電腦系統的電源開啟後至關閉電源之前被計算/產生一次。若是電腦被重開機,為了提升安全性,則第一亂數密鑰會被再重新計算/產生一次。First, the embedded controller 303 randomly generates the first random number key each time the computer is turned on (step S301). The first random number key may be generated by the embedded controller 303 to capture a random function by calculating a time function in the system or a voltage value of a capacitor. This random number can be an ideal random number or a non-ideal random number. However, the invention is not limited to the above. The first random key is only calculated/generated once after the power of the computer system is turned on until the power is turned off. If the computer is rebooted, in order to improve security, the first random key will be recalculated/generated once.

應用程式300會向作業系統的管理介面301提出接收亂數密鑰的要求(步驟S302)。其中,所述管理介面301是應用程式300與BIOS 302之間的通訊界面,例如微軟公司(Microsoft Corp.)的視窗管理規範(Windows Management Instrumentation,WMI)的應用程式介面(Application Programming Interface,API)。應用程式301必須透過此管理介面301才能對BIOS 302進行存取。在管理介面301接收到應用程式300的要求後,便轉發此要求至BIOS 302(步驟S303)。在BIOS 302收到此要求後,BIOS 302便傳送第一固定密鑰至嵌入式控制器303(步驟S304)。然後,嵌入式控制器303利用接收到之第一固定密鑰以及本身於步驟S301所產生的第一亂數密鑰計算產生第一安全密鑰(步驟S305)。The application 300 will request the management interface 301 of the operating system to receive the random key (step S302). The management interface 301 is a communication interface between the application 300 and the BIOS 302, such as an application programming interface (API) of Microsoft Corporation's Windows Management Instrumentation (WMI). . The application 301 must access the BIOS 302 through this management interface 301. After the management interface 301 receives the request from the application 300, the request is forwarded to the BIOS 302 (step S303). After the BIOS 302 receives this request, the BIOS 302 transmits the first fixed key to the embedded controller 303 (step S304). Then, the embedded controller 303 calculates the first security key by using the received first fixed key and the first random number key generated by itself in step S301 (step S305).

在得到第一安全密鑰之後,嵌入式控制器303將第一安全密鑰傳送至BIOS 302(步驟S306)。BIOS 302保留第一安全密鑰並傳送通知至管理介面301,通知已可取得亂數密鑰(步驟S307)。管理介面301則接著轉發通知應用程式300已可取得亂數密鑰(步驟S308)。於是,應用程式300此時透過管理介面301發出取得第一亂數密鑰的要求(步驟S309、S310)。BIOS 302在接收到此要求之後,要求嵌入式控制器303提供第一亂數密鑰(步驟S311)。After obtaining the first security key, the embedded controller 303 transmits the first security key to the BIOS 302 (step S306). The BIOS 302 retains the first security key and transmits a notification to the management interface 301 notifying that the random key has been obtained (step S307). The management interface 301 then forwards the notification application 300 to obtain the hash key (step S308). Then, the application 300 transmits a request to acquire the first random number key through the management interface 301 (steps S309, S310). After receiving this request, the BIOS 302 requests the embedded controller 303 to provide the first random number key (step S311).

嵌入式控制器303在接收到要求後回傳第一亂數密鑰至BIOS 302(步驟S312),並在傳送第一亂數密鑰給BIOS 302後刪除第一亂數密鑰(步驟S313)。BIOS 302接著透過管理介面301傳送第一亂數密鑰至應用程式300(步驟S314、S315),並在傳送第一亂數密鑰給應用程式300後刪除第一亂數密鑰(步驟S316)。應用程式300在收到第一亂數密鑰後,將其做為第二亂數密鑰,並利用此第二亂數密鑰與預先設置的第二固定密鑰計算得到第二安全密鑰(步驟S317)。至此,應用程式300與BIOS 302已完成安全密鑰的初始化階段。After receiving the request, the embedded controller 303 returns the first random key to the BIOS 302 (step S312), and deletes the first random key after transmitting the first random key to the BIOS 302 (step S313). . The BIOS 302 then transmits the first random key to the application 300 through the management interface 301 (steps S314, S315), and deletes the first random key after transmitting the first random key to the application 300 (step S316). . After receiving the first random key, the application 300 uses the second random key as the second random key, and uses the second random key and the second fixed key to calculate the second security key. (Step S317). So far, the application 300 and the BIOS 302 have completed the initialization phase of the security key.

在開機後至關機(或重新開機)前,以上所述之步驟(步驟S301~S317)僅需進行一次。步驟S301~S317可在應用程式300要第一次存取BIOS的設定檔之前才進行,亦可以在應用程式300被啟動的初期就預先被執行,但本發明不限定於上述。The steps (steps S301 to S317) described above need only be performed once after the power is turned on until the power is turned off (or restarted). Steps S301 to S317 may be performed before the application 300 is to access the BIOS configuration file for the first time, or may be executed before the application 300 is started, but the present invention is not limited to the above.

請繼續參照圖3,當應用程式300欲將客製化設定資料存入BIOS 302時,應用程式300利用第二安全密鑰加密此客製化設定資料,獲得第一加密資料(步驟S320)。此客製化設定資料中可包括電腦之硬體設定參數(組態參數)以及/或是開機畫面圖檔等資料。接著,應用程式300將第一加密資料輸出至管理介面301(步驟S321)。管理介面301依照應用程式300的傳送需求,將第一加密資料輸出至BIOS 302(步驟S322)。因此,應用程式300可以透過管理介面301傳送第一加密資料至BIOS 302。Referring to FIG. 3, when the application 300 wants to store the customized setting data into the BIOS 302, the application 300 encrypts the customized setting data by using the second security key to obtain the first encrypted data (step S320). This customized setting data may include hardware setting parameters (configuration parameters) of the computer and/or boot screen files. Next, the application 300 outputs the first encrypted material to the management interface 301 (step S321). The management interface 301 outputs the first encrypted material to the BIOS 302 in accordance with the transfer request of the application 300 (step S322). Therefore, the application 300 can transmit the first encrypted data to the BIOS 302 through the management interface 301.

BIOS 302在收到第一加密資料後,進行驗證的動作(步驟S323)。在本實施例中,BIOS 302首先利用第一安全密鑰解密第一加密資料。在解密後,使用錯誤檢測方法,例如循環冗餘校驗(Cyclic Redundancy Check,CRC)或是資訊摘要演算法5(Message-Digest Algorithm,MD5)等,來檢測是否成功解密第一加密資料。若BIOS 302可成功利用第一安全密鑰成功解密第一加密資料,則表示驗證成功,也就是表示用來加密的第二安全密鑰與用來解密的第一安全密鑰是相吻合(或相同)的。反之,若解密第一加密資料失敗,則代表驗證失敗,因此BIOS 302將拒絕存取(步驟S323)。驗證成功後,BIOS 302接著傳送步驟S323解密後的客製化設定資料至嵌入式控制器303,並控制嵌入式控制器303儲存該客製化設定資料(步驟S324)。嵌入式控制器303在接收到客製化設定資料及BIOS 302的控制指令後,嵌入式控制器303便將客製化設定資料存放於設定資料所對應的記憶體位置中(步驟S325)。After receiving the first encrypted data, the BIOS 302 performs an authentication operation (step S323). In this embodiment, the BIOS 302 first decrypts the first encrypted material using the first security key. After decryption, an error detection method, such as Cyclic Redundancy Check (CRC) or Message-Digest Algorithm (MD5), is used to detect whether the first encrypted data is successfully decrypted. If the BIOS 302 can successfully decrypt the first encrypted data by using the first security key, it indicates that the verification is successful, that is, the second security key used for encryption is consistent with the first security key used for decryption (or identical. On the other hand, if the decryption of the first encrypted data fails, the verification fails, so the BIOS 302 will reject the access (step S323). After the verification is successful, the BIOS 302 then transmits the customized configuration data decrypted in step S323 to the embedded controller 303, and controls the embedded controller 303 to store the customized configuration data (step S324). After receiving the customized setting data and the control command of the BIOS 302, the embedded controller 303 stores the customized setting data in the memory location corresponding to the setting data (step S325).

上述實施例是由嵌入式控制器303計算第一安全密鑰。在其他實施例中,計算第一安全密鑰的操作可以由BIOS 302負責完成。例如,BIOS 302可以向嵌入式控制器303讀取第一亂數密鑰,然後利用第一固定密鑰與第一亂數密鑰計算得到第一安全密鑰。在計算得到第一亂數密鑰及第一安全密鑰之後,BIOS 302將第一亂數密鑰透過管理介面301傳送至應用程式300。The above embodiment is to calculate the first security key by the embedded controller 303. In other embodiments, the operation of computing the first security key may be performed by the BIOS 302. For example, the BIOS 302 can read the first random number key to the embedded controller 303, and then calculate the first security key using the first fixed key and the first random number key. After calculating the first random number key and the first security key, the BIOS 302 transmits the first random number key to the application 300 through the management interface 301.

本領域具有通常知識者可以採用任何加密方法實現上述步驟S305、S317、S320。例如,圖4為根據本發明一示範實施例所繪示於應用程式300產生第二安全密鑰SKEY2與第一加密資料ECPDATA1之資料流的示意圖。請參照,首先,由應用程式300進行圖3中的步驟S317,也就是圖4所示以第二固定密鑰FKEY2及第二亂數密鑰RKEY2透過單向函數(例如雜湊函數501)產生第二安全密鑰SKEY2。雜湊函數501是一種單向轉換函數,其可將輸入參數轉換為輸出參數,但極難利用輸出參數反向計算輸入參數。在本實施例中,雜湊函數501可以是第一安全雜湊演算法(Secure Hash Algorithm 1,SHA-1),但本發明不限定於上述。上述以雜湊函數501計算第二安全密鑰SKEY2的教示亦可以類推至圖3步驟S305。Those skilled in the art can implement the above steps S305, S317, S320 by any encryption method. For example, FIG. 4 is a schematic diagram of a data flow generated by the application 300 to generate a second security key SKEY2 and a first encrypted data ECPDATA1 according to an exemplary embodiment of the present invention. Please refer to, first, the application 300 performs step S317 in FIG. 3, that is, the second fixed key FKEY2 and the second random number key RKEY2 are transmitted through a one-way function (for example, the hash function 501) as shown in FIG. Second security key SKEY2. The hash function 501 is a one-way transfer function that converts input parameters into output parameters, but it is extremely difficult to inversely calculate input parameters using output parameters. In the present embodiment, the hash function 501 may be the first secure hash algorithm (SHA-1), but the present invention is not limited to the above. The above teaching of calculating the second security key SKEY2 by the hash function 501 can also be analogized to step S305 of FIG.

接著,若應用程式300欲將客製化設定資料PRODATA存入BIOS 302,則應用程式300會將客製化設定資料PRODATA與第二安全密鑰SKEY2進行互斥或運算(Exclusive OR,XOR)502,而得到第一暫態資料TMP1。然後,應用程式300再將第一暫態資料TMP1進行右旋(Rotate Right,ROR)運算503,得到第一加密資料ECPDATA1。例如,將第一暫態資料TMP1右旋7個位元。互斥或運算502與右旋計算503皆是用於增加加密資料的複雜度,然而本發明並不限定於使用此兩函數運算。Then, if the application 300 wants to store the customized setting data PRODATA in the BIOS 302, the application 300 mutually exclusive ORs the customized setting data PRODATA and the second security key SKEY2 (Exclusive OR, XOR) 502. And get the first transient data TMP1. Then, the application 300 performs a Rotate Right (ROR) operation 503 on the first transient data TMP1 to obtain a first encrypted data ECPDATA1. For example, the first transient data TMP1 is rotated right by 7 bits. Both the exclusive OR operation 502 and the right-handed calculation 503 are for increasing the complexity of the encrypted data, however the present invention is not limited to the use of the two-function operation.

本領域具有通常知識者可以採用任何解密方法實現上述步驟S323。例如,圖5為根據本發明一示範實施例所繪示於BOIS 302解密第一加密資料ECPDATA1之資料流的示意圖。圖5所示解密的流程是對應於圖4所示加密的流程。請參照圖5,第一加密資料ECPDATA1首先經過左旋(Rotate Left,ROL)運算601(例如左旋7個位元)得到第二暫態資料TMP2。接著,將第二暫態資料TMP2與第一安全密鑰SKEY1進行互斥或運算602得到客製化設定資料PRODATA。本發明並不限定於使用此兩函數之運算,惟解密之運算必須對應於加密的運算步驟才能夠解出正確的資料內容。Those skilled in the art can implement the above step S323 by any decryption method. For example, FIG. 5 is a schematic diagram showing the data stream of the BOIS 302 decrypting the first encrypted data ECPDATA1 according to an exemplary embodiment of the present invention. The flow of decryption shown in FIG. 5 is a flow corresponding to the encryption shown in FIG. Referring to FIG. 5, the first encrypted data ECPDATA1 is first subjected to a Rotate Left (ROL) operation 601 (eg, left-handed 7 bits) to obtain a second transient data TMP2. Next, the second transient data TMP2 and the first security key SKEY1 are mutually exclusive ORed 602 to obtain the customized setting data PRODATA. The present invention is not limited to the operation using the two functions, but the decryption operation must correspond to the encrypted operation step to be able to solve the correct data content.

圖6為根據本發明一實施例所繪示應用程式300透過管理介面301讀取BIOS 302設定之動作的時序流程圖。請參照圖6,首先,應用程式300透過管理介面301傳送關於當前BIOS 302設定資料的讀取需求至BIOS 302(步驟S701、S702)。接著,BIOS 302驗證此讀取需求(步驟S703)。在本實施例中,讀取需求同樣的在應用程式300利用第二安全密鑰加密,如同圖4中所述之加密方式。驗證的方法則如同圖3之實施例中所述,在此不多贅述。FIG. 6 is a timing chart showing the action of the application 300 reading the setting of the BIOS 302 through the management interface 301 according to an embodiment of the invention. Referring to FIG. 6, first, the application 300 transmits a read request for the current BIOS 302 setting data to the BIOS 302 through the management interface 301 (steps S701, S702). Next, the BIOS 302 verifies the read request (step S703). In the present embodiment, the read request is similarly encrypted in the application 300 using the second security key, as in the encryption mode described in FIG. The method of verification is as described in the embodiment of FIG. 3, and will not be described here.

例如,若應用程式300欲從BIOS 302讀取系統設定資料,則由該應用程式300使用第二安全密鑰SKEY2對「讀取資訊」進行加密以獲得第二加密資料,以及透過管理介面302傳送該第二加密資料至BIOS 302。上述「讀取資訊」的內容可以是讀取指令碼、系統設定資料的讀取位址及/或系統設定資料的識別碼等。For example, if the application 300 wants to read system configuration data from the BIOS 302, the application 300 encrypts the "read information" using the second security key SKEY2 to obtain the second encrypted data, and transmits it through the management interface 302. The second encrypted data is sent to the BIOS 302. The content of the above "read information" may be a read instruction code, a read address of a system setting data, and/or an identification code of a system setting data.

BIOS 302於步驟S703使用第一安全密鑰SKEY1對該第二加密資料進行解密,以獲得該「讀取資訊」。如果步驟S703驗證失敗,則BIOS 302拒絕存取。若BIOS 302檢查第二安全密鑰與第一安全密鑰為吻合,即BIOS 302成功解密該第二加密資料,則BIOS 302根據該讀取資訊向嵌入式控制器303要求讀取系統設定資料(步驟S704)。嵌入式控制器303在接收到讀取需求後,便根據讀取需求讀取系統設定資料(步驟S705),並接著回傳系統設定資料給BIOS 302(步驟S706)。BIOS 302透過管理介面301將系統設定資料傳送給應用程式300(步驟S707、S708)。The BIOS 302 decrypts the second encrypted data using the first security key SKEY1 in step S703 to obtain the "read information". If the verification fails in step S703, the BIOS 302 rejects the access. If the BIOS 302 checks that the second security key matches the first security key, that is, the BIOS 302 successfully decrypts the second encrypted data, the BIOS 302 requests the embedded controller 303 to read the system setting data according to the read information. Step S704). After receiving the read request, the embedded controller 303 reads the system setting data according to the read demand (step S705), and then returns the system setting data to the BIOS 302 (step S706). The BIOS 302 transmits the system setting data to the application 300 through the management interface 301 (steps S707, S708).

綜上所述,本發明提供了一種存取BIOS之設定的認證方法,利用預先配置於BIOS與授權的程式端的密鑰及每次開機才隨機產生的另一密鑰產生一安全密鑰,加密透過作業系統的管理介面所傳送的設定資料,並利用此安全密鑰作為認證。此方法使得在作業系統中其他非授權的應用程式不能輕易的存取或編輯BIOS的設定,也無法透過管理介面讀取BIOS之設定內容,而進而確保了系統不因BIOS之設定而產生不穩定之情況。In summary, the present invention provides an authentication method for accessing a BIOS setting, which generates a security key by using a key pre-configured in the BIOS and the authorized terminal and another key randomly generated each time the device is booted. The setting data transmitted through the management interface of the operating system and using this security key as the authentication. This method makes it impossible for other unauthorized applications in the operating system to easily access or edit the BIOS settings, and also cannot read the BIOS settings through the management interface, thereby ensuring that the system is not unstable due to BIOS settings. The situation.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,故本發明之保護範圍當視後附之申請專利範圍所界定者為準。Although the present invention has been disclosed in the above embodiments, it is not intended to limit the invention, and any one of ordinary skill in the art can make some modifications and refinements without departing from the spirit and scope of the invention. The scope of the invention is defined by the scope of the appended claims.

101...中央處理器單元101. . . Central processor unit

102...晶片組單元102. . . Chipset unit

103...唯讀記憶體單元103. . . Read only memory unit

1031...基本輸入輸出系統韌體碼1031. . . Basic input and output system firmware code

104...嵌入式控制器104. . . Embedded controller

105...儲存單元105. . . Storage unit

1051...作業系統程式碼1051. . . Operating system code

106...記憶體單元106. . . Memory unit

300...應用程式300. . . application

301...管理介面301. . . Management interface

302...基本輸入輸出系統302. . . Basic input and output system

303...嵌入式控制器303. . . Embedded controller

501...雜湊函數501. . . Hash function

502、602...互斥或運算502, 602. . . Mutual exclusion or operation

503...右旋運算503. . . Right-handed operation

601...左旋運算601. . . Left-handed operation

S201~S208、S301~S317、S320~S325、S701~S708...步驟S201 to S208, S301 to S317, S320 to S325, and S701 to S708. . . step

ECPDATA1...第一加密資料ECPDATA1. . . First encrypted data

FKEY2...固定密鑰FKEY2. . . Fixed key

PRODATA...客製化設定資料PRODATA. . . Customized setting data

RKEY2...亂數密鑰RKEY2. . . Random key

SKEY2、SKEY1...安全密鑰SKEY2, SKEY1. . . Security key

TMP1、TMP2...暫態資料TMP1, TMP2. . . Transient data

圖1所繪示一種電腦的裝置方塊圖。FIG. 1 is a block diagram of a device of a computer.

圖2為根據本發明一實施例所繪示一種存取基本輸入輸出系統之設定的認證方法的流程圖。FIG. 2 is a flow chart showing an authentication method for accessing a setting of a basic input/output system according to an embodiment of the invention.

圖3為根據本發明一示範實施例所繪示存取基本輸入輸出系統之設定的認證方法的時序流程圖。FIG. 3 is a timing diagram showing an authentication method for accessing settings of a basic input/output system according to an exemplary embodiment of the present invention.

圖4為根據本發明一示範實施例所繪示於應用程式端產生第一加密資料之資料流的示意圖。FIG. 4 is a schematic diagram showing a data flow for generating a first encrypted data on an application side according to an exemplary embodiment of the present invention.

圖5為根據本發明一示範實施例所繪示於基本輸入輸出端解密第一加密資料之資料流的示意圖。FIG. 5 is a schematic diagram of a data stream for decrypting a first encrypted data at a basic input/output terminal according to an exemplary embodiment of the present invention.

圖6為根據本發明一實施例所繪示應用程式透過管理介面傳送讀取需求與第二安全密鑰至基本輸入輸出系統之動作的時序流程圖。FIG. 6 is a timing diagram showing an operation of an application transmitting a read request and a second security key to a basic input/output system through a management interface according to an embodiment of the invention.

S201~S208...步驟S201~S208. . . step

Claims (10)

一種存取基本輸入輸出系統之設定的認證方法,包括:分別配置相同的一第一固定密鑰與一第二固定密鑰於一基本輸入輸出系統與一應用程式;由一嵌入式控制器產生一第一亂數密鑰;利用該第一亂數密鑰與該第一固定密鑰計算得到一第一安全密鑰;透過一管理介面提供該第一亂數密鑰給該應用程式作為一第二亂數密鑰;由該應用程式利用該第二亂數密鑰與該第二固定密鑰計算得到一第二安全密鑰;若該應用程式欲將一客製化設定資料存入該基本輸入輸出系統,則由該應用程式使用該第二安全密鑰對該客製化設定資料進行加密以獲得一第一加密資料,以及透過該管理介面傳送該第一加密資料至該基本輸入輸出系統;由該基本輸入輸出系統使用該第一安全密鑰對該第一加密資料進行解密以獲得該客製化設定資料;以及若該基本輸入輸出系統成功解密該第一加密資料,則該基本輸入輸出系統儲存該客製化設定資料。An authentication method for accessing a setting of a basic input/output system includes: respectively configuring a same first fixed key and a second fixed key in a basic input output system and an application; generated by an embedded controller a first random number key; using the first random number key and the first fixed key to calculate a first security key; providing the first random number key to the application as a a second random number key; the application uses the second random number key and the second fixed key to calculate a second security key; if the application wants to store a customized setting data into the The basic input/output system, the application uses the second security key to encrypt the customized setting data to obtain a first encrypted data, and transmits the first encrypted data to the basic input and output through the management interface. a system; the first encrypted data is decrypted by the basic input/output system using the first security key to obtain the customized setting data; and if the basic input/output system successfully decrypts The first encryption information, the basic input output system storing the customized configuration information. 如申請專利範圍第1項所述之認證方法,其中所述對該客製化設定資料進行加密之步驟包括:將該客製化設定資料與該第二安全密鑰進行一互斥或運算而獲得一第一暫態資料;以及將該第一暫態資料進行一右旋運算而獲得該第一加密資料。The authentication method of claim 1, wherein the step of encrypting the customized setting data comprises: mutually exclusiveizing or computing the customized setting data with the second security key; Obtaining a first transient data; and performing a right-hand operation on the first transient data to obtain the first encrypted data. 如申請專利範圍第1項所述之認證方法,其中所述對該第一加密資料進行解密之步驟包括:將該第一加密資料進行一左旋運算而獲得一第二暫態資料;以及將該第二暫態資料與該第一安全密鑰進行一互斥或運算而獲得該客製化設定資料。The authentication method of claim 1, wherein the step of decrypting the first encrypted data comprises: performing a left-handed operation on the first encrypted data to obtain a second transient data; The second transient data is mutually exclusive or operated with the first security key to obtain the customized configuration data. 如申請專利範圍第1項所述之認證方法,更包括:若該應用程式欲從該基本輸入輸出系統讀取一系統設定資料,則由該應用程式使用該第二安全密鑰對一讀取資訊進行加密以獲得一第二加密資料,以及透過該管理介面傳送該第二加密資料至該基本輸入輸出系統;由該基本輸入輸出系統使用該第一安全密鑰對該第二加密資料進行解密以獲得該讀取資訊;以及若該基本輸入輸出系統成功解密該第二加密資料,則該基本輸入輸出系統根據該讀取資訊讀取該系統設定資料,並透過該管理介面傳送該系統設定資料給該應用程式。The authentication method of claim 1, further comprising: if the application wants to read a system setting data from the basic input/output system, the application uses the second security key pair to read The information is encrypted to obtain a second encrypted data, and the second encrypted data is transmitted to the basic input/output system through the management interface; the basic encrypted output system uses the first security key to decrypt the second encrypted data Obtaining the read information; and if the basic input/output system successfully decrypts the second encrypted data, the basic input/output system reads the system setting data according to the read information, and transmits the system setting data through the management interface. Give the app. 如申請專利範圍第1項所述之認證方法,其中所述管理介面為一視窗管理規範的應用程式介面。The authentication method of claim 1, wherein the management interface is an application interface of a window management specification. 如申請專利範圍第1項所述之認證方法,更包括:在該應用程式獲得該第二亂數密鑰後,刪除該第一亂數密鑰。The authentication method of claim 1, further comprising: deleting the first random number key after the application obtains the second random number key. 如申請專利範圍第1項所述之認證方法,其中所述利用該第一亂數密鑰與該第一固定密鑰計算得到該第一安全密鑰的步驟包括:由該基本輸入輸出系統傳送該第一固定密鑰至該嵌入式控制器;由該嵌入式控制器根據該第一亂數密鑰及該第一固定密鑰計算得到該第一安全密鑰;將該第一安全密鑰傳送至該基本輸入輸出系統;以及在該基本輸入輸出系統將該第一亂數密鑰傳輸給該應用程式後,該嵌入式控制器與該基本輸入輸出系統刪除該第一亂數密鑰。The authentication method of claim 1, wherein the step of calculating the first security key by using the first random number key and the first fixed key comprises: transmitting by the basic input output system Transmitting the first fixed key to the embedded controller; calculating, by the embedded controller, the first security key according to the first random number key and the first fixed key; Transmitting to the basic input/output system; and after the basic input/output system transmits the first random number key to the application, the embedded controller and the basic input/output system delete the first random number key. 如申請專利範圍第1項所述之認證方法,其中所述利用該第一亂數密鑰與該第一固定密鑰計算得到該第一安全密鑰的步驟以及所述利用該第二亂數密鑰與該第二固定密鑰計算得到該第二安全密鑰的步驟,是使用單向函數計算該第一安全密鑰與該第二安全密鑰。The authentication method of claim 1, wherein the step of calculating the first security key by using the first random number key and the first fixed key, and the utilizing the second random number The step of calculating the second security key by the key and the second fixed key is to calculate the first security key and the second security key using a one-way function. 如申請專利範圍第8項所述之認證方法,其中所述單向函數為雜湊函數。The authentication method of claim 8, wherein the one-way function is a hash function. 如申請專利範圍第1項所述之認證方法,其中所述該基本輸入輸出系統儲存該客製化設定資料之步驟包括:該基本輸入輸出系統將該客製化設定資料儲存至該嵌入式控制器。The authentication method of claim 1, wherein the step of storing the customized setting data by the basic input/output system comprises: storing, by the basic input/output system, the customized setting data to the embedded control Device.
TW100129977A 2011-08-22 2011-08-22 Authentication method for accessing profile of basic input/output system TWI436280B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW100129977A TWI436280B (en) 2011-08-22 2011-08-22 Authentication method for accessing profile of basic input/output system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW100129977A TWI436280B (en) 2011-08-22 2011-08-22 Authentication method for accessing profile of basic input/output system

Publications (2)

Publication Number Publication Date
TW201310344A TW201310344A (en) 2013-03-01
TWI436280B true TWI436280B (en) 2014-05-01

Family

ID=48482002

Family Applications (1)

Application Number Title Priority Date Filing Date
TW100129977A TWI436280B (en) 2011-08-22 2011-08-22 Authentication method for accessing profile of basic input/output system

Country Status (1)

Country Link
TW (1) TWI436280B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106855814A (en) * 2015-12-09 2017-06-16 广达电脑股份有限公司 The system and method for management basic input output system setting
US10867045B2 (en) 2015-09-30 2020-12-15 Hewlett-Packard Development Company, L.P. Runtime verification using external device

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9437967B2 (en) 2011-12-30 2016-09-06 Bedrock Automation Platforms, Inc. Electromagnetic connector for an industrial control system
US11967839B2 (en) 2011-12-30 2024-04-23 Analog Devices, Inc. Electromagnetic connector for an industrial control system
US9191203B2 (en) 2013-08-06 2015-11-17 Bedrock Automation Platforms Inc. Secure industrial control system
US9600434B1 (en) 2011-12-30 2017-03-21 Bedrock Automation Platforms, Inc. Switch fabric having a serial communications interface and a parallel communications interface
US10834094B2 (en) 2013-08-06 2020-11-10 Bedrock Automation Platforms Inc. Operator action authentication in an industrial control system
US9727511B2 (en) 2011-12-30 2017-08-08 Bedrock Automation Platforms Inc. Input/output module with multi-channel switching capability
US9467297B2 (en) 2013-08-06 2016-10-11 Bedrock Automation Platforms Inc. Industrial control system redundant communications/control modules authentication
US8971072B2 (en) 2011-12-30 2015-03-03 Bedrock Automation Platforms Inc. Electromagnetic connector for an industrial control system
US11144630B2 (en) 2011-12-30 2021-10-12 Bedrock Automation Platforms Inc. Image capture devices for a secure industrial control system
US12061685B2 (en) 2011-12-30 2024-08-13 Analog Devices, Inc. Image capture devices for a secure industrial control system
US10834820B2 (en) 2013-08-06 2020-11-10 Bedrock Automation Platforms Inc. Industrial control system cable
US11314854B2 (en) 2011-12-30 2022-04-26 Bedrock Automation Platforms Inc. Image capture devices for a secure industrial control system
US8868813B2 (en) 2011-12-30 2014-10-21 Bedrock Automation Platforms Inc. Communications control system with a serial communications interface and a parallel communications interface
US8862802B2 (en) 2011-12-30 2014-10-14 Bedrock Automation Platforms Inc. Switch fabric having a serial communications interface and a parallel communications interface
US10613567B2 (en) 2013-08-06 2020-04-07 Bedrock Automation Platforms Inc. Secure power supply for an industrial control system
TWI493463B (en) * 2013-10-30 2015-07-21 Insyde Software Corp Electronic device, universal extension firmware interface Basic input and output system firmware update method, recording media and computer program products
TWI691836B (en) * 2018-11-20 2020-04-21 神雲科技股份有限公司 Boot phase identification method for bios

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10867045B2 (en) 2015-09-30 2020-12-15 Hewlett-Packard Development Company, L.P. Runtime verification using external device
CN106855814A (en) * 2015-12-09 2017-06-16 广达电脑股份有限公司 The system and method for management basic input output system setting
US9875113B2 (en) 2015-12-09 2018-01-23 Quanta Computer Inc. System and method for managing BIOS setting configurations
CN106855814B (en) * 2015-12-09 2020-11-24 广达电脑股份有限公司 System and method for managing BIOS settings

Also Published As

Publication number Publication date
TW201310344A (en) 2013-03-01

Similar Documents

Publication Publication Date Title
TWI436280B (en) Authentication method for accessing profile of basic input/output system
US10931451B2 (en) Securely recovering a computing device
US11574061B2 (en) Rollback resistant security
JP4971466B2 (en) Secure boot of computing devices
US8826405B2 (en) Trusting an unverified code image in a computing device
JP4848458B2 (en) Persistent security system and persistent security method
TW201717000A (en) Method and computing device for ensuring management controller firmware security
US11068599B2 (en) Secure initialization using embedded controller (EC) root of trust
TWI617946B (en) Device and method for safely starting embedded controller
CN102982265B (en) Authentication method for storing basic input and output system (BIOS) setting
WO2023179745A1 (en) Trusted verification method and apparatus
WO2024027472A1 (en) Method for determining state of kernel, and related device
CN111357003A (en) Data protection in a pre-operating system environment
US11966748B2 (en) Dynamic boot configuration
US20240037216A1 (en) Systems And Methods For Creating Trustworthy Orchestration Instructions Within A Containerized Computing Environment For Validation Within An Alternate Computing Environment
US20220043915A1 (en) Storage of network credentials