WO2015070560A1 - 基于多核处理器的密钥保护方法及系统 - Google Patents

基于多核处理器的密钥保护方法及系统 Download PDF

Info

Publication number
WO2015070560A1
WO2015070560A1 PCT/CN2014/075042 CN2014075042W WO2015070560A1 WO 2015070560 A1 WO2015070560 A1 WO 2015070560A1 CN 2014075042 W CN2014075042 W CN 2014075042W WO 2015070560 A1 WO2015070560 A1 WO 2015070560A1
Authority
WO
WIPO (PCT)
Prior art keywords
core
cryptographic
cryptographic operation
cache memory
private key
Prior art date
Application number
PCT/CN2014/075042
Other languages
English (en)
French (fr)
Inventor
林璟锵
管乐
汪婧
王琼霄
荆继武
李宝
Original Assignee
中国科学院数据与通信保护研究教育中心
中国科学院信息工程研究所
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 中国科学院数据与通信保护研究教育中心, 中国科学院信息工程研究所 filed Critical 中国科学院数据与通信保护研究教育中心
Publication of WO2015070560A1 publication Critical patent/WO2015070560A1/zh
Priority to US14/744,803 priority Critical patent/US9898624B2/en

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/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/72Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information in cryptographic circuits
    • 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/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/74Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information operating in dual or compartmented mode, i.e. at least one secure mode
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5044Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0894Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy

