CN109491712B - Trusted boot method suitable for VxWorks environment - Google Patents

Trusted boot method suitable for VxWorks environment Download PDF

Info

Publication number
CN109491712B
CN109491712B CN201811293270.0A CN201811293270A CN109491712B CN 109491712 B CN109491712 B CN 109491712B CN 201811293270 A CN201811293270 A CN 201811293270A CN 109491712 B CN109491712 B CN 109491712B
Authority
CN
China
Prior art keywords
vxworks
mirror image
image file
encrypted
authentication code
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.)
Active
Application number
CN201811293270.0A
Other languages
Chinese (zh)
Other versions
CN109491712A (en
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.)
Beijing Jinghang Computing Communication Research Institute
Original Assignee
Beijing Jinghang Computing Communication Research Institute
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 Beijing Jinghang Computing Communication Research Institute filed Critical Beijing Jinghang Computing Communication Research Institute
Priority to CN201811293270.0A priority Critical patent/CN109491712B/en
Publication of CN109491712A publication Critical patent/CN109491712A/en
Application granted granted Critical
Publication of CN109491712B publication Critical patent/CN109491712B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/575Secure boot

Abstract

The invention belongs to the technical field of embedded information security, and particularly relates to a trusted boot method suitable for VxWorks environment. The method systematically encrypts the VxWorks image files and the user application programs, solves the problem of plaintext storage of the core intellectual property in the hard disk, enables cracking personnel not to directly perform static decompilation and dynamic debugging, effectively increases cracking difficulty and system safety, and further protects the core intellectual property.

Description

