CN116821976A - Hard disk access method and device - Google Patents

Hard disk access method and device Download PDF

Info

Publication number
CN116821976A
CN116821976A CN202310762238.7A CN202310762238A CN116821976A CN 116821976 A CN116821976 A CN 116821976A CN 202310762238 A CN202310762238 A CN 202310762238A CN 116821976 A CN116821976 A CN 116821976A
Authority
CN
China
Prior art keywords
hard disk
management controller
baseboard management
key
cpu
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202310762238.7A
Other languages
Chinese (zh)
Inventor
洪意钦
刘春明
陈梁
袁文君
严雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202310762238.7A priority Critical patent/CN116821976A/en
Publication of CN116821976A publication Critical patent/CN116821976A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • G06F21/79Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data in semiconductor storage media, e.g. directly-addressable memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Abstract

The application discloses a hard disk access method and a hard disk access device, which are used for avoiding using a storage medium outside equipment where a hard disk is positioned to store keys of the hard disk, and the keys of different equipment hard disks are different and cannot be mutually decrypted, so that the data security of the hard disk is improved. The method provided by the application comprises the following steps: when data is required to be written into a hard disk connected with a CPU in a local server, sending an encryption operation instruction aiming at the hard disk to a baseboard management controller connected with the CPU in the local server; the encryption operation instruction is used for instructing the baseboard management controller to provide a key for encrypting data in the hard disk; receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller; and encrypting the data in the hard disk connected with the CPU in the local server by using the key.

Description