Definitions

  • the present invention relates to the field of computer security, and in particular to a key protection method and system based on a multi-core processor. Background of the invention
  • Existing commonly used cryptographic algorithms mainly include symmetric cryptographic algorithms and public key cryptographic algorithms.
  • the symmetric cryptographic algorithm uses the same key for encryption and decryption operations, and both parties must maintain their common keys, mainly for fast data encryption and decryption.
  • the keys are generated in pairs, and each pair of keys is composed of a public key and a private key.
  • the public key is public, and the private key is used by the user.
  • the message is encrypted with a private key to obtain a digital signature; the digital signature is decrypted with a public key to verify the digital signature; in the encryption system, the data is encrypted with a public key to obtain a ciphertext Data; decrypt the ciphertext with the private key to obtain plaintext data.
  • Ensuring the confidentiality of the private key information corresponding to the digital certificate is a prerequisite for secure communication.
  • the storage of private keys needs to prevent unauthorized access, thereby preventing the attacker from stealing and falsifying digital signatures.
  • There are many types of storage media for private keys such as floppy disks, smart cards, USB keys, and computer hard disks. If a floppy disk or a storage type IC card is used to store the private key, the two media are connected to the computer at the time of use, but since they are not computationally capable, the private key is copied out of the storage medium into the computer during the encryption calculation. There is no essential improvement in security and direct storage of computer hard drives.
  • Using a USB Key and a smart card to store the private key can ensure high security, because the private key can not be stored in the storage medium during use, and the attacker cannot intercept the inconvenience, and the user needs to carry the storage medium with him or her.
  • the prior art In order to solve the problem of inconvenient use of the external medium storing the private key, the prior art generally uses a method of storing the private key on the computer hard disk. Specifically, the user directly controls the computer to generate a private key, and the private key is stored in the password of the computer in the form of password protection; when the private key is needed, the private key decrypted by the password is read into the computer memory, and then the calculation is performed.
  • the private key there is a security risk in the private key in the computer's memory. The attacker can steal the private key through illegal memory reading, cold boot and other attacks.
  • the illegal memory reading exploits the vulnerability in the system call implementation of the operating system, the attacker can randomly read the memory to obtain the private key information; and the cold start attack utilizes the residual characteristics of the dynamic random access memory (DRAM).
  • DRAM dynamic random access memory
  • Another solution is to store the key in kernel mode. The user cannot directly manipulate the key, but this solution cannot resist attacks against physical memory, such as cold boot.
  • the certificate authentication authority application requires more than 2048 bits.
  • the secure implementation of the public key cryptographic algorithm requires sufficient storage capacity to store the private key.
  • multi-core processors have been widely used. Each CPU's physical core has an exclusive cache (cache) or several CPU cores share some caches.
  • the cache is a high-speed, small-capacity memory between the CPU and main memory in the hierarchy of the computer storage system.
  • the physical cores of the CPU and their exclusive cache can form a relatively independent environment. Compared to the CPU registers, the cache has a much larger storage capacity, enough to store the keys of the public key cryptographic algorithm, and can provide various algorithms for security enhancement and computational acceleration. Summary of the invention
  • the invention aims at realizing the characteristics and security factors of the public key cryptography algorithm in the computer system environment, and proposes a key protection method and system based on the multi-core processor to ensure the security of the public key cryptography algorithm in the computer system environment.
  • the present invention provides a key protection method based on a multi-core processor, including:
  • one of the multi-core processors is used as a cryptographic operation core, the cryptographic operation core is prohibited from running other processes of the operating system, and is dedicated to performing public key cryptographic operations;
  • the public key cryptographic operation is performed using the cryptographic operation core; wherein the private key and the intermediate data variable used in the calculation process are stored in a cache memory exclusive to the cryptographic operation core.
  • step of storing the private key in the cache memory exclusive to the cryptographic operation core comprises:
  • the private key of the public key cryptographic algorithm is stored in the hard disk in the form of password protection
  • the cryptographic operation core reads the calculated input data, loads the password calculation scheduler, and provides an operation interface for the user to input the password, and simultaneously reads the private key protected by the password from the hard disk;
  • the cryptographic operation core decrypts the private key protected by a password using a password input by a user, and stores the plaintext of the private key in a cache of the cryptographic operation core for calculation.
  • the public key cryptographic operation includes a public key operation operation and a private key operation operation
  • the private key operation operation includes a digital signature and/or decryption step:
  • the cryptographic operation core is exclusive
  • the cache performs a data clear operation.
  • step of storing the intermediate data variable generated in the calculation process in the cache memory exclusive to the cryptographic operation core comprises:
  • the extended stack pointer register and the extended base pointer register of the cryptographic operation core are directed to an address of the cryptographic operation core exclusive cache. Punching area
  • the intermediate data variables and calculation results generated during the calculation are stored in a static buffer of consecutive addresses of the cache memory.
  • the method further includes:
  • the present invention also provides a multi-core processor-based key protection system, comprising: configured to set an operating system carried on a multi-core processor, such that one core of the multi-core processor is used as a cryptographic operation core, and the cryptographic operation core is The first module that runs other processes of the operating system and is dedicated to performing public key cryptographic operations is prohibited; A second module for performing a public key cryptographic operation using the cryptographic operation core, and storing the private key and intermediate data variables used in the operation process in a cache memory exclusive to the cryptographic operation core.
  • the private key used to store the public key cryptographic algorithm is stored in a password protected form on the first submodule of the hard disk;
  • the third submodule is further configured to perform a digital signature and/or a decryption operation by using a private key, and store an intermediate data variable and a calculation result generated in the operation process in a cache memory exclusive to the cryptographic operation core. And a cache for performing the data clearing operation for synchronizing the calculation result to the computer memory, and the cryptographic operation core exclusive.
  • the third submodule is further configured to point the extended stack pointer register and the extended base pointer register of the cryptographic operation core to the cryptographic operation core exclusively before performing the digital signature and/or decryption operation by using the private key.
  • An address-continuous static buffer of the cache memory and, for storing intermediate data variables and calculation results generated during the calculation in a static buffer of consecutive addresses of the cache memory.
  • the third submodule is further configured to: before the extended stack pointer register and the extended base pointer register of the cryptographic operation core point to an address contiguous static buffer of the cryptographic operation core exclusive cache Blocking the maskable interrupt of the cryptographic operation core, and prohibiting the operating system from preempting the cryptographic operation core, and placing the static buffer of the address into the cache memory exclusive to the cryptographic operation core, prohibiting the password from being excluded Operational kernel The contents of the cache outside the exclusive cache are replaced.
  • the third submodule is further configured to synchronize the calculation result to the computer memory, and when the cryptographic operation core exclusive cache performs a data clear operation, simultaneously clear the general purpose register, and then recover the The function of other cores other than the cryptographic operation core to access the cache.
  • the key protection method and system for the multi-core processor provided by the present invention, by setting an operating system carried on the multi-core processor, one core of the multi-core processor is used as a cryptographic operation core, and the cryptographic operation core is prohibited from running the operating system.
  • FIG. 1 is a schematic flow chart of an exemplary embodiment of a key protection method based on a multi-core processor according to the present invention
  • FIG. 2 is a flow chart showing the process of storing intermediate data variables in a cache memory in the embodiment of FIG. 1;
  • FIG. 3 is a schematic structural diagram of a key protection system based on a multi-core processor according to the present invention. Mode for carrying out the invention
  • the present invention is implemented based on the following considerations:
  • each physical core has an exclusive cache and several physical cores share some cache memory.
  • the cache is a high speed, small-capacity memory between the CPU and main memory.
  • the physical cores of the CPU and their exclusive cache can constitute a relatively independent environment; moreover, the cache has a much larger storage capacity than the CPU registers, enough to hold the key of the public key cryptographic algorithm, and Various security enhancements and computationally accelerated operations are available.
  • each physical core has its own set of registers, including general-purpose registers eax, ebx, ecx, edx, etc., as well as segment registers CS, DS, etc., as well as status registers, control registers, mode dependent registers (MSR), extended instruction set registers XMM, Y solid, and so on.
  • general-purpose registers eax, ebx, ecx, edx, etc. as well as segment registers CS, DS, etc.
  • MSR mode dependent registers
  • XMM extended instruction set registers
  • Each physical core also has its own on-chip cache.
  • the cache uses the physical address of the random access memory (RAM) as an index to cache the physical memory that the core has recently accessed. Therefore, for the program. , its use restrictions are small: Random access to the data on the memory can exist in the cache. If the correct cache access mode is configured on the core, the application layer program can use the cache transparently.
  • the core is configured for write-back mode (wr i te-back) access, each memory access (including read and write) will occur in the cache (if the cache is not buffered)
  • the address needs to be read into the cache first; and if the core is configured for uncacheable access, each memory access bypasses the cache and directly accesses the primary random access memory.
  • a typical central processing unit has a large amount of cache memory compared to register resources: each physics The core monopolizes 32KB of L1 cache and 256KB of L2 cache, while all cores share 8MB of L3 cache.
  • the cold boot attack that this application deals with is generally for physical memory modules, and the on-chip cache is usually integrated in the central processing unit, so sensitive data appearing in the cache is private.
  • the present application provides a multi-core processor-based key protection method, including:
  • one of the multi-core processors is used as a cryptographic operation core, the cryptographic operation core is prohibited from running other processes of the operating system, and is dedicated to performing public key cryptographic operations;
  • an operating system carried on a multi-core processor is set, and one core of the multi-core processor is used as a cryptographic operation core, and the cryptographic operation core is prohibited from running other processes of the operating system, and is dedicated to executing the public.
  • Key cryptographic operations as a concrete implementation, in order to isolate the process used for public key cryptography, some existing mechanisms of the operating system can be used: such as changing the CPU affinity of the public key cryptographic process, so that the public key cryptographic process Only Runs on the specified cryptographic core so that other system/application processes cannot run on the cryptographic core; you can also configure the operating system's scheduling domain to use the specified cryptographic kernel as a separate domain from the operating system, ie the operating system.
  • the cryptographic computing core reads the calculated input data, loads the password calculation scheduler, and provides an operation interface for the user to input the password, and simultaneously reads from the hard disk Taking the private key protected by a password;
  • the cryptographic operation core decrypts the private key protected by the password by using the password input by the user, and stores the plaintext of the private key in the cache of the cryptographic operation core for calculation;
  • the conventional public key cryptographic operations include public key operation operations and private key operation operations
  • the private key operation operations include digital signatures and/or decryption operations.
  • the private key in addition to the basic private key such as N, d, the private key also includes d, p, q, d (mod p), d ( Auxiliary data such as mod q) and q-1 (mod p) can be used in the Chinese residual theorem acceleration algorithm. Therefore, the above auxiliary data is also stored in the cache as part of the private key.
  • the middle of the operation process is further generated.
  • the inter-data variables are stored in a cache that is exclusive to the cryptographic computation core.
  • the existing operating system allocates an address space for data variables, mainly in the following two ways: stack and heap.
  • the stack uses a static address space allocation method. When a program calls a function, the function's automatic variables, function parameters, return values, etc. exist in the stack space specified by the operating system; stacking uses dynamic address space allocation methods, When the computer program is allocated for use, the allocated address space is discontinuous and uncertain. If there is no guarantee that the data variables stored in the above two ways will not be leaked into the memory, the attacker may obtain sensitive information through the data.
  • the technical solution of the present invention uses a static stack address space allocation method.
  • the stack pointer register and the extended base pointer register of the cryptographic operation core are first pointed to a cache memory exclusive to the cryptographic operation core. a static buffer with consecutive addresses; then storing the intermediate data variables and calculation results generated during the operation in a static buffer of the address of the cache memory, thereby completing the storage of the intermediate data variables;
  • the process switching causes the data contents of the general-purpose registers to be swapped out to the memory during the calculation process, and if other processes use the memory at the same time, the data in the cache memory is synchronized to the memory.
  • the extended stack pointer register and the extended base pointer register of the cryptographic operation core point to a contiguous static buffer of the address of the cryptographic operation core exclusive cache, further Masking the interruptable interrupt of the cryptographic operation core, and prohibiting the operating system from preempting the cryptographic operation core, so that the entire calculation process is atomic; after entering the atomic operation, let other cores enter the no-f ill mode, and can enter the no-f through the register crO.
  • Ill mode in which cryptographic operations are prohibited
  • the contents of the cache memory outside the core exclusive cache are replaced; after the calculation is completed, the calculation result stored in the cache memory is synchronized to the memory (can be used by the c lf lush command)
  • the cache memory that requires the cryptographic operation core to perform the data clear operation can be implemented by assigning the memory address corresponding to the cache memory to Q; Since the general-purpose register may also have an intermediate variable, it is also necessary to simultaneously clear the general-purpose register; after the completion of the data clearing operation of the cache memory exclusive to the cryptographic operation core, all the core normal access caches except the cryptographic operation core are restored. The function.
  • the present invention further provides a key protection system based on a multi-core processor, as shown in FIG. 3, including:
  • one core of the multi-core processor is used as a cryptographic operation core, the cryptographic operation core is prohibited from running other processes of the operating system, and is dedicated to performing public key cryptographic operations.
  • the private key used to store the public key cryptographic algorithm is stored in a password protected form on the first submodule of the hard disk;
  • the third submodule is further configured to perform digital signature and/or solution using a private key a secret operation, and storing an intermediate data variable and a calculation result generated in the operation process in a cache memory exclusive to the cryptographic operation core, and for synchronizing the calculation result to a computer memory, and the cryptographic operation core exclusive
  • the cache performs a data flush operation.
  • the third submodule is further configured to point the extended stack pointer register and the extended base pointer register of the cryptographic operation core to the cryptographic operation core exclusively before performing the digital signature and/or decryption operation by using the private key.
  • An address-continuous static buffer of the cache memory and, for storing intermediate data variables and calculation results generated during the calculation in a static buffer of consecutive addresses of the cache memory.
  • the third submodule is further configured to: before the extended stack pointer register and the extended base pointer register of the cryptographic operation core point to an address contiguous static buffer of the cryptographic operation core exclusive cache Blocking the maskable interrupt of the cryptographic operation core, and prohibiting the operating system from preempting the cryptographic operation core, and placing the static buffer of the address into the cache memory exclusive to the cryptographic operation core, prohibiting the password from being excluded The contents of the cache memory outside the cache memory exclusive to the operation core are replaced.
  • the third submodule is further configured to synchronize the calculation result to the computer memory, and when the cryptographic operation core exclusive cache performs the data clear operation, simultaneously clear the general purpose register, and then recover the password except The function of other cores outside the operation core to access the cache normally.
  • the method and system for protecting a multi-core processor provided by the present invention, by setting an operating system carried on a multi-core processor, makes a core of the multi-core processor as a cryptographic operation core, and the cryptographic operation core It is forbidden to run other processes of the operating system and is dedicated
  • the public key cryptographic algorithm is executed, and the private key and the intermediate variables used in the calculation process are stored in the exclusive cache of the core, thereby preventing the attacker from stealing the private key information directly from the physical memory, thereby ensuring the public key cryptography algorithm.
  • Security implemented in a computer system environment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Storage Device Security (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

本发明提供了一种基于多核处理器的密钥保护方法及系统,通过设置承载于多核处理器的操作系统,使多核处理器中的一个核作为密码运算核,该密码运算核被禁止运行操作系统的其它进程、并被专用于执行公钥密码运算,并将私钥以及计算过程中使用的中间变量存放于该密码运算核独占的高速缓冲存储器中,可以防止攻击者直接从物理内存中窃取私钥信息,从而保障公钥密码算法在计算机系统环境下实现的安全性。

Description

基于多核处理器的密钥保护方法及系统 相关文件
本申请要求于 2013 年 11 月 14 日提交中国专利局、 申请号为 201310565691.5、 发明名称为"基于多核处理器的密钥保护方法及系统" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及计算机安全领域, 特别涉及基于多核处理器的密钥保护 方法及系统。 发明背景
现有常用的密码算法主要包括对称密码算法和公钥密码算法两种。 其中, 对称密码算法使用同一密钥做加密和解密运算, 通信双方必须保 管好他们共同的密钥,主要用于快速的数据加解密。在公钥密码算法中, 其密钥是成对生成的, 每对密钥由公钥和私钥组成; 在公钥密码算法的 实际应用中,公钥是公开的, 而私钥则由用户自己保存; 在签名系统中, 用私钥对消息进行加密, 得到数字签名; 用公钥对数字签名进行解密, 以验证数字签名; 在加密系统中, 用公钥对数据进行加密, 得到密文数 据; 用私钥对密文进行解密, 得到明文数据。
随着互联网技术的发展, 电子交易活动与电子事物处理已经成为人 们日常生活必不可少的一部分。 为了保障这些网络应用的真实性、 保密 性、 完整性以及可追究性等安全特性, 以数字证书为核心的密码技术广 泛应用于网络信息系统。 数字证书釆用了公钥密码算法体制, 将公钥与 持有者的真实身份进行绑定, 从而实现了网络用户身份信息的标识, 为 网络安全通信提供了电子认证。
保证数字证书所对应的私钥信息的机密性是实现安全通信的前提条 件。 私钥的存储需要防止非授权访问, 从而避免被攻击者窃取并伪造数 字签名。 私钥的存储介质有很多种, 例如软盘、 智能卡、 USB Key和计 算机硬盘等。 如果使用软盘或存储型 IC 卡来保存私钥, 这两种介质在 使用时才与计算机相连, 但由于它们不具备计算能力, 在进行加密计算 时, 私钥会被复制出存储介质进入计算机, 安全性与计算机硬盘直接存 储并没有本质的提升。 使用 USB Key和智能卡存储私钥则可以保证较高 的安全性, 因为在使用过程中私钥可以不出存储介质, 攻击者无法截获 不便, 用户需要随身携带存储介质。
为解决上述存储私钥的外部介质使用不便的问题, 现有技术一般釆 用将私钥存放在计算机硬盘的方法。 具体的, 由用户直接控制计算机生 成私钥, 私钥以口令保护的形式储存于计算机硬盘中; 当需要使用私钥 时, 经口令解密的私钥被读取到计算机内存中, 然后执行计算。 但是在 计算机内存中的私钥存在安全隐患, 攻击者可以通过非法内存读取、 冷 启动等攻击窃取私钥。 其中, 非法内存读取利用了操作系统的系统调用 实现中的漏洞, 攻击者可以随机地读取内存, 从而获得私钥信息; 而冷 启动攻击则利用了动态随机访问内存( DRAM ) 的剩余特性( r emanence effec t ), 即掉电之后存储内容随时间慢慢消失, 整个过程持续好几秒, 如果利用制冷剂可以将时间延长到几小时, 攻击者可以在计算机运行或 挂起时, 直接关机, 把内存拔下来, 并插入一个通过恶意 U盘启动的计 算机, 该计算机的启动程序可以直接把保存在目标内存的内容复制出 来, 从而获取内存中的信息映像。 为了消除这些隐患, 在方便用户使用 的前提下, 如何在计算机环境下安全实现密码算法成为关键问题。 为了应对上述在计算机环境下的安全问题, 现有的方案提出把用于 磁盘加密的对称密钥存放在处理器寄存器中。 但是由于寄存器容量较 小, 因此只能存放短的对称密钥, 不适用于公钥密码算法。在此基础上, 随着 CPU技术的发展, 支持高级矢量扩展指令集(AVX ) 的寄存器, 如 Y固, 开始广泛部署, 这些寄存器可以提供更大的存储空间, 从而支持 2048比特的 RSA运算; 但是这种方案也有很多不足: (1 )可扩展性差, 仅仅可以完成基本的运算, 如果要支持更多安全功能, 比如抗侧信道攻 击, 或者支持运算加速, 比如中国剩余定理, 将很困难; (2 )如果要支 持更长的密钥, 只能依赖 CPU厂商来提供; (3 )平台依赖性大, 由于直 接操作寄存器, 高级语言比如 C语言将不能支持; (4 )需要禁用 AVX或 者 SSE功能, 这将对 CPU处理数据密集型程序和图形处理程序的性能产 生非常大的影响, 因为这些程序需要这些寄存器进行运算加速。
还有一种方案是把密钥存放在内核态, 用户不能直接操作密钥, 但 是这种方案不能抵抗针对物理内存的攻击, 比如冷启动。
考虑到公钥密码算法的密钥比较长, 例如 RSA算法, 证书认证机构 应用都要求在 2048 位以上, 公钥密码算法的安全实现需要足够的存储 容量来存放私钥。 目前, 多核处理器已经得到广泛的应用, 每个 CPU的 物理核心拥有独占的 cache (高速緩冲存储器)或几个 CPU核共享一些 cache。 cache在计算机存储系统的层次结构中, 是介于 CPU和主存储器 之间的高速小容量存储器。 CPU的物理核心以及它们独占的 cache可以 构成一个相对独立的环境。 比起 CPU寄存器, cache的存储容量要大得 多, 足够存放公钥密码算法的密钥, 并且可以提供各种安全增强和运算 加速的算法。 发明内容
本发明针对在计算机系统环境下实现公钥密码算法的特点以及安全 因素, 提出了基于多核处理器的密钥保护方法和系统, 以保障公钥密码 算法在计算机系统环境下实现的安全性。
为实现上述目的, 本发明提供了一种基于多核处理器的密钥保护方 法, 包括:
设置承载于多核处理器的操作系统, 使多核处理器中的一个核作为 密码运算核, 所述密码运算核被禁止运行操作系统的其它进程、 并被专 用于执行公钥密码运算;
利用所述密码运算核执行公钥密码运算; 其中, 私钥以及计算过程 中使用的中间数据变量存储于所述密码运算核独占的高速緩冲存储器。
进一步, 私钥存储于所述密码运算核独占的高速緩冲存储器的步骤 包括:
公钥密码算法的私钥以口令保护的形式保存于硬盘;
密码运算核读取计算输入数据, 加载密码计算调度程序, 并提供用 户输入口令的操作界面, 同时从所述硬盘中读取以口令保护的所述私 钥;
所述密码运算核利用用户输入的口令解密以口令保护的所述私钥, 并将所述私钥的明文存储于所述密码运算核的高速緩冲存储器中用于 计算。
进一步, 公钥密码运算包括公钥操作运算和私钥操作运算, 所述私 钥操作运算包括数字签名和 /或解密步骤:
利用私钥进行数字签名和 /或解密运算,并将计算过程中产生的中间 数据变量和计算结果存储于所述密码运算核独占的高速緩冲存储器; 将所述计算结果同步至计算机内存, 并将所述密码运算核独占的高 速緩冲存储器执行数据清空操作。
进一步, 将计算过程中产生的中间数据变量存储于所述密码运算核 独占的高速緩冲存储器的步骤包括:
在利用私钥进行数字签名和 /或解密运算之前,将所述密码运算核的 扩展栈指针寄存器和扩展基址指针寄存器指向所述密码运算核独占的 高速緩冲存储器的一个地址连续的静态緩冲区;
将计算过程中产生的中间数据变量和计算结果存储于所述高速緩冲 存储器的地址连续的静态緩冲区中。
进一步, 在所述密码运算核的扩展栈指针寄存器和扩展基址指针寄 存器指向所述密码运算核独占的高速緩冲存储器的一个地址连续的静 态緩冲区之前还包括:
屏蔽所述密码运算核的可屏蔽中断, 并禁止操作系统抢占所述密码 运算核;
将所述地址连续的静态緩冲区放入密码运算核独占的高速緩冲存储 器;
禁止除所述密码运算核独占的高速緩冲存储器外的高速緩冲存储器 的内容被替换。
进一步, 将所述计算结果同步至计算机内存, 并在所述密码运算核 独占的高速緩冲存储器执行数据清空操作时, 同时清空通用寄存器, 在 将所述密码运算核独占的高速緩冲存储器执行数据清空操作完成后, 恢 复除密码运算核外所有核正常访问高速緩冲存储器的功能。
本发明还提供了一种基于多核处理器的密钥保护系统, 包括: 用于设置承载于多核处理器的操作系统, 使多核处理器中的一个核 作为密码运算核, 所述密码运算核被禁止运行操作系统的其它进程、 并 被专用于执行公钥密码运算的第一模块; 用于利用所述密码运算核执行公钥密码运算, 并将私钥以及运算过 程中使用的中间数据变量存储于所述密码运算核独占的高速緩冲存储 器的第二模块。
进一步, 用于将公钥密码算法的私钥以口令保护的形式保存于硬盘 的第一子模块;
用于控制密码计算核读取计算输入数据, 加载密码计算调度程序, 并提供用户输入口令的操作界面, 同时从所述硬盘中读取以口令保护的 所述私钥的第二子模块;
用于控制所述密码运算核利用用户输入的口令解密以口令保护的所 述私钥, 并将所述私钥的明文存储于所述密码运算核的高速緩冲存储器 中用于计算的第三子模块。
进一步,所述第三子模块进一步用于利用私钥进行数字签名和 /或解 密运算, 并将运算过程中产生的中间数据变量和计算结果存储于所述密 码运算核独占的高速緩冲存储器, 以及用于将所述计算结果同步至计算 机内存, 并所述密码运算核独占的高速緩冲存储器执行数据清空操作。
进一步, 所述第三子模块进一步用于在利用私钥进行数字签名和 / 或解密运算之前, 将所述密码运算核的扩展栈指针寄存器和扩展基址指 针寄存器指向所述密码运算核独占的高速緩冲存储器的一个地址连续 的静态緩冲区; 以及, 用于将计算过程中产生的中间数据变量和计算结 果存储于所述高速緩冲存储器的地址连续的静态緩冲区中。
进一步, 所述第三子模块进一步用于在所述密码运算核的扩展栈指 针寄存器和扩展基址指针寄存器指向所述密码运算核独占的高速緩冲 存储器的一个地址连续的静态緩冲区之前, 屏蔽所述密码运算核的可屏 蔽中断, 并禁止操作系统抢占所述密码运算核, 将所述地址连续的静态 緩冲区放入密码运算核独占的高速緩冲存储器, 禁止除所述密码运算核 独占的高速緩冲存储器外的高速緩冲存储器的内容被替换。
进一步, 所述第三子模块进一步用于将所述计算结果同步至计算机 内存, 并在所述密码运算核独占的高速緩冲存储器执行数据清空操作 时, 同时清空通用寄存器, 然后恢复除所述密码运算核外的其他核正常 访问高速緩冲存储器的功能。
釆用本发明提供的多核处理器的密钥保护方法及系统, 通过设置承 载于多核处理器的操作系统, 使多核处理器中的一个核作为密码运算 核, 该密码运算核被禁止运行操作系统的其它进程、 并被专用于执行公 钥密码运算, 并将私钥以及计算过程中使用的中间变量存放于该核独占 的高速緩冲存储器中, 可以防止攻击者直接从物理内存中窃取私钥信 息, 从而保障公钥密码算法在计算机系统环境下实现的安全性。 附图简要说明
图 1为本发明基于多核处理器的密钥保护方法典型实施例的流程示 意图;
图 2为图 1实施例中将中间数据变量存储于高速緩冲存储器的流程 示意图;
图 3为本发明一种基于多核处理器的密钥保护系统的结构示意图。 实施本发明的方式
为了使本发明的目的、 技术方案及优点更加清楚明白, 以下参照附 图并举实施例, 对本发明作进一步详细说明。
本发明是基于以下考虑实现的:
在现有技术中, 多核处理器已经得到广泛的应用, 每个物理核心拥 有独占的高速緩冲存储器并且几个物理核心共享一些高速緩冲存储器。 在计算机存储系统的层次结构中, 高速緩冲存储器是介于 CPU和主存储 器之间的高速小容量存储器。 CPU 的物理核心以及它们独占的高速緩冲 存储器可以构成一个相对独立的环境; 而且, 比起 CPU寄存器, 高速緩 冲存储器的存储容量要大得多, 足够存放公钥密码算法的密钥, 并且可 以提供各种安全增强和运算加速的运算。
具体的, 在典型的多处理器(mul t iple-proces s )结构中, 每个物 理核心拥有一套自己的寄存器, 这包括通用寄存器 eax、 ebx、 ecx、 edx 等, 还有段寄存器 CS、 DS 等, 以及状态寄存器、 控制寄存器、 型号相 关寄存器(Mode l Spec if ic Reg i s ter , MSR )、 扩展指令集寄存器 XMM、 Y固等。 在一个物理核心中, 由于资源受限, 不可能实现大量的寄存器, 并且这些寄存器中, 有很多都是有专门用途的, 不能用于通用的计算过 程 (比如 esp和 ebp—般用于跟踪程序的栈帧)。 寄存器的访问通过寄 存器名指定, 每个核心的上下文环境互不影响, 需要靠共享的总线来传 递消息。
每个物理核心同时也会有自己的片上高速緩冲存储器, 高速緩冲存 储器使用随机访问内存(RAM ) 的物理地址作为索引, 可以緩存本核心 最近经常访问的物理内存, 所以, 对程序来说, 其使用限制较小: 随机 访问内存上的数据都可以存在于高速緩冲存储器。 如果该核心上配置了 正确的高速緩冲存储器访问模式, 那么应用层的程序可以透明的使用高 速緩冲存储器。 典型地, 如果该核心配置了写回模式(wr i te-back )访 问, 每次内存访问 (包括读和写)都将会发生在高速緩冲存储器中 (如 果高速緩冲存储器没有緩冲该地址, 需要先把该地址读进高速緩冲存储 器); 而如果该核心配置了不可緩存模式(uncachable )访问, 每次内 存访问将绕过高速緩冲存储器, 直接访问主随机访问内存。 相比寄存器 资源, 一个典型的中央处理单元拥有大量的高速緩冲存储器: 每个物理 核心独占 32KB的一级高速緩冲存储器和 256KB的二级高速緩冲存储器, 而所有的核心共享 8MB的三级高速緩冲存储器。
而本申请所应对的冷启动(Cold boot )攻击一般是针对物理的内存 模块的, 而片上的高速緩冲存储器通常在中央处理单元中集成, 所以出 现在高速緩冲存储器里面的敏感数据如私钥明文, 依靠 Cold boot攻击 是无法获取的。
在此基础上, 仅保护经解密的私钥明文仍不足以保证私钥信息的安 全, 私钥计算的过程涉及到一些中间的数据变量, 攻击者有可能从这些 变量中获取敏感数据。 因此, 还必须保证中间的数据变量只储存在高速 緩冲存储器中。
基于上述考虑,本申请提供了一种基于多核处理器的密钥保护方法, 包括:
设置承载于多核处理器的操作系统, 使多核处理器中的一个核作为 密码运算核, 所述密码运算核被禁止运行操作系统的其它进程、 并被专 用于执行公钥密码运算;
利用所述密码运算核执行公钥密码算法的计算; 其中, 私钥以及计 算过程中使用的中间数据变量存储于所述密码运算核独占的高速緩冲 存储器
具体的, 以下结合实施例, 对本发明提供的密钥保护方法进行详细 描述:
如图 1所示, 首先, 设置承载于多核处理器的操作系统, 使多核处 理器中的一个核作为密码运算核, 该密码运算核被禁止运行操作系统的 其它进程、 并被专用于执行公钥密码运算; 作为具体实现, 为了隔离用 于公钥密码运算进程, 可以使用操作系统现有的一些机制: 如更改公钥 密码运算进程的 CPU 亲和力 (aff ini ty ), 使得公钥密码运算进程只能 在指定的密码运算核运行, 以使其他系统 /应用进程不能在密码运算核 上运行; 还可以配置操作系统的调度域, 把指定的密码运算核作为与操 作系统相独立的域, 即操作系统的所有任务进程不能在该域执行, 除非 显式地调度任务进程(例如, 在 l inux下可以使用 sched_ setaff ini ty 系统调用, 或在内核态使用 set _cpus _a l lowed_pr t函数), 因此, 每次 在启动公钥密码运算进程的时候, 要将公钥密码运算进程显示地调度到 该域; 由此, 使密码运算核被禁止运行操作系统的其它进程、 并被专用 于执行公钥密码运算;
然后, 将公钥密码算法的私钥以口令保护的形式保存于硬盘; 密码计算核读取计算输入数据, 加载密码计算调度程序, 并提供用 户输入口令的操作界面, 同时从所述硬盘中读取以口令保护的所述私 钥;
密码运算核利用用户输入的口令解密以口令保护的私钥, 并将私钥 的明文存储于密码运算核的高速緩冲存储器中用于计算;
需要说明的是, 常规的公钥密码运算包括公钥操作运算和私钥操作 运算, 私钥操作运算包括数字签名和 /或解密运算。 对于 RSA公钥密码 算法, 在进行私钥操作运算时, 为了加快运算速度, 通常除了 N、 d 等 基本私钥夕卜, 私钥还包括 d、 p、 q、 d (mod p)、 d (mod q) 、 q-1 (mod p) 等辅助数据, 这些数据可以用在中国剩余定理加速算法上, 因此, 上述 辅助数据也作为私钥的一部分需要存储于高速緩冲存储器中。
在进行公钥密码运算时, 计算过程中还会有各种中间变量, 这些中 间变量通常包含关于私钥的部分信息, 为了进一步保障公钥密码运算在 计算机系统环境下实现的安全性, 需要避免这些中间数据变量被攻击者 获取, 进而依据这些中间数据变量推导出私钥。
在本实施例中, 为了避免上述问题, 进一步将运算过程中产生的中 间数据变量存储于密码运算核独占的高速緩冲存储器中。
一般地, 现有的操作系统为数据变量分配地址空间, 主要有如下两 种方式: 栈和堆。 栈釆用静态的地址空间分配方法, 在程序调用函数的 时候, 函数的自动变量、 函数参数、 返回值等数据存在于由操作系统指 定的栈空间中; 堆釆用动态的地址空间分配方法, 在计算机程序运行期 间分配使用, 分配的地址空间是不连续且不确定的。 如果无法保证上述 两种方式存储的数据变量不被泄漏到内存中, 攻击者可能会通过这些数 据获取敏感信息。
为了集中管理高速緩冲存储器映射的地址空间, 需要避免釆用不连 续且不确定的堆分配方法。 此外, 栈分配的地址空间虽然是连续的, 但 程序无法控制栈的分配位置,因此, 无法确保地址空间都放在高速緩冲 存储器中。鉴于此,本发明的技术方案釆用静态的栈地址空间分配方法。
具体的,如图 2所示,在利用私钥进行数字签名和 /或解密运算之前, 先将密码运算核的栈指针寄存器和扩展基址指针寄存器指向密码运算 核独占的高速緩冲存储器的一个地址连续的静态緩冲区; 然后将运算过 程中产生的中间数据变量和计算结果存储于高速緩冲存储器的地址连 续的静态緩冲区中, 由此完成中间数据变量的存储;
进一步, 由于在计算过程中, 进程切换会使得通用寄存器的数据内 容换出到内存; 而且如果其他进程同时大量使用内存, 高速緩冲存储器 中的数据会同步到内存。 为了防止这种情况发生, 在本实施例中, 在密 码运算核的扩展栈指针寄存器和扩展基址指针寄存器指向密码运算核 独占的高速緩冲存储器的一个地址连续的静态緩冲区之前, 进一步屏蔽 密码运算核的可屏蔽中断, 并禁止操作系统抢占密码运算核, 使得整个 计算过程是原子的; 进入原子操作后, 让其它核进入 no-f i l l模式, 可 通过寄存器 crO设置进入 no-f i l l模式, 在该模式下, 禁止除密码运算 核独占的高速緩冲存储器外的高速緩冲存储器的内容被替换; 计算结束后, 把存储于高速緩冲存储器中存储的计算结果同步到内 存(可釆用通过 c lf lush指令)后, 为保证所有的敏感数据都不会被同 步到内存, 需要密码运算核独占的高速緩冲存储器执行数据清空操作, 这可以通过将这段高速緩冲存储器对应的内存地址赋值为 Q 来实现 ; 此外, 由于通用寄存器也可能存在中间变量, 还需要同时清空通用寄存 器; 在将所述密码运算核独占的高速緩冲存储器执行数据清空操作完成 后, 恢复除密码运算核外所有核正常访问高速緩冲存储器的功能。
本发明对应上述方法, 还提供了一种基于多核处理器的密钥保护系 统, 如图 3所示, 包括:
用于设置承载于多核处理器的操作系统, 使多核处理器中的一个核 作为密码运算核, 所述密码运算核被禁止运行操作系统的其它进程、 并 被专用于执行公钥密码运算的第一模块;
用于利用所述密码运算核执行公钥密码运算, 并将私钥以及运算过 程中使用的中间数据变量存储于所述密码运算核独占的高速緩冲存储 器的第二模块。
进一步, 用于将公钥密码算法的私钥以口令保护的形式保存于硬盘 的第一子模块;
用于控制密码计算核读取计算输入数据, 加载密码计算调度程序, 并提供用户输入口令的操作界面, 同时从所述硬盘中读取以口令保护的 所述私钥的第二子模块;
用于控制所述密码运算核利用用户输入的口令解密以口令保护的所 述私钥, 并将所述私钥的明文存储于所述密码运算核的高速緩冲存储器 中用于计算的第三子模块。
进一步,所述第三子模块进一步用于利用私钥进行数字签名和 /或解 密运算, 并将运算过程中产生的中间数据变量和计算结果存储于所述密 码运算核独占的高速緩冲存储器, 以及用于将所述计算结果同步至计算 机内存, 并所述密码运算核独占的高速緩冲存储器执行数据清空操作。
进一步, 所述第三子模块进一步用于在利用私钥进行数字签名和 / 或解密运算之前, 将所述密码运算核的扩展栈指针寄存器和扩展基址指 针寄存器指向所述密码运算核独占的高速緩冲存储器的一个地址连续 的静态緩冲区; 以及, 用于将计算过程中产生的中间数据变量和计算结 果存储于所述高速緩冲存储器的地址连续的静态緩冲区中。
进一步, 所述第三子模块进一步用于在所述密码运算核的扩展栈指 针寄存器和扩展基址指针寄存器指向所述密码运算核独占的高速緩冲 存储器的一个地址连续的静态緩冲区之前, 屏蔽所述密码运算核的可屏 蔽中断, 并禁止操作系统抢占所述密码运算核, 将所述地址连续的静态 緩冲区放入密码运算核独占的高速緩冲存储器, 禁止除所述密码运算核 独占的高速緩冲存储器外的高速緩冲存储器的内容被替换。
进一步, 所述第三子模块进一步用于将所述计算结果同步至计算机 内存, 并所述密码运算核独占的高速緩冲存储器执行数据清空操作时, 同时清空通用寄存器, 然后恢复除所述密码运算核外的其他核正常访问 高速緩冲存储器的功能。
在这里需要说明的是, 对应上述多核处理器的密钥保护方法的各个 步骤, 在本发明提供的基于多核处理器的密钥保护系统中的各模块及其 子模块的功能, 本领域技术人员可通过在硬件基础上通过计算机软件的 方式实现, 在此不再赘述。
综上所述, 釆用本发明提供的多核处理器的密钥保护方法及系统, 通过设置承载于多核处理器的操作系统, 使多核处理器中的一个核作为 密码运算核, 该密码运算核被禁止运行操作系统的其它进程、 并被专用 于执行公钥密码运算, 并将私钥以及计算过程中使用的中间变量存放于 该核独占的高速緩沖存储器中, 可以防止攻击者直接从物理内存中窃取 私钥信息, 从而保障公钥密码算法在计算机系统环境下实现的安全性。
以上所述仅为本发明的较佳实施例而已, 并不用以限制本发明, 凡 在本发明的精神和原则之内, 所做的任何修改、 等同替换、 改进等, 均 应包含在本发明保护的范围之内。

Claims

权利要求书
1、 一种基于多核处理器的密钥保护方法, 其特征在于, 包括: 设置承载于多核处理器的操作系统, 使多核处理器中的一个核作为 密码运算核, 所述密码运算核被禁止运行操作系统的其它进程、 并被专 用于执行公钥密码运算;
利用所述密码运算核执行公钥密码运算; 其中, 私钥以及运算过程 中使用的中间数据变量存储于所述密码运算核独占的高速緩冲存储器。
2、根据权利要求 1所述的方法, 其特征在于, 私钥存储于所述密码 运算核独占的高速緩冲存储器的步骤包括:
公钥密码算法的私钥以口令保护的形式保存于硬盘;
密码运算核读取计算输入数据, 加载密码计算调度程序, 并提供用 户输入口令的操作界面, 同时从所述硬盘中读取以口令保护的所述私 钥;
所述密码运算核利用用户输入的口令解密以口令保护的所述私钥, 并将所述私钥的明文存储于所述密码运算核的高速緩冲存储器中用于 计算。
3、根据权利要求 2所述的方法, 其特征在于, 公钥密码运算包括公 钥操作运算和私钥操作运算,所述私钥操作运算包括数字签名和 /或解密 步骤:
利用私钥进行数字签名和 /或解密运算,并将计算过程中产生的中间 数据变量和计算结果存储于所述密码运算核独占的高速緩冲存储器; 将所述计算结果同步至计算机内存, 并将所述密码运算核独占的高 速緩冲存储器执行数据清空操作。
4、根据权利要求 3所述的方法, 其特征在于, 将计算过程中产生的 中间数据变量存储于所述密码运算核独占的高速緩冲存储器的步骤包 括:
在利用私钥进行数字签名和 /或解密运算之前,将所述密码运算核的 扩展栈指针寄存器和扩展基址指针寄存器指向所述密码运算核独占的 高速緩冲存储器的一个地址连续的静态緩冲区;
将计算过程中产生的中间数据变量和计算结果存储于所述高速緩冲 存储器的地址连续的静态緩冲区中。
5、根据权利要求 4所述的方法, 其特征在于, 在所述密码运算核的 扩展栈指针寄存器和扩展基址指针寄存器指向所述密码运算核独占的 高速緩冲存储器的一个地址连续的静态緩冲区之前还包括:
屏蔽所述密码运算核的可屏蔽中断, 并禁止操作系统抢占所述密码 运算核;
将所述地址连续的静态緩冲区放入密码运算核独占的高速緩冲存储 器;
禁止除所述密码运算核独占的高速緩冲存储器外的高速緩冲存储器 的内容被替换。
6、根据权利要求 5所述的方法, 其特征在于, 将所述计算结果同步 至计算机内存, 并在所述密码运算核独占的高速緩冲存储器执行数据清 空操作时, 同时清空通用寄存器, 在将所述密码运算核独占的高速緩冲 存储器执行数据清空操作完成后, 恢复除密码运算核外所有核正常访问 高速緩冲存储器的功能。
7、 一种基于多核处理器的密钥保护系统, 其特征在于, 包括: 用于设置承载于多核处理器的操作系统, 使多核处理器中的一个核 作为密码运算核, 所述密码运算核被禁止运行操作系统的其它进程、 并 被专用于执行公钥密码运算的第一模块; 用于利用所述密码运算核执行公钥密码运算, 并将私钥以及运算过 程中使用的中间数据变量存储于所述密码运算核独占的高速緩冲存储 器的第二模块。
8、 根据权利要求 7所述的系统, 其特征在于, 所述第二模块包括: 用于将公钥密码算法的私钥以口令保护的形式保存于硬盘的第一子 模块;
用于控制密码计算核读取计算输入数据, 加载密码计算调度程序, 并提供用户输入口令的操作界面, 同时从所述硬盘中读取以口令保护的 所述私钥的第二子模块;
用于控制所述密码运算核利用用户输入的口令解密以口令保护的所 述私钥, 并将所述私钥的明文存储于所述密码运算核的高速緩冲存储器 中用于计算的第三子模块。
9、根据权利要求 8所述的系统, 其特征在于, 所述第三子模块进一 步用于利用私钥进行数字签名和 /或解密运算,并将运算过程中产生的中 间数据变量和计算结果存储于所述密码运算核独占的高速緩冲存储器, 以及用于将所述计算结果同步至计算机内存, 并所述密码运算核独占的 高速緩冲存储器执行数据清空操作。
10、 根据权利要求 9所述的系统, 其特征在于, 所述第三子模块进 一步用于在利用私钥进行数字签名和 /或解密运算之前,将所述密码运算 核的扩展栈指针寄存器和扩展基址指针寄存器指向所述密码运算核独 占的高速緩冲存储器的一个地址连续的静态緩冲区; 以及, 用于将计算 过程中产生的中间数据变量和计算结果存储于所述高速緩冲存储器的 地址连续的静态緩冲区中。
11、根据权利要求 10所述的系统, 其特征在于, 所述第三子模块进 一步用于在所述密码运算核的扩展栈指针寄存器和扩展基址指针寄存 器指向所述密码运算核独占的高速緩冲存储器的一个地址连续的静态 緩冲区之前, 屏蔽所述密码运算核的可屏蔽中断, 并禁止操作系统抢占 所述密码运算核, 将所述地址连续的静态緩冲区放入密码运算核独占的 高速緩冲存储器, 禁止除所述密码运算核独占的高速緩冲存储器外的高 速緩冲存储器的内容被替换。
12、根据权利要求 11所述的系统, 其特征在于, 所述第三子模块进 一步用于将所述计算结果同步至计算机内存, 并所述密码运算核独占的 高速緩冲存储器执行数据清空操作时, 同时清空通用寄存器, 然后恢复 除所述密码运算核外的其他核正常访问高速緩冲存储器的功能。
PCT/CN2014/075042 2013-11-14 2014-04-10 基于多核处理器的密钥保护方法及系统 WO2015070560A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/744,803 US9898624B2 (en) 2013-11-14 2015-06-19 Multi-core processor based key protection method and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310565691.5A CN103607279B (zh) 2013-11-14 2013-11-14 基于多核处理器的密钥保护方法及系统
CN201310565691.5 2013-11-14

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/744,803 Continuation US9898624B2 (en) 2013-11-14 2015-06-19 Multi-core processor based key protection method and system

Publications (1)

Publication Number Publication Date
WO2015070560A1 true WO2015070560A1 (zh) 2015-05-21

Family

ID=50125480

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/075042 WO2015070560A1 (zh) 2013-11-14 2014-04-10 基于多核处理器的密钥保护方法及系统

Country Status (3)

Country Link
US (1) US9898624B2 (zh)
CN (1) CN103607279B (zh)
WO (1) WO2015070560A1 (zh)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9319393B2 (en) 2013-05-30 2016-04-19 Applied Invention, Llc Security information caching on authentication token
US9514789B2 (en) * 2013-06-27 2016-12-06 Steven Bress Systems and methods for safely moving short term memory devices while preserving, protecting and examining their digital data
CN103607279B (zh) * 2013-11-14 2017-01-04 中国科学院数据与通信保护研究教育中心 基于多核处理器的密钥保护方法及系统
KR101442539B1 (ko) * 2013-12-31 2014-09-26 권용구 보안저장장치를 구비하는 저장 시스템 및 그 관리 방법
CN104883256B (zh) * 2014-02-27 2019-02-01 中国科学院数据与通信保护研究教育中心 一种抵抗物理攻击和系统攻击的密钥保护方法
US20170228548A1 (en) * 2014-08-20 2017-08-10 Intel Corporation Encrypted code execution
CN105187203B (zh) * 2015-09-22 2018-05-11 中国科学院信息工程研究所 一种无线设备间基于接收信号强度的共享密钥建立方法
CN106788975B (zh) * 2016-12-28 2019-12-13 北京天融信网络安全技术有限公司 基于sm4密码算法的加解密装置
CN109426742B (zh) * 2017-08-23 2022-04-22 深圳市中兴微电子技术有限公司 一种基于可信执行环境的安全内存动态管理系统及方法
US10482258B2 (en) 2017-09-29 2019-11-19 Nxp Usa, Inc. Method for securing runtime execution flow
CN110210214A (zh) * 2019-06-03 2019-09-06 成都海光集成电路设计有限公司 处理器核心隔离方法及装置
CN111859416B (zh) * 2020-06-23 2024-05-24 天地融科技股份有限公司 一种安全显示控制的方法及装置
CN113726528B (zh) * 2021-11-02 2022-02-18 深圳奥联信息安全技术有限公司 一种基于骨声纹的密钥保护方法及系统
CN114172644B (zh) * 2021-12-03 2023-04-25 三未信安科技股份有限公司 一种pci密码卡的优化椭圆曲线公钥密码的方法及系统
CN114598468B (zh) * 2022-03-16 2024-01-19 海光信息技术股份有限公司 密钥配置方法、数据传输方法、处理器、系统及相关设备
US20230393762A1 (en) * 2022-06-02 2023-12-07 Micron Technology, Inc. Verified key replacement in secure memory devices
CN116684074B (zh) * 2023-07-25 2023-10-20 杭州海康威视数字技术股份有限公司 硬件密码模组多核调度算法驱动方法、装置及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101170406A (zh) * 2006-10-27 2008-04-30 北京中电华大电子设计有限责任公司 双核公钥密码算法运算协处理器的一种实现方法
CN101308536A (zh) * 2007-05-16 2008-11-19 许丰 双核安全控制方法及装置
CN102103673A (zh) * 2009-12-16 2011-06-22 英特尔公司 在隐藏执行环境中提供完整性验证和证明
CN103607279A (zh) * 2013-11-14 2014-02-26 中国科学院数据与通信保护研究教育中心 基于多核处理器的密钥保护方法及系统

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004006075A1 (ja) * 2002-07-09 2004-01-15 Fujitsu Limited 開放型汎用耐攻撃cpu及びその応用システム
JP4263976B2 (ja) * 2003-09-24 2009-05-13 株式会社東芝 オンチップマルチコア型耐タンパプロセッサ
JP4179563B2 (ja) * 2006-09-21 2008-11-12 インターナショナル・ビジネス・マシーンズ・コーポレーション 暗号通信の暗号鍵を管理する技術
CN101741559B (zh) * 2008-11-10 2012-11-07 广州信睿网络科技有限公司 一种无密钥泄露的变色龙数字签名方法
US20120331308A1 (en) * 2011-06-22 2012-12-27 Media Patents, S.L. Methods, apparatus and systems to improve security in computer systems
CN102694649B (zh) * 2012-05-29 2014-09-24 北京大学 一种抵御冷启动攻击的公钥密码实现方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101170406A (zh) * 2006-10-27 2008-04-30 北京中电华大电子设计有限责任公司 双核公钥密码算法运算协处理器的一种实现方法
CN101308536A (zh) * 2007-05-16 2008-11-19 许丰 双核安全控制方法及装置
CN102103673A (zh) * 2009-12-16 2011-06-22 英特尔公司 在隐藏执行环境中提供完整性验证和证明
CN103607279A (zh) * 2013-11-14 2014-02-26 中国科学院数据与通信保护研究教育中心 基于多核处理器的密钥保护方法及系统

Also Published As

Publication number Publication date
CN103607279B (zh) 2017-01-04
US20150310231A1 (en) 2015-10-29
US9898624B2 (en) 2018-02-20
CN103607279A (zh) 2014-02-26

Similar Documents

Publication Publication Date Title
WO2015070560A1 (zh) 基于多核处理器的密钥保护方法及系统
US20230128711A1 (en) Technologies for trusted i/o with a channel identifier filter and processor-based cryptographic engine
EP3201820B1 (en) Protecting application secrets from operating system attacks
US7073059B2 (en) Secure machine platform that interfaces to operating systems and customized control programs
US20190036699A1 (en) Technologies for end-to-end biometric-based authentication and platform locality assertion
US8220029B2 (en) Method and system for enforcing trusted computing policies in a hypervisor security module architecture
US8826391B2 (en) Virtualized trusted descriptors
EP2666116B1 (en) System and method for supporting jit in a secure system with randomly allocated memory ranges
US10536274B2 (en) Cryptographic protection for trusted operating systems
CN104883256B (zh) 一种抵抗物理攻击和系统攻击的密钥保护方法
CN109901911A (zh) 一种信息设置方法、控制方法、装置及相关设备
CN107533615B (zh) 用于利用安全飞地来强化数据加密的技术
CN103038746A (zh) 用于基础设施即服务云环境中的可信执行的方法和装置
KR101213572B1 (ko) 하이퍼바이저를 활용한 사용자 어플리케이션 메모리 보호방법
EP3961446B1 (en) Method and apparatus for securely entering trusted execution environment in hyper-threading scenario
KR20140051350A (ko) 디지털 서명 권한자 의존형 플랫폼 기밀 생성 기법
EP3994578A1 (en) Memory deallocation across a trust boundary
JP2004272816A (ja) マルチタスク実行システム及びマルチタスク実行方法
US20240070091A1 (en) Isolation of memory regions in trusted domain
US20230098991A1 (en) Systems, methods, and media for protecting applications from untrusted operating systems
Zhou et al. How to Protect Your Secret in Memory
Karger et al. Implementing a high-assurance smart-card OS
Guo et al. Trusted Platform Based Linux File Access Control

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14862577

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14862577

Country of ref document: EP

Kind code of ref document: A1