Trusted boot method suitable for VxWorks environment
Technical Field
The invention belongs to the technical field of embedded information security, and particularly relates to a trusted boot method suitable for a VxWorks environment, which is designed for embedded trusted computing and secure boot (bootrom) and is applied to a scene with higher requirements of a user on the security of an operating system and the security of a user application program in the VxWorks environment.
Background
The VxWorks operating system is an embedded real-time operating system designed by Windriver company in the United states, and the VxWorks operating system has good reliability and excellent real-time performance and is widely applied to the fields of communication, military, aviation, aerospace and the like, such as satellite communication, ballistic guidance, aircraft navigation and the like. How to better ensure the mirror image of the VxWorks operating system and the user application program and improve the overall security of the system becomes a problem concerned by people.
At present, a BootRom mode is designed for power-on booting of a VxWorks operating system, a BootRom program is run after power-on booting is carried out, operations such as hardware initialization and the like are completed in the BootRom, meanwhile, a VxWorks operating system mirror image is loaded into a memory, a mirror image inlet is jumped to, and an operating system kernel is started. And after the kernel of the operating system is started, switching to a system user mode, calling a user-defined application program, out files and starting a user program.
In the current more applications, a trusted boot design is not performed on a VxWorks operating system mirror image and a user application program, and at the moment, the compiled mirror image program or the user application program can be cracked through means such as static decompilation and dynamic debugging, and an illegal person obtains a source code or thinking intention of a developer, so that intellectual property is infringed, and even operating system and application program files are tampered and damaged, and unpredictable serious consequences are caused.
Disclosure of Invention
Technical problem to be solved
The technical problem to be solved by the invention is as follows: how to solve the safety problems of the operating system mirror image and the user application program under the VxWorks environment so as to effectively improve the safety of software.
(II) technical scheme
In order to solve the technical problem, the invention provides a trusted boot method suitable for VxWorks environment, which comprises the following steps:
step 1: in a BootRom program of the system, opening a VxWorks mirror image file, reading structural body data at the head of the VxWorks mirror image file, and judging whether the VxWorks mirror image file is encrypted or not;
if not, reading the length of the VxWorks mirror image file, applying for an equal memory space, and reading binary data of the VxWorks mirror image file into the corresponding memory space;
if the encryption is carried out, jumping to the step 5;
step 2: generating an HMAC authentication code for the read binary data of the VxWorks mirror image file;
supplementing k bits of 0 according to the length tlen of the VxWorks image file obtained in the step 1, obtaining that the length of the supplemented binary data meets the condition that tlen + k is 448mod512, and performing HMAC authentication processing on the supplemented binary data to generate an HMAC authentication code serving as a software integrity check reference value;
and step 3: encrypting the binary data of the read VxWorks mirror image file;
filling km bits 0 in the binary data read in the step 1, so that tlen + km is 0mod128, and forming the length of the filled binary data to be len; encrypting the filled binary data to generate encrypted ciphertext data with len ═ tlen + km bits;
and 4, step 4: writing the encrypted ciphertext data back to the VxWorks mirror image file, writing the encrypted structure data at the head of the VxWorks mirror image file as an encrypted file mark, writing the ciphertext data and the file mark back to the VxWorks mirror image file to form the encrypted VxWorks mirror image file, and then closing the encrypted VxWorks mirror image file;
and 5: under the condition that the VxWorks mirror image file is confirmed to be encrypted, opening the existing encrypted VxWorks mirror image file, and reading encrypted structure body data at the head of the VxWorks mirror image file; and carrying out decryption operation on the ciphertext data with the length of len by adopting a symmetric encryption algorithm to obtain an HMAC authentication code obtained by decryption, and finishing the safe guidance of the VxWorks mirror image file according to the HMAC authentication code obtained by decryption.
In step 2, HMAC authentication is performed by using a SHA2 one-way hash algorithm to generate an HMAC authentication code.
Wherein, in the step 2, the generated HMAC authentication code is 256 bits.
In the step 3, the read binary data is encrypted by a block encryption algorithm AES.
In the step 5, the encrypted structure data includes: the encrypted file flag, the ciphertext data length len.
In step 5, firstly, the ciphertext data with len bit length is decrypted to obtain the original binary data of the plaintext, then the HMAC authentication code obtained by decryption is compared with the HMAC authentication code generated in step 2 as the integrity check reference value, if the HMAC authentication code is consistent with the HMAC authentication code, trusted boot is completed, otherwise, the authentication fails, and the boot process is exited.
Therein, the len-bit cipher text data is decrypted by using the AES decryption algorithm.
(III) advantageous effects
Compared with the prior art, the invention systematically encrypts the VxWorks image file and the user application program, solves the problem of plaintext storage of the core intellectual property right in the hard disk, enables cracking personnel not to directly perform static decompilation and dynamic debugging, effectively increases cracking difficulty and system safety, and further protects the core intellectual property right.
Drawings
Fig. 1 is a schematic diagram of the technical scheme of the invention.
FIG. 2 is a flow chart of the technical solution of the present invention.
Detailed Description
In order to make the objects, contents, and advantages of the present invention clearer, the following detailed description of the embodiments of the present invention will be made in conjunction with the accompanying drawings and examples.
In order to solve the above technical problem, as shown in fig. 1, the technical solution adopted by the present invention is: according to the design idea of embedded trusted computing, a VxWorks mirror image file is read in a BootRom system, the VxWorks mirror image file is encrypted by adopting a grouping algorithm AES, an HMAC authentication code of mirror image data is generated by adopting SHA2 and is used as an integrity check reference value, and the safe guiding of a system mirror image is completed. Reading out a user application program in a system VxWorks mirror image file, encrypting the user application program by adopting a grouping algorithm AES, generating an HMAC authentication code of mirror image data by adopting SHA2 as an integrity check reference value, and finishing the safe guide of the user application program.
Specifically, to solve the problems in the prior art, the present invention provides a trusted boot method suitable for a VxWorks environment, as shown in fig. 2, where the method includes the following steps:
step 1: in a BootRom program of the system, opening a VxWorks mirror image file, reading structural body data at the head of the VxWorks mirror image file, and judging whether the VxWorks mirror image file is encrypted or not;
if not, reading the length of the VxWorks mirror image file, applying for an equal memory space, and reading binary data of the VxWorks mirror image file into the corresponding memory space;
if the encryption is carried out, jumping to the step 5;
step 2: generating an HMAC authentication code for the read binary data of the VxWorks mirror image file;
supplementing k bits of 0 according to the length tlen of the VxWorks image file obtained in the step 1, obtaining that the length of the supplemented binary data meets the condition that tlen + k is 448mod512, and performing HMAC authentication processing on the supplemented binary data to generate an HMAC authentication code serving as a software integrity check reference value;
and step 3: encrypting the binary data of the read VxWorks mirror image file;
filling km bits 0 in the binary data read in the step 1, so that tlen + km is 0mod128, and forming the length of the filled binary data to be len; encrypting the filled binary data to generate encrypted ciphertext data with len ═ tlen + km bits;
and 4, step 4: writing the encrypted ciphertext data back to the VxWorks mirror image file, writing the encrypted structure data at the head of the VxWorks mirror image file as an encrypted file mark, writing the ciphertext data and the file mark back to the VxWorks mirror image file to form the encrypted VxWorks mirror image file, and then closing the encrypted VxWorks mirror image file;
and 5: under the condition that the VxWorks mirror image file is confirmed to be encrypted, opening the existing encrypted VxWorks mirror image file, and reading encrypted structure body data at the head of the VxWorks mirror image file; and carrying out decryption operation on the ciphertext data with the length of len by adopting a symmetric encryption algorithm to obtain an HMAC authentication code obtained by decryption, and finishing the safe guidance of the VxWorks mirror image file according to the HMAC authentication code obtained by decryption.
In step 2, HMAC authentication is performed by using a SHA2 one-way hash algorithm to generate an HMAC authentication code.
Wherein, in the step 2, the generated HMAC authentication code is 256 bits.
In the step 3, the read binary data is encrypted by a block encryption algorithm AES. AES (advanced encryption standard) is an algorithm published in NIST (national institute of standards and technology) 2001, and has high security.
In the step 5, the encrypted structure data includes: the encrypted file flag, the ciphertext data length len.
In step 5, firstly, the ciphertext data with len bit length is decrypted to obtain the original binary data of the plaintext, then the HMAC authentication code obtained by decryption is compared with the HMAC authentication code generated in step 2 as the integrity check reference value, if the HMAC authentication code is consistent with the HMAC authentication code, trusted boot is completed, otherwise, the authentication fails, and the boot process is exited.
Therein, the len-bit cipher text data is decrypted by using the AES decryption algorithm.
After the technical scheme is adopted, core intellectual property rights such as VxWorks mirror image files, user application programs and the like are stored in the hard disk by adopting the ciphertext, and cracking personnel cannot directly perform static decompilation and dynamic debugging, so that the cracking difficulty and the system safety are effectively increased, and the core intellectual property rights are further protected.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (6)

1. A trusted boot method suitable for VxWorks environment is characterized by comprising the following steps:
step 1: in a BootRom program of the system, opening a VxWorks mirror image file, reading structural body data at the head of the VxWorks mirror image file, and judging whether the VxWorks mirror image file is encrypted or not;
if not, reading the length of the VxWorks mirror image file, applying for an equal memory space, and reading binary data of the VxWorks mirror image file into the corresponding memory space;
if the encryption is carried out, jumping to the step 5;
step 2: generating an HMAC authentication code for the read binary data of the VxWorks mirror image file;
supplementing k bits of 0 according to the length tlen of the VxWorks image file obtained in the step 1, obtaining that the length of the supplemented binary data meets the condition that tlen + k is 448mod512, and performing HMAC authentication processing on the supplemented binary data to generate an HMAC authentication code serving as a software integrity check reference value;
and step 3: encrypting the binary data of the read VxWorks mirror image file;
filling km bits 0 in the binary data read in the step 1, so that tlen + km is 0mod128, and forming the length of the filled binary data to be len; encrypting the filled binary data to generate encrypted ciphertext data with len ═ tlen + km bits;
and 4, step 4: writing the encrypted ciphertext data back to the VxWorks mirror image file, writing the encrypted structure data at the head of the VxWorks mirror image file as an encrypted file mark, writing the ciphertext data and the file mark back to the VxWorks mirror image file to form the encrypted VxWorks mirror image file, and then closing the encrypted VxWorks mirror image file;
and 5: under the condition that the VxWorks mirror image file is confirmed to be encrypted, opening the existing encrypted VxWorks mirror image file, and reading encrypted structure body data at the head of the VxWorks mirror image file; and (3) carrying out decryption operation on the ciphertext data with the length of len by adopting a symmetric encryption algorithm, obtaining the HMAC authentication code obtained by decryption, obtaining the original binary data of the plaintext, then comparing the HMAC authentication code obtained by decryption with the HMAC authentication code which is generated in the step (2) and serves as the integrity check reference value, if the HMAC authentication code obtained by decryption is consistent with the HMAC authentication code, finishing trusted guidance, and otherwise, failing to authenticate, and exiting the guidance process.
2. The trusted boot method for VxWorks environments of claim 1, wherein in step 2, HMAC authentication is performed through a SHA2 one-way hash algorithm to generate an HMAC authentication code.
3. The trusted boot method for a VxWorks environment according to claim 1, wherein in step 2, the generated HMAC authentication code is 256 bits.
4. The trusted boot method for VxWorks environments according to claim 1, wherein in said step 3, the read binary data is encrypted by AES (block encryption algorithm).
5. The trusted boot method applicable to a VxWorks environment according to claim 1, wherein in the step 5, the encryption structure data includes: and marking the encrypted file.
6. The trusted boot method for a VxWorks environment according to claim 5, wherein the len-bit ciphertext data is decrypted using an AES decryption algorithm.
CN201811293270.0A 2018-11-01 2018-11-01 Trusted boot method suitable for VxWorks environment Active CN109491712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811293270.0A CN109491712B (en) 2018-11-01 2018-11-01 Trusted boot method suitable for VxWorks environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811293270.0A CN109491712B (en) 2018-11-01 2018-11-01 Trusted boot method suitable for VxWorks environment

Publications (2)

Publication Number Publication Date
CN109491712A CN109491712A (en) 2019-03-19
CN109491712B true CN109491712B (en) 2021-09-10

Family

ID=65693593

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811293270.0A Active CN109491712B (en) 2018-11-01 2018-11-01 Trusted boot method suitable for VxWorks environment

Country Status (1)

Country Link
CN (1) CN109491712B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221613A (en) * 2006-12-29 2008-07-16 英特尔公司 Methods and apparatus for authenticating components of processing systems
CN101504705A (en) * 2009-03-17 2009-08-12 武汉大学 Trusted platform module and its computer starting control method
CN101770386A (en) * 2010-03-08 2010-07-07 北京飞天诚信科技有限公司 Safe startup method for Linux embedded system
CN101843033A (en) * 2007-08-28 2010-09-22 Abb研究有限公司 Real-time communication security for automation networks
CN102567666A (en) * 2011-11-24 2012-07-11 中国船舶重工集团公司第七0九研究所 Implementation method for virtual construction and driving of trusted platform module in VxWorks
CN103853983A (en) * 2012-12-06 2014-06-11 三星电子株式会社 System on chip to perform secure boot, image forming apparatus using the same, and method thereof
CN105550586A (en) * 2014-10-30 2016-05-04 北京京航计算通讯研究所 Trusted boot design method applicable to DSP environment
CN106415564A (en) * 2014-06-05 2017-02-15 索尼公司 Dynamic configuration of trusted executed environment
CN107820604A (en) * 2015-04-14 2018-03-20 吉佳维申公司 Half virtualization security threat protection of the computer driven systems with networked devices

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221613A (en) * 2006-12-29 2008-07-16 英特尔公司 Methods and apparatus for authenticating components of processing systems
CN101843033A (en) * 2007-08-28 2010-09-22 Abb研究有限公司 Real-time communication security for automation networks
CN101504705A (en) * 2009-03-17 2009-08-12 武汉大学 Trusted platform module and its computer starting control method
CN101770386A (en) * 2010-03-08 2010-07-07 北京飞天诚信科技有限公司 Safe startup method for Linux embedded system
CN102567666A (en) * 2011-11-24 2012-07-11 中国船舶重工集团公司第七0九研究所 Implementation method for virtual construction and driving of trusted platform module in VxWorks
CN103853983A (en) * 2012-12-06 2014-06-11 三星电子株式会社 System on chip to perform secure boot, image forming apparatus using the same, and method thereof
CN106415564A (en) * 2014-06-05 2017-02-15 索尼公司 Dynamic configuration of trusted executed environment
CN105550586A (en) * 2014-10-30 2016-05-04 北京京航计算通讯研究所 Trusted boot design method applicable to DSP environment
CN107820604A (en) * 2015-04-14 2018-03-20 吉佳维申公司 Half virtualization security threat protection of the computer driven systems with networked devices

Also Published As

Publication number Publication date
CN109491712A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
US10341091B2 (en) Secure memory storage
CN106980794B (en) TrustZone-based file encryption and decryption method and device and terminal equipment
US9043610B2 (en) Systems and methods for data security
KR101767655B1 (en) Dynamic encryption keys for use with xts encryption systems employing reduced-round ciphers
EP3192207B1 (en) Apparatus and method for data encryption
CN105450620A (en) Information processing method and device
US20150242332A1 (en) Self-encrypting flash drive
US20150095653A1 (en) Method and apparatus of creating application package, method and apparatus of executing application package, and recording medium storing application package
US20150113272A1 (en) Method and apparatus for authenticating and managing application using trusted platform module
CN112469036B (en) Message encryption and decryption method and device, mobile terminal and storage medium
US9256756B2 (en) Method of encryption and decryption for shared library in open operating system
US11288381B2 (en) Calculation device, calculation method, calculation program and calculation system
WO2014028194A1 (en) Securely generating and storing passwords in a computer system
CN111431718A (en) TEE expansion-based computer universal security encryption conversion layer method and system
US9367700B2 (en) System and method for establishing a shared secret for communication between different security domains
CN110750791A (en) Method and system for guaranteeing physical attack resistance of trusted execution environment based on memory encryption
US20170054554A1 (en) Apparatus for obfuscating and restoring program execution code and method thereof
CN104504310A (en) Method and device for software protection based on shell technology
CN109491712B (en) Trusted boot method suitable for VxWorks environment
CN110008724B (en) Solid state hard disk controller safe loading method and device and storage medium
CN103530169A (en) Method for protecting virtual machine files and user terminal
CN105426702A (en) Android operating system based application program encrypting method and device, and Android operating system based application program decrypting method and device
CN107609405B (en) External secure memory device and system-on-chip SOC
US10992453B2 (en) System architecture for encrypting external memory
CN109492404A (en) A kind of trusted booting system suitable for VxWorks environment

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
GR01 Patent grant
GR01 Patent grant