Hard disk access method and device
Technical Field
The present application relates to the field of data security technologies, and in particular, to a method and apparatus for accessing a hard disk.
Background
The existing computer security system generally comprises two types, namely, management of user access rights is carried out through software; and secondly, encrypting the data in the solid state disk.
However, in the existing method for encrypting the data in the solid state disk, the key is stored in a storage medium outside the device where the hard disk is located, and once the storage medium is lost, a great security risk is caused. Also, since the decryption keys of each device are identical, the risk of data leakage in the hard disk may be increased.
Disclosure of Invention
The embodiment of the application provides a hard disk access method and a hard disk access device, which are used for avoiding using a storage medium outside equipment where a hard disk is positioned to store keys of the hard disk, and the keys of different equipment hard disks are different and cannot be mutually decrypted, so that the data security of the hard disk is improved.
The hard disk access method provided by the embodiment of the application comprises the following steps:
when data is required to be written into a hard disk connected with a CPU in a local server, sending an encryption operation instruction aiming at the hard disk to a baseboard management controller connected with the CPU in the local server; the encryption operation instruction is used for instructing the baseboard management controller to provide a key for encrypting data in the hard disk;
Receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
and encrypting the data in the hard disk connected with the CPU in the local server by using the key.
According to the hard disk access method provided by the embodiment of the application, when data is required to be written into a hard disk connected with a CPU in a local server, an encryption operation instruction aiming at the hard disk is sent to a baseboard management controller connected with the CPU in the local server; the encryption operation instruction is used for instructing the baseboard management controller to provide a key for encrypting data in the hard disk; receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller; and encrypting the data in the hard disk connected with the CPU in the local server by using the key. Therefore, the method and the device realize that the key of the hard disk is stored independently of a storage medium outside the server equipment, so that the key is not easy to lose, the reliability is higher, and the hard disk keys on different server equipment have uniqueness, thereby achieving the effect of one machine and one cipher and having higher safety. Therefore, the hard disk access method provided by the embodiment of the application improves the security of hard disk data.
In some embodiments, the method further comprises: verifying the hard disk and verifying the baseboard management controller;
the encryption operation instruction is sent when verification of the hard disk and the baseboard management controller is successful.
In some embodiments, the information of the server includes one or a combination of the following information:
a universal unique identification code of the baseboard management controller;
the serial number of the server;
the serial number of the model to which the server belongs;
and the media access control address of the server.
In some embodiments, the method further comprises:
when the data is required to be read from the hard disk, a decryption operation instruction for the hard disk which is connected with the CPU in the local server is sent, and a baseboard management controller which is connected with the CPU in the local server is established; the decryption operation instruction is used for instructing the baseboard management controller to provide a key for decrypting data in the hard disk;
receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
And decrypting the data in the hard disk connected with the CPU in the local server by using the key.
The hard disk access method provided by the embodiment of the application comprises the following steps:
when data is required to be read from a hard disk connected with a CPU in a local server, a decryption operation instruction aiming at the hard disk is sent, and a baseboard management controller connected with the CPU in the local server is established; the decryption operation instruction is used for instructing the baseboard management controller to provide a key for decrypting data in the hard disk;
receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
and decrypting the data in the hard disk connected with the CPU in the local server by using the key.
In some embodiments, the method further comprises: verifying the hard disk and verifying the baseboard management controller;
the decryption operation instruction is sent when verification of the hard disk and the baseboard management controller is successful.
In some embodiments, the information of the server includes one or a combination of the following information:
A universal unique identification code of the baseboard management controller;
the serial number of the server;
the serial number of the model to which the server belongs;
and the media access control address of the server.
The hard disk access device provided by the embodiment of the application comprises:
the first module is used for sending an encryption operation instruction aiming at the hard disk to the baseboard management controller which establishes connection with the CPU in the local server when the data is required to be written into the hard disk which establishes connection with the CPU in the local server; the encryption operation instruction is used for instructing the baseboard management controller to provide a key for encrypting data in the hard disk;
a second module, configured to receive a key provided by the baseboard management controller, where the key is generated by the baseboard management controller based on the information of the server and stored in the baseboard management controller;
and a third module for encrypting the data in the hard disk connected with the CPU in the local server by using the key.
The hard disk access device provided by the embodiment of the application comprises:
a first module for sending a decryption operation instruction for a hard disk when data needs to be read from the hard disk which is connected with a CPU in a local server, and a baseboard management controller which is connected with the CPU in the local server; the decryption operation instruction is used for instructing the baseboard management controller to provide a key for decrypting data in the hard disk;
A second module, configured to receive a key provided by the baseboard management controller, where the key is generated by the baseboard management controller based on the information of the server and stored in the baseboard management controller;
and the third module is used for decrypting the data in the hard disk connected with the CPU in the local server by utilizing the key.
The CPU provided by the embodiment of the application comprises: the hard disk access device.
The server provided by the embodiment of the application comprises: a CPU, and a hard disk and a baseboard management controller respectively connected with the CPU; wherein:
the CPU is used for:
when data is required to be written into a hard disk connected with a CPU in a local server, sending an encryption operation instruction aiming at the hard disk to a baseboard management controller connected with the CPU in the local server; the encryption operation instruction is used for instructing the baseboard management controller to provide a key for encrypting data in the hard disk;
receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
Encrypting data in a hard disk connected with a CPU in a local server by using the key;
and/or, the CPU is configured to:
when data is required to be read from a hard disk connected with a CPU in a local server, a decryption operation instruction aiming at the hard disk is sent, and a baseboard management controller connected with the CPU in the local server is established; the decryption operation instruction is used for instructing the baseboard management controller to provide a key for decrypting data in the hard disk;
receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
and decrypting the data in the hard disk connected with the CPU in the local server by using the key.
Another embodiment of the present application provides an electronic device, including a memory for storing program instructions and a processor for calling the program instructions stored in the memory, and executing any one of the methods according to the obtained program.
Furthermore, according to an embodiment, for example, a computer program product for a computer is provided, comprising software code portions for performing the steps of the method defined above, when said product is run on a computer. The computer program product may include a computer-readable medium having software code portions stored thereon. Furthermore, the computer program product may be directly loaded into the internal memory of the computer and/or transmitted via the network by at least one of an upload procedure, a download procedure and a push procedure.
Another embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for causing the computer to perform any of the methods described above.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a general flow diagram of a method for accessing a hard disk according to an embodiment of the present application;
fig. 2 is a specific flow chart of a method for accessing a hard disk according to an embodiment of the present application;
FIG. 3 is a schematic general flow chart of another method for accessing a hard disk according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a hard disk access device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The embodiment of the application provides a hard disk access method and a hard disk access device, which are used for avoiding using a storage medium outside equipment where a hard disk is positioned to store keys of the hard disk, and the keys of different equipment hard disks are different and cannot be mutually decrypted, so that the data security of the hard disk is improved.
The method and the device are based on the same application, and because the principles of solving the problems by the method and the device are similar, the implementation of the device and the method can be referred to each other, and the repetition is not repeated.
The terms first, second and the like in the description and in the claims of embodiments of the application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The following examples and embodiments are to be construed as illustrative only. Although the specification may refer to "an", "one", or "some" example or embodiment(s) at several points, this does not mean that each such reference is related to the same example or embodiment, nor that the feature is applicable to only a single example or embodiment. Individual features of different embodiments may also be combined to provide further embodiments. Furthermore, terms such as "comprising" and "including" should be understood not to limit the described embodiments to consist of only those features already mentioned; such examples and embodiments may also include features, structures, units, modules, etc. that are not specifically mentioned.
Various embodiments of the application are described in detail below with reference to the drawings attached to the specification. It should be noted that, the display sequence of the embodiments of the present application only represents the sequence of the embodiments, and does not represent the advantages or disadvantages of the technical solutions provided by the embodiments.
Referring to fig. 1, a method for accessing a hard disk according to an embodiment of the present application includes:
s101, when data is required to be written into a hard disk connected with a CPU in a local server, sending an encryption operation instruction aiming at the hard disk to a baseboard management controller (Baseboard Management Controller, BMC) connected with the CPU in the local server; the encryption operation instruction is used for instructing the baseboard management controller to provide a key for encrypting data in the hard disk;
S102, receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
s103, encrypting the data in the hard disk connected with the CPU in the local server by using the key.
In some embodiments, the method further comprises: verifying the hard disk and verifying the baseboard management controller;
the encryption operation instruction is sent when verification of the hard disk and the baseboard management controller is successful.
The steps of verifying the hard disk and verifying the baseboard management controller may be performed simultaneously or sequentially, and the specific order is not limited.
In some embodiments, the information of the server includes one or a combination of the following information:
a universal unique identification code of the baseboard management controller;
the serial number of the server;
the serial number of the model to which the server belongs;
and the media access control address of the server.
In some embodiments, the method further comprises:
when the data is required to be read from the hard disk, a decryption operation instruction for the hard disk which is connected with the CPU in the local server is sent, and a baseboard management controller which is connected with the CPU in the local server is established; the decryption operation instruction is used for instructing the baseboard management controller to provide a key for decrypting data in the hard disk;
Receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
and decrypting the data in the hard disk connected with the CPU in the local server by using the key.
That is, the method for accessing a hard disk provided by the embodiment of the application includes a method for encrypting and/or decrypting the hard disk.
Referring to fig. 2, a specific flow of a hard disk access method provided by an embodiment of the present application includes the following steps:
s201, the server device is inserted into a hard disk, and the CPU is powered on.
S202, receiving a hard disk access password input by a user and verifying the hard disk access password;
s203, judging whether the verification of the hard disk is successful, if so, executing S204, otherwise, ending the flow;
after the hard disk passes the verification, the read-write permission of the hard disk can be obtained.
If the hard disk is electrified for the first time, an access password is set for the hard disk, and the password is written into the hard disk.
S204, enabling a hard disk access device in the CPU, and issuing a command by the hard disk access device, wherein the command is used for establishing connection between the hard disk access device and the BMC and authenticating the BMC;
The establishing the connection between the hard disk access device and the BMC, and authenticating the BMC through the hard disk access device, for example, includes: and issuing an ipmi command to establish connection with the BMC through an ipmi tool in the hard disk access device, wherein the ipmi command carries authentication information, and the authentication information comprises: server vendor unique identification, BMC username, password, etc.
S205, the BMC receives the command issued by the hard disk access device in the step S204, authenticates the authentication information in the command and returns the authentication result to the hard disk access device.
The authentication method is as follows: checking whether the ipmi command contains a server manufacturer unique mark, a BMC user name and a password according to the data length of the ipmi command, if so, performing the next authentication, and if not, indicating authentication failure;
the next authentication includes, for example: and sequentially checking whether the server manufacturer unique mark, the BMC user name and the password are respectively consistent with the server manufacturer unique mark, the BMC user name and the password set in the BMC, wherein if the server manufacturer unique mark, the BMC user name and the password are consistent with the server manufacturer unique mark, the BMC user name and the password respectively, authentication is successful, and if the server manufacturer unique mark, the BMC user name and the password are inconsistent with the server manufacturer unique mark, the BMC user name and the password, authentication failure is indicated.
After authentication is completed, the BMC returns an authentication result to the hard disk access device through the ipmi command.
S206, after receiving the authentication result in the ipmi command in the step S205, the hard disk access device judges whether the authentication to the BMC is successful, and if the authentication result indicates that the authentication is successful, the step S207 is executed; if the authentication is unsuccessful, the hard disk access operation cannot be performed, namely the process is ended.
S207, the hard disk access device can send a hard disk access (encryption or decryption) operation instruction to the BMC through an ipmi command.
S207a, if the CPU writes data into the hard disk for the first time, the hard disk access device issues an encryption operation instruction for the hard disk to the BMC.
And S208a, after the BMC receives the encryption operation instruction, returning the hard disk encryption key to the hard disk access device through the ipmi command.
If the encryption key does not exist, the BMC obtains the UUID (universal unique identifier, universally Unique Identifier) of the BMC, the unique serial number of the server, the serial number of the model to which the server device belongs, and the MAC (Media Access Control ) address of the server, and generates the encryption key as an encryption factor, for example, by using a KDF (Key Derivation Function) algorithm.
The initial use of the KDF algorithm is key derivation, i.e., generating a key from a secret password or passphrase. The currently mainstream static key generation algorithm is a KDF algorithm.
In some embodiments, after the encryption key is successfully generated, the BMC stores the encryption key in a region where the factory configuration of the BMC is not lost, that is, a region where the factory configuration is not actively cleared when the BMC performs the factory configuration restoration operation, where the region is specified by each server manufacturer, for example, a storage medium such as flash, DDR, emmc, and the storage medium is a device inherent to the server device, so that the hard disk cannot be decrypted after the encryption key is lost when the factory configuration is restored.
S209a, after receiving the encryption key provided by the BMC, the hard disk access device firstly stores the encryption key in the memory of the hard disk access device, then encrypts the data through the encryption key, and then writes the encrypted data into the hard disk.
S207b, if the CPU reads data from the hard disk for the first time, the hard disk access device issues a decryption operation instruction for the hard disk.
And S208b, after receiving the decryption operation instruction, the BMC returns the decryption key of the hard disk to the hard disk access device through the ipmi command.
If the decryption key does not exist (the decryption key does not exist when the server device does not perform the hard disk encryption operation), the BMC acquires the UUID of the BMC, the unique serial number of the server, the serial number of the model to which the server device belongs, and the MAC address of the server, and generates the decryption key as an encryption factor, for example, through a KDF (Key Derivation Function) algorithm.
It should be noted that the encryption key and the decryption key may be the same key, or may be different keys.
In some embodiments, after the decryption key is successfully generated, the BMC stores the decryption key in a region where the factory configuration of the BMC is not lost, that is, a region where the factory configuration is not actively cleared when the BMC performs the factory configuration restoration operation, where the region is specified by each server manufacturer, for example, a storage medium such as flash, DDR, emmc, and the storage medium is a device inherent to the server device, so that the hard disk cannot be decrypted after the decryption key is lost when the factory configuration is restored.
And S209b, after receiving the decryption key provided by the BMC, the hard disk access device firstly stores the decryption key in a memory of the hard disk access device, and then decrypts the read hard disk data through the decryption key, so that the CPU obtains the decrypted hard disk data.
Accordingly, referring to fig. 3, a hard disk access method (decryption method) provided by an embodiment of the present application includes:
s301, when data need to be read from a hard disk connected with a CPU in a local server, a decryption operation instruction aiming at the hard disk is sent, and a baseboard management controller connected with the CPU in the local server is established; the decryption operation instruction is used for instructing the baseboard management controller to provide a key for decrypting data in the hard disk;
S302, receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
s303, decrypting the data in the hard disk connected with the CPU in the local server by using the key.
In some embodiments, the method further comprises: verifying the hard disk and verifying the baseboard management controller;
the decryption operation instruction is sent when verification of the hard disk and the baseboard management controller is successful.
In some embodiments, the information of the server includes one or a combination of the following information:
a universal unique identification code of the baseboard management controller;
the serial number of the server;
the serial number of the model to which the server belongs;
and the media access control address of the server.
The following describes a device or apparatus provided by an embodiment of the present application, where explanation or illustration of the same or corresponding technical features as those described in the above method is omitted.
Referring to fig. 4, an electronic device provided in an embodiment of the present application includes:
The processor 500, configured to read the program in the memory 520, performs the following procedures:
when data is required to be written into a hard disk connected with a CPU in a local server, sending an encryption operation instruction aiming at the hard disk to a baseboard management controller connected with the CPU in the local server; the encryption operation instruction is used for instructing the baseboard management controller to provide a key for encrypting data in the hard disk;
receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
and encrypting the data in the hard disk connected with the CPU in the local server by using the key.
In some embodiments, the processor 500 is further configured to read the program in the memory 520, and perform the following procedure: verifying the hard disk and verifying the baseboard management controller;
the encryption operation instruction is sent when verification of the hard disk and the baseboard management controller is successful.
In some embodiments, the information of the server includes one or a combination of the following information:
A universal unique identification code of the baseboard management controller;
the serial number of the server;
the serial number of the model to which the server belongs;
and the media access control address of the server.
In some embodiments, the processor 500 is further configured to read the program in the memory 520, and perform the following procedure:
when the data is required to be read from the hard disk, a decryption operation instruction for the hard disk which is connected with the CPU in the local server is sent, and a baseboard management controller which is connected with the CPU in the local server is established; the decryption operation instruction is used for instructing the baseboard management controller to provide a key for decrypting data in the hard disk;
receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
and decrypting the data in the hard disk connected with the CPU in the local server by using the key.
Alternatively, the processor 500, configured to read the program in the memory 520, performs the following procedure:
when data is required to be read from a hard disk connected with a CPU in a local server, a decryption operation instruction aiming at the hard disk is sent, and a baseboard management controller connected with the CPU in the local server is established; the decryption operation instruction is used for instructing the baseboard management controller to provide a key for decrypting data in the hard disk;
Receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
and decrypting the data in the hard disk connected with the CPU in the local server by using the key.
A transceiver 510 for receiving and transmitting data under the control of the processor 500.
Wherein in fig. 4, a bus architecture may comprise any number of interconnected buses and bridges, and in particular one or more processors represented by processor 500 and various circuits of memory represented by memory 520, linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are well known in the art and, therefore, will not be described further herein. The bus interface provides an interface. The transceiver 510 may be a number of elements, including a transmitter and a receiver, providing a means for communicating with various other apparatus over transmission media, including wireless channels, wired channels, optical cables, and the like. The processor 500 is responsible for managing the bus architecture and general processing, and the memory 520 may store data used by the processor 500 in performing operations.
The processor 500 may be a Central Processing Unit (CPU), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA) or a complex programmable logic device (Complex Programmable Logic Device, CPLD), or it may employ a multi-core architecture.
It should be noted that, the above device provided in the embodiment of the present application can implement all the method steps implemented in the method embodiment and achieve the same technical effects, and detailed descriptions of the same parts and beneficial effects as those in the method embodiment in this embodiment are omitted.
Referring to fig. 5, a hard disk access device provided in an embodiment of the present application includes: a first module 501, a second module 502, and a third module 503.
A first module 501, configured to send an encryption operation instruction for a hard disk connected to a CPU in a local server to a baseboard management controller connected to the CPU in the local server when data needs to be written to the hard disk; the encryption operation instruction is used for instructing the baseboard management controller to provide a key for encrypting data in the hard disk;
A second module 502, configured to receive a key provided by the baseboard management controller, where the key is generated by the baseboard management controller based on the information of the server and stored in the baseboard management controller;
a third module 503, configured to encrypt data in a hard disk connected to the CPU in the local server by using the key.
And/or the number of the groups of groups,
a first module 501, configured to, when data needs to be read from a hard disk connected to a CPU in a local server, send a decryption operation instruction for the hard disk, and establish a baseboard management controller connected to the CPU in the local server; the decryption operation instruction is used for instructing the baseboard management controller to provide a key for decrypting data in the hard disk;
a second module 502, configured to receive a key provided by the baseboard management controller, where the key is generated by the baseboard management controller based on the information of the server and stored in the baseboard management controller;
a third module 503, configured to decrypt data in a hard disk connected to the CPU in the local server by using the key.
In some embodiments, the first module 501 is further configured to: verifying the hard disk and verifying the baseboard management controller;
The encryption operation instruction is sent when verification of the hard disk and the baseboard management controller is successful.
In some embodiments, the information of the server includes one or a combination of the following information:
a universal unique identification code of the baseboard management controller;
the serial number of the server;
the serial number of the model to which the server belongs;
and the media access control address of the server.
That is, the hard disk access device may be a hard disk encryption device or a hard disk decryption device, and thus the hard disk access device may also be referred to as a hard disk encryption/decryption device.
It should be noted that, in the embodiment of the present application, the division of the units is schematic, which is merely a logic function division, and other division manners may be implemented in actual practice. In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Referring to fig. 6, a CPU provided in an embodiment of the present application includes: the hard disk access device.
The server provided by the embodiment of the application comprises the following components: a CPU 601, and a baseboard management controller 602 and a hard disk 603 connected to the CPU 601, respectively; wherein:
the CPU 601 is configured to:
when data needs to be written into a hard disk 603 connected with a CPU in a local server, sending an encryption operation instruction aiming at the hard disk 603 to a baseboard management controller 602 connected with the CPU in the local server; the encryption operation instruction is used to instruct the baseboard management controller 602 to provide a key for encrypting the data in the hard disk 603;
receiving a key provided by the baseboard management controller 602, wherein the key is generated by the baseboard management controller 602 based on the information of the server and stored in the baseboard management controller;
encrypting data in a hard disk 603 connected with a CPU in a local server by using the key;
and/or, the CPU 601 is configured to:
when data needs to be read from a hard disk 603 connected with a CPU in a local server, a decryption operation instruction for the hard disk 603 is sent, and a baseboard management controller 602 connected with the CPU in the local server is established; the decryption operation instruction is used to instruct the baseboard management controller 602 to provide a key for decrypting the data in the hard disk 603;
Receiving a key provided by the baseboard management controller 602, wherein the key is generated by the baseboard management controller based on the information of the server and stored in the baseboard management controller 602;
the data in the hard disk 603, which establishes a connection with the CPU in the local server, is decrypted using the key.
In some embodiments, the CPU 601 is further configured to: verifying the hard disk and verifying the baseboard management controller;
the encryption operation instruction and the decryption operation instruction are sent when verification of the hard disk and the baseboard management controller is successful.
In some embodiments, the information of the server includes one or a combination of the following information:
a universal unique identification code of the baseboard management controller;
the serial number of the server;
the serial number of the model to which the server belongs;
and the media access control address of the server.
Embodiments of the present application provide a computing device, which may be specifically a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA), and the like. The computing device may include a central processing unit (Center Processing Unit, CPU), memory, input/output devices, etc., the input devices may include a keyboard, mouse, touch screen, etc., and the output devices may include a display device, such as a liquid crystal display (Liquid Crystal Display, LCD), cathode Ray Tube (CRT), etc.
The memory may include Read Only Memory (ROM) and Random Access Memory (RAM) and provides the processor with program instructions and data stored in the memory. In the embodiment of the present application, the memory may be used to store a program of any of the methods provided in the embodiment of the present application.
The processor is configured to execute any of the methods provided by the embodiments of the present application according to the obtained program instructions by calling the program instructions stored in the memory.
Embodiments of the present application also provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the method of any of the above embodiments. The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
An embodiment of the present application provides a computer readable storage medium storing computer program instructions for use in an apparatus provided in the embodiment of the present application, where the computer program instructions include a program for executing any one of the methods provided in the embodiment of the present application. The computer readable storage medium may be a non-transitory computer readable medium.
The computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including, but not limited to, magnetic storage (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical storage (e.g., CD, DVD, BD, HVD, etc.), and semiconductor storage (e.g., ROM, EPROM, EEPROM, nonvolatile storage (NAND FLASH), solid State Disk (SSD)), etc.
It should be understood that:
the access technology via which an entity in the communication network communicates traffic may be any suitable current or future technology, such as WLAN (wireless local access network), wiMAX (worldwide interoperability for microwave access), LTE-a, 5G, bluetooth, infrared, etc. may be used; in addition, embodiments may also apply wired technologies, e.g., IP-based access technologies, such as wired networks or fixed lines.
Embodiments suitable for implementation as software code or portions thereof and for execution using a processor or processing function are software code independent and may be specified using any known or future developed programming language, such as a high-level programming language, such as an objective-C, C, C ++, c#, java, python, javascript, other scripting languages, etc., or a low-level programming language, such as a machine language or assembler.
The implementation of the embodiments is hardware-independent and may be implemented using any known or future developed hardware technology or any hybrid thereof, such as microprocessors or CPUs (central processing units), MOS (metal oxide semiconductors), CMOS (complementary MOS), biMOS (bipolar MOS), biCMOS (bipolar CMOS), ECL (emitter coupled logic), and/or TTL (transistor-transistor logic).
Embodiments may be implemented as a single device, apparatus, unit, component, or function, or in a distributed fashion, e.g., one or more processors or processing functions may be used or shared in a process, or one or more processing segments or portions may be used and shared in a process where one physical processor or more than one physical processor may be used to implement one or more processing portions dedicated to a particular process as described.
The apparatus may be implemented by a semiconductor chip, a chipset, or a (hardware) module comprising such a chip or chipset.
Embodiments may also be implemented as any combination of hardware and software, such as an ASIC (application specific IC (integrated circuit)) component, an FPGA (field programmable gate array) or CPLD (complex programmable logic device) component, or a DSP (digital signal processor) component.
Embodiments may also be implemented as a computer program product comprising a computer usable medium having a computer readable program code embodied therein, the computer readable program code adapted to perform a process as described in the embodiments, wherein the computer usable medium may be a non-transitory medium.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (14)

1. A method of accessing a hard disk, the method comprising:
when data is required to be written into a hard disk connected with a CPU in a local server, sending an encryption operation instruction aiming at the hard disk to a baseboard management controller connected with the CPU in the local server; the encryption operation instruction is used for instructing the baseboard management controller to provide a key for encrypting data in the hard disk;
Receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
and encrypting the data in the hard disk connected with the CPU in the local server by using the key.
2. The method according to claim 1, wherein the method further comprises: verifying the hard disk and verifying the baseboard management controller;
the encryption operation instruction is sent when verification of the hard disk and the baseboard management controller is successful.
3. The method of claim 1, wherein the information of the server comprises one or a combination of the following information:
a universal unique identification code of the baseboard management controller;
the serial number of the server;
the serial number of the model to which the server belongs;
and the media access control address of the server.
4. The method according to claim 1, wherein the method further comprises:
when the data is required to be read from the hard disk, a decryption operation instruction for the hard disk which is connected with the CPU in the local server is sent, and a baseboard management controller which is connected with the CPU in the local server is established; the decryption operation instruction is used for instructing the baseboard management controller to provide a key for decrypting data in the hard disk;
Receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
and decrypting the data in the hard disk connected with the CPU in the local server by using the key.
5. A method of accessing a hard disk, the method comprising:
when data is required to be read from a hard disk connected with a CPU in a local server, a decryption operation instruction aiming at the hard disk is sent, and a baseboard management controller connected with the CPU in the local server is established; the decryption operation instruction is used for instructing the baseboard management controller to provide a key for decrypting data in the hard disk;
receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
and decrypting the data in the hard disk connected with the CPU in the local server by using the key.
6. The method of claim 5, wherein the method further comprises: verifying the hard disk and verifying the baseboard management controller;
The decryption operation instruction is sent when verification of the hard disk and the baseboard management controller is successful.
7. The method of claim 5, wherein the server information comprises one or a combination of the following:
a universal unique identification code of the baseboard management controller;
the serial number of the server;
the serial number of the model to which the server belongs;
and the media access control address of the server.
8. A hard disk access device, comprising:
the first module is used for sending an encryption operation instruction aiming at the hard disk to the baseboard management controller which establishes connection with the CPU in the local server when the data is required to be written into the hard disk which establishes connection with the CPU in the local server; the encryption operation instruction is used for instructing the baseboard management controller to provide a key for encrypting data in the hard disk;
a second module, configured to receive a key provided by the baseboard management controller, where the key is generated by the baseboard management controller based on the information of the server and stored in the baseboard management controller;
and a third module for encrypting the data in the hard disk connected with the CPU in the local server by using the key.
9. A hard disk access device, comprising:
a first module for sending a decryption operation instruction for a hard disk when data needs to be read from the hard disk which is connected with a CPU in a local server, and a baseboard management controller which is connected with the CPU in the local server; the decryption operation instruction is used for instructing the baseboard management controller to provide a key for decrypting data in the hard disk;
a second module, configured to receive a key provided by the baseboard management controller, where the key is generated by the baseboard management controller based on the information of the server and stored in the baseboard management controller;
and the third module is used for decrypting the data in the hard disk connected with the CPU in the local server by utilizing the key.
10. A CPU, comprising: the hard disk access device of claim 8, and/or the hard disk access device of claim 9.
11. A server, comprising: a CPU, and a hard disk and a baseboard management controller respectively connected with the CPU; wherein:
the CPU is used for:
when data is required to be written into a hard disk connected with a CPU in a local server, sending an encryption operation instruction aiming at the hard disk to a baseboard management controller connected with the CPU in the local server; the encryption operation instruction is used for instructing the baseboard management controller to provide a key for encrypting data in the hard disk;
Receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
encrypting data in a hard disk connected with a CPU in a local server by using the key;
and/or, the CPU is configured to:
when data is required to be read from a hard disk connected with a CPU in a local server, a decryption operation instruction aiming at the hard disk is sent, and a baseboard management controller connected with the CPU in the local server is established; the decryption operation instruction is used for instructing the baseboard management controller to provide a key for decrypting data in the hard disk;
receiving a key provided by the baseboard management controller, wherein the key is generated by the baseboard management controller based on the information of the server and is stored in the baseboard management controller;
and decrypting the data in the hard disk connected with the CPU in the local server by using the key.
12. An electronic device, comprising:
a memory for storing program instructions;
a processor for invoking program instructions stored in said memory to perform the method of any of claims 1-7 in accordance with the obtained program.
13. A computer program product for a computer, characterized in that it comprises software code portions for performing the method according to any of claims 1 to 7 when the product is run on the computer.
14. A computer-readable storage medium storing computer-executable instructions for causing a computer to perform the method of any one of claims 1 to 7.
CN202310762238.7A 2023-06-26 2023-06-26 Hard disk access method and device Pending CN116821976A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310762238.7A CN116821976A (en) 2023-06-26 2023-06-26 Hard disk access method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310762238.7A CN116821976A (en) 2023-06-26 2023-06-26 Hard disk access method and device

Publications (1)

Publication Number Publication Date
CN116821976A true CN116821976A (en) 2023-09-29

Family

ID=88125176

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310762238.7A Pending CN116821976A (en) 2023-06-26 2023-06-26 Hard disk access method and device

Country Status (1)

Country Link
CN (1) CN116821976A (en)

Similar Documents

Publication Publication Date Title
CN106416121B (en) Common mode RSA key pair for signature generation and encryption/decryption
CN110460439A (en) Information transferring method, device, client, server-side and storage medium
CN110971398A (en) Data processing method, device and system
WO2021208906A1 (en) Data transmission, processing, and authorization
CN111355684B (en) Internet of things data transmission method, device and system, electronic equipment and medium
CN106295374B (en) A kind of encryption Hub device for supporting multiple UFS equipment
CN110598429B (en) Data encryption storage and reading method, terminal equipment and storage medium
US20220366030A1 (en) Password Management Method and Related Apparatus
CN112632521A (en) Request response method and device, electronic equipment and storage medium
CN109450620A (en) The method and mobile terminal of security application are shared in a kind of mobile terminal
CN106295373B (en) A kind of data transmission encryption device realized based on M-PHY interface
JP2023552421A (en) Remote management of hardware security modules
CN104935435A (en) Login methods, terminal and application server
CN113849847A (en) Method, apparatus and medium for encrypting and decrypting sensitive data
CN113826352A (en) Cryptographic key coordination between trusted containers in a multi-node cluster
CN106302316A (en) Cipher management method and device, system
CN114095277A (en) Power distribution network secure communication method, secure access device and readable storage medium
CN106372516B (en) A kind of encryption Hub device realized based on M-PHY interface
CN106384054B (en) A kind of encryption Hub device realized based on PCIE interface
WO2022251987A1 (en) Data encryption and decryption method and apparatus
CN109960935B (en) Method, device and storage medium for determining trusted state of TPM (trusted platform Module)
CN113038463B (en) Communication encryption authentication experimental device
WO2021170049A1 (en) Method and apparatus for recording access behavior
CN112512048B (en) Mobile network access system, method, storage medium and electronic device
CN106295372B (en) A kind of encryption Hub device realized based on EMMC interface

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination