CN107122668A - Firmware encrypting method - Google Patents

Firmware encrypting method Download PDF

Info

Publication number
CN107122668A
CN107122668A CN201710291973.9A CN201710291973A CN107122668A CN 107122668 A CN107122668 A CN 107122668A CN 201710291973 A CN201710291973 A CN 201710291973A CN 107122668 A CN107122668 A CN 107122668A
Authority
CN
China
Prior art keywords
aku
values
user terminal
server
information
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
CN201710291973.9A
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.)
Universal Wisdom Technology Beijing Co Ltd
Original Assignee
Universal Wisdom Technology Beijing 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 Universal Wisdom Technology Beijing Co Ltd filed Critical Universal Wisdom Technology Beijing Co Ltd
Priority to CN201710291973.9A priority Critical patent/CN107122668A/en
Publication of CN107122668A publication Critical patent/CN107122668A/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/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/572Secure firmware programming, e.g. of basic input output system [BIOS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present embodiments relate to a kind of firmware encrypting method, including:User terminal sends AKU detection to server by OTA and asked;The testing result information of the reception server feedback, determines that server has AKU according to testing result information;AKU download request is sent to server by OTA;The upgrading data packet that the reception server is issued;Upgrading data packet includes AKU and the corresponding MD5 values of AKU;MD5 values are write into the misc subregions of user terminal and the first MD5 values are stored as, and AKU is stored, the measurement information to be checked of interface configurations AKU is being set;User terminal is to setting interface to detect, after the measurement information to be checked of AKU is detected, and receives the confirmation updating operation instruction of user's input;Enter recovery patterns according to confirming that updating operation is instructed;After being verified by MD5 values, the system of user terminal is upgraded according to AKU.

Description

Firmware encrypting method
Technical field
The present invention relates to field of computer technology, more particularly to a kind of firmware encrypting method.
Background technology
Firmware (firmware), is called firmware, is a kind of software being embedded in hardware unit.Generally it is to be located at quick flashing In memory, and user can be allowed to update.With the development of mobile technology, mobile terminal, such as smart mobile phone are continuously increased Function, its firmware complexity is consequently increased.
Firmware updating can typically make some enhancings for cell-phone function, correct some minor errors, allow handset program to transport Row is more smooth, and speech quality is improved etc..
Firmware upgrade refers to by special ROMPaq, and the working procedure or source code in hardware are improved, made It obtains compatibility, performance or raising functionally.It from unlike upgrading driver etc. from the progress of machine bottom more Newly, thus more direct, more effective, performance is improved and also become apparent from.This upgrading can improve constantly the performance of machine, enter to be about to master The potentiality of machine are constantly brought into play but, and firmware upgrade has certain risk, thus needs effectively to manage firmware upgrade Control, is often realized by the way of firmware encrypting.And existing technology is all that, by public key, this mode of private key is entered to firmware Row encryption, if needed public key, under the business demand that private key externally discharges, this cipher mode can not just meet business need The requirement wanted, does not reach the effect effectively encrypted.
The content of the invention
It is an object of the invention to provide a kind of firmware encrypting method, by the way that the corresponding MD5 values of AKU are write before upgrading Enter misc subregions to carry out the checking of data validity, even if public key, private key open to the outside world, also ensure that system will not by with Meaning brush machine, can prevent third party from replacing firmware, effectively ensure control of the developer to system version.
To achieve the above object, the invention provides a kind of firmware encrypting method, including:
User terminal sends AKU detection to server by air interface OTA and asked;
The testing result information of the server feedback is received, the service utensil is determined according to the testing result information There is the AKU;
The user terminal sends AKU download request by the OTA to the server;
Receive the upgrading data packet that the server is issued;The upgrading data packet includes the AKU and the upgrading Wrap corresponding MD5 values;
The upgrading data packet is parsed, the AKU and the MD5 values is obtained;
The MD5 values are write into the misc subregions of the user terminal and the first MD5 values are stored as, and by the AKU Stored, the measurement information to be checked of AKU described in interface configurations is being set;
The user terminal detects to the setting interface, obtains the measurement information to be checked of the AKU, and according to The measurement information generation upgrade tip information to be checked;
Receive the confirmation updating operation instruction that user inputs according to the upgrade tip information;
Engineering recovery patterns are entered according to the confirmation updating operation instruction;
The MD5 values of the AKU are calculated, and the first MD5 values are obtained from misc subregions, determine that the calculating is obtained MD5 values it is whether consistent with the first MD5 values;
When being defined as consistent, the system of the user terminal is upgraded according to the AKU.
It is preferred that, described to be entered according to the confirmation updating operation instruction before engineering recovery patterns, methods described Also include:
Data check is carried out to the AKU.
It is further preferred that in the data check by rear, methods described also includes:
Write customizing messages into the cache/recovery/command files of the user terminal memory storage, and to The specified location write-in specific fields of the misc subregions.
It is further preferred that being entered described according to the confirmation updating operation instruction after engineering recovery patterns simultaneously And before the MD5 values for calculating the AKU, methods described also includes:
The specified location of the misc subregions is read, the information of the field of the specified location is obtained;
Determine that the field is consistent with the specific fields.
It is further preferred that methods described also includes:When it is determined that the field is inconsistent with the specific fields, generation First miscue information is simultaneously shown.
It is preferred that, when the MD5 values that the calculating is obtained are inconsistent with the first MD5 values, methods described also includes:It is raw Into the second miscue information and show.
Firmware encrypting method provided in an embodiment of the present invention, by writing the corresponding MD5 values of AKU before upgrading Misc subregions carry out the checking of data validity, even if public key, private key are opened to the outside world, also ensure that system will not be random Brush machine, can prevent third party from replacing firmware, effectively ensure control of the developer to system version.
Brief description of the drawings
Fig. 1 is the flow chart of firmware encrypting method provided in an embodiment of the present invention.
Embodiment
Below by drawings and examples, technical scheme is described in further detail.
Firmware encrypting method provided in an embodiment of the present invention, is mainly used in intelligent mobile terminal equipment, especially should With with smart mobile phone.
Fig. 1 is the flow chart of firmware encrypting method provided in an embodiment of the present invention, as shown in figure 1, main include following step Suddenly:
Step 101, user terminal sends AKU detection to server by air interface (OTA) and asked;
Specifically, air interface (Over-The-Air, OTA) is connect by the aerial of mobile radio communication (GSM or CDMA) Mouth carries out the technology of remote management to SIM card data and application.Air interface can be using skills such as SMS, WAP, GPRS, CDMA1X Art.And the OTA over the airs based on short message are means the most simple and reliable in OTA technologies.
User terminal sends detection request by OTA to server, and the information of user terminal is carried in detection request, The version information of current firmware can be wherein specifically included, so as to be applied to user terminal whether to have in detection service device Firmware upgrade bag.
Step 102, the testing result information of the reception server feedback, determines whether server has according to testing result information There is AKU;
Specifically, can determine whether there is AKU in server according to version information.Such as when version information is During the version of renewal, the AKU of the firmware upgrade bag for needed for is determined.
If without AKU, directly terminating the flow.
Only the situation for detecting AKU is discussed in this example.
Step 103, user terminal sends AKU download request by OTA to server;
Specifically, user terminal generates AKU download request when it is determined that having required AKU in server, lead to Cross OTA and be sent to server.Carry the information of AKU in AKU download request, and user terminal information.
Step 104, the upgrading data packet that the reception server is issued;
Specifically, server is issuing upgrading data packet according to AKU download request to user terminal.Upgrading data packet Including AKU and the corresponding MD5 values of AKU.
MD5 is Message-Digest Algorithm 5, also referred to as Message-Digest Algorithm 5, is computer safety field A kind of widely used hash function, the integrity protection to provide message, it is ensured that information transfer is completely consistent.
MD5 values are like " digital finger-print " of a file.The MD5 values of each file are different, if anyone is right File has done any change, i.e. its MD5 value corresponding " digital finger-print " will change.Such as download server is directed to One file is provided previously by a MD5 value, and user has been downloaded after this document, and the MD5 for downloading file is recalculated with this algorithm Value, by comparing, whether the two values identical, just can judge download file whether malfunction, the file downloaded in other words whether by Distort.
Step 105, upgrading data packet is parsed, obtains AKU and MD5 values;
Specifically, user terminal is parsed to the upgrading data packet that server is issued, AKU and MD5 values are obtained.
Step 106, MD5 values are write into the misc subregions of user terminal and is stored as the first MD5 values, and AKU is carried out Storage, is setting the measurement information to be checked of interface configurations AKU;
Specifically, mainly there is six subregions on android:Cache, misc, recovery, boot, system, data.
Wherein, there are Android bootstrap, including kernel and internal memory operation program on boot subregions.Without this point Area's equipment cannot be directed.This subregion can be wiped when recovery system, and bootstrap and ROM must be reinstalled System can just be restarted.
It is the whole operation system in addition to kernel and internal memory operation on system subregions, the inside contains Android User interface and preassembled system application.
Recovery subregions are considered as another boot partition, and starting device, which enters recovery consoles, can go to hold The senior system of row is recovered and management operation.
The in store user data of data subregions.Address list, short message, setting and the apps of installation are on this subregion.Wipe Except this subregion is equivalent to factory reset, when first time starting device or official or client are being mounted with This subregion of system meeting automatic Reconstruction after ROM.It is exactly to wipe this subregion when performing factory reset.
Cache subregions are the data that android system storage is frequently accessed and app place.Cache is spatial cache, The data cached and instruction that program and system are used just is deposited herein.Wipe this subregion and do not interfere with personal data, when you When being continuing with equipment, the data being wiped free of will be created automatically.
Misc subregions are set comprising the various complicated systems similar to on/off.These setting be probably USB configuration and Some hardware configuration informations.There is start-up loading control module (Bootloader Control Block, BCB) in the subregion, it is main If for depositing Recovery guidance informations.
Misc subregions are arrived in the MD5 values storage for the upgrading data packet that user terminal issues server., will for the ease of distinguishing The value of storage is referred to as the first MD5 values.
Step 107, user terminal obtains the measurement information to be checked of AKU to setting interface to detect, and according to be checked Measurement information generates upgrade tip information;
Specifically, AKU is after download, its measurement information to be checked can be loaded with interface setting, for being examined by system Measure AKU.After stored to MD5 values, user terminal performs the detection to setting interface, and according to detecting Measurement information to be checked generates upgrade tip information.
Further, upgrade tip information can include the corresponding firmware name of AKU, version information etc..
After generation upgrade tip information, user terminal shows upgrade tip information to user.
Step 108, the confirmation updating operation instruction that user inputs according to upgrade tip information is received;
Specifically, after user terminal is shown to upgrade tip information, detection user's input is defeated when receiving user During the operational order entered, operational order is parsed, it is determined whether be the operational order for confirming upgrading.
Step 109, data check is carried out to AKU;
Specifically, in AKU downloading process, carrier network may be kidnapped upgrading bag data, so as to cause The AKU file content finally downloaded is damaged, and can not be finally verified.In the event of the feelings of upgrading report data check failure Condition, can remove the packet downloaded, and send AKU download request to server again.
In AKU data check after, following step is continued executing with.
Step 110, customizing messages is write into the cache/recovery/command files of user terminal memory storage, and And write specific fields to the specified location of misc subregions.
Specifically, customizing messages can be update.zip files.
Step 111, engineering (recovery) pattern is entered according to confirmation updating operation instruction;
Wherein, recovery patterns generally refer to the recovery brush machine pattern of Android, and this is equivalent to windows systems Dos patterns, therefore the engineering mode of Android can also be referred to as, under this engineering mode, if dry run can be carried out, including It is not limited to restart mobile phone, brushes into system mend, brushes into a new mobile phone upgrade bag, format hand-set data and caching etc..
Step 112, the specified location of misc subregions is read, the information of the field of specified location is obtained;
Step 113, determine whether field is consistent with specific fields;
It is possible thereby to avoid damage etc. when system failure or data are lost when entering recovery patterns.
When field is inconsistent, step 114 is performed, the first miscue information is generated and shows.
Specifically, the first miscue information can point out the prompt message of AKU mistake.
When field is consistent, step 115 is performed, the MD5 values of AKU are calculated, and the first MD5 values are obtained from misc subregions;
Specifically, MD5 files can be calculated with applicable documentses verification and integrity verification program (FCIV), calculating obtains one MD5 values.The first MD5 values that the reception server is issued before being also stored with misc subregions, are compared to the two.
Step 116, it is determined that whether calculate obtained MD5 values consistent with the first MD5 values;
When being defined as consistent, step 117 is performed, the system of user terminal is upgraded according to AKU.
In addition, when calculating obtained MD5 values and the first MD5 values are inconsistent, performing step 118, the second mistake of generation is carried Show information and show.Specifically, the second miscue information can be the prompt message for pointing out upgrading to fail.
Firmware encrypting method provided in an embodiment of the present invention is there is provided the whole process of firmware upgrade management and control, by upgrading It is preceding to write misc subregions to carry out the checking of data validity by the corresponding MD5 values of AKU, even if public key, private key are to external-open Put, also ensure that system will not can be prevented third party from replacing firmware, effectively ensured developer to system by random brush machine The control of version.
Professional should further appreciate that, each example described with reference to the embodiments described herein Unit and algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, hard in order to clearly demonstrate The interchangeability of part and software, generally describes the composition and step of each example according to function in the above description. These functions are performed with hardware or software mode actually, depending on the application-specific and design constraint of technical scheme. Professional and technical personnel can realize described function to each specific application using distinct methods, but this realize It is not considered that beyond the scope of this invention.
The method that is described with reference to the embodiments described herein can use hardware, computing device the step of algorithm Software module, or the two combination are implemented.Software module can be placed in random access memory (RAM), internal memory, read-only storage (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field In any other form of storage medium well known to interior.
Above-described embodiment, has been carried out further to the purpose of the present invention, technical scheme and beneficial effect Describe in detail, should be understood that the embodiment that the foregoing is only the present invention, be not intended to limit the present invention Protection domain, within the spirit and principles of the invention, any modification, equivalent substitution and improvements done etc. all should be included Within protection scope of the present invention.

Claims (6)

1. a kind of firmware encrypting method, it is characterised in that the firmware encrypting method includes:
User terminal sends AKU detection to server by air interface OTA and asked;
The testing result information of the server feedback is received, determines that the server has institute according to the testing result information State AKU;
The user terminal sends AKU download request by the OTA to the server;
Receive the upgrading data packet that the server is issued;The upgrading data packet includes the AKU and the AKU pair The MD5 values answered;
The upgrading data packet is parsed, the AKU and the MD5 values is obtained;
The MD5 values are write into the misc subregions of the user terminal and the first MD5 values are stored as, and the AKU is carried out Storage, is setting the measurement information to be checked of AKU described in interface configurations;
The user terminal is detected to the setting interface, obtains the measurement information to be checked of the AKU, and according to described Measurement information to be checked generates upgrade tip information;
Receive the confirmation updating operation instruction that user inputs according to the upgrade tip information;
Engineering recovery patterns are entered according to the confirmation updating operation instruction;
The MD5 values of the AKU are calculated, and the first MD5 values are obtained from misc subregions, the MD5 for calculating and obtaining is determined Whether value is consistent with the first MD5 values;
When being defined as consistent, the system of the user terminal is upgraded according to the AKU.
2. firmware encrypting method according to claim 1, it is characterised in that described according to the confirmation updating operation instruction Into before engineering recovery patterns, methods described also includes:
Data check is carried out to the AKU.
3. firmware encrypting method according to claim 2, it is characterised in that pass through rear, the side in the data check Method also includes:
Write customizing messages into the cache/recovery/command files of the user terminal memory storage, and to described The specified location write-in specific fields of misc subregions.
4. firmware encrypting method according to claim 3, it is characterised in that referred to described according to the confirmation updating operation Order enters after engineering recovery patterns and before the MD5 values for calculating the AKU, and methods described also includes:
The specified location of the misc subregions is read, the information of the field of the specified location is obtained;
Determine that the field is consistent with the specific fields.
5. firmware encrypting method according to claim 4, it is characterised in that methods described also includes:When it is determined that the word When section and the inconsistent specific fields, generate the first miscue information and show.
6. firmware encrypting method according to claim 1, it is characterised in that when it is described calculate obtained MD5 values with it is described When first MD5 values are inconsistent, methods described also includes:Generate the second miscue information and show.
CN201710291973.9A 2017-04-28 2017-04-28 Firmware encrypting method Pending CN107122668A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710291973.9A CN107122668A (en) 2017-04-28 2017-04-28 Firmware encrypting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710291973.9A CN107122668A (en) 2017-04-28 2017-04-28 Firmware encrypting method

Publications (1)

Publication Number Publication Date
CN107122668A true CN107122668A (en) 2017-09-01

Family

ID=59726045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710291973.9A Pending CN107122668A (en) 2017-04-28 2017-04-28 Firmware encrypting method

Country Status (1)

Country Link
CN (1) CN107122668A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109391936A (en) * 2018-09-19 2019-02-26 四川长虹电器股份有限公司 A kind of method of OTA upgrade package encryption downloading
CN109922078A (en) * 2019-03-28 2019-06-21 努比亚技术有限公司 Upgrade control method, mobile terminal and computer readable storage medium
CN110022558A (en) * 2019-04-03 2019-07-16 Oppo广东移动通信有限公司 The encryption and decryption method and electronic device and storage medium of a kind of upgrade package
CN112579130A (en) * 2020-12-28 2021-03-30 河南城拜检测技术有限公司 Interactive IAP (Internet access protocol) upgrading method
CN112579130B (en) * 2020-12-28 2024-06-04 河南城拜检测技术有限公司 Interactive IAP upgrading method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662533A (en) * 2008-08-27 2010-03-03 深圳富泰宏精密工业有限公司 Software updating system and method
CN101924607A (en) * 2010-08-27 2010-12-22 华为终端有限公司 Firmware processing method based on firmware air transmission technology, device and system thereof
CN103957244A (en) * 2014-04-21 2014-07-30 惠州市新思为电子科技有限公司 Remote program upgrading method and server
US20140358866A1 (en) * 2013-05-30 2014-12-04 Qualcomm Incorporated Full file repair using schedule description fragment in embms
CN105183580A (en) * 2014-06-06 2015-12-23 西安中兴新软件有限责任公司 Storage method and fault recovery method for bootstrap program, and devices
CN105933150A (en) * 2016-04-20 2016-09-07 努比亚技术有限公司 OTA upgrade method, device and system
CN106406922A (en) * 2015-07-30 2017-02-15 中兴通讯股份有限公司 Software upgrade method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662533A (en) * 2008-08-27 2010-03-03 深圳富泰宏精密工业有限公司 Software updating system and method
CN101924607A (en) * 2010-08-27 2010-12-22 华为终端有限公司 Firmware processing method based on firmware air transmission technology, device and system thereof
US20140358866A1 (en) * 2013-05-30 2014-12-04 Qualcomm Incorporated Full file repair using schedule description fragment in embms
CN103957244A (en) * 2014-04-21 2014-07-30 惠州市新思为电子科技有限公司 Remote program upgrading method and server
CN105183580A (en) * 2014-06-06 2015-12-23 西安中兴新软件有限责任公司 Storage method and fault recovery method for bootstrap program, and devices
CN106406922A (en) * 2015-07-30 2017-02-15 中兴通讯股份有限公司 Software upgrade method and device
CN105933150A (en) * 2016-04-20 2016-09-07 努比亚技术有限公司 OTA upgrade method, device and system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109391936A (en) * 2018-09-19 2019-02-26 四川长虹电器股份有限公司 A kind of method of OTA upgrade package encryption downloading
CN109391936B (en) * 2018-09-19 2021-04-06 四川长虹电器股份有限公司 OTA upgrade package encryption downloading method
CN109922078A (en) * 2019-03-28 2019-06-21 努比亚技术有限公司 Upgrade control method, mobile terminal and computer readable storage medium
CN109922078B (en) * 2019-03-28 2023-03-21 努比亚技术有限公司 Upgrade control method, mobile terminal and computer-readable storage medium
CN110022558A (en) * 2019-04-03 2019-07-16 Oppo广东移动通信有限公司 The encryption and decryption method and electronic device and storage medium of a kind of upgrade package
CN112579130A (en) * 2020-12-28 2021-03-30 河南城拜检测技术有限公司 Interactive IAP (Internet access protocol) upgrading method
CN112579130B (en) * 2020-12-28 2024-06-04 河南城拜检测技术有限公司 Interactive IAP upgrading method

Similar Documents

Publication Publication Date Title
CN107122212A (en) Firmware encrypting method
EP1897386B1 (en) Apparatus and methods for managing firmware verification on a wireless device
US10162625B2 (en) Vehicle control storage methods and systems
US10268845B2 (en) Securing of the loading of data into a nonvolatile memory of a secure element
WO2014146256A1 (en) Upgrade method, intelligent terminal, and upgrade system
CN107678762B (en) System version upgrading method and device
CN105637521B (en) Data processing method and intelligent terminal
CN104573435A (en) Method for terminal authority management and terminal
CN106612192A (en) An equipment upgrading method, apparatus and system
CN108830113A (en) A kind of acquisition methods of Android device unique identification
CN104751049A (en) Application program installing method and mobile terminal
CN107122668A (en) Firmware encrypting method
US20170034699A1 (en) Method of managing a profile stored in a secure element, and corresponding secure element
CN111158729A (en) System upgrading method, device, equipment and storage medium
US20120231763A1 (en) Method and system for antivirus on a mobile device by sim card
CN107479923A (en) Application program updating method, apparatus and display terminal
CN113806808B (en) Non-invasive data desensitization method and system in distributed environment
KR20230019032A (en) Pre-personalized secure element and embedded personalization
CN111125771B (en) Method and device for protecting equipment privacy, electronic equipment and storage medium
CN111506897B (en) Data processing method and device
US7684992B2 (en) Remote application correction
CN114647424A (en) ECU application program updating method, device, system, storage medium and electronic equipment
CN111338681A (en) Firmware upgrading method and system for equipment
US20230297724A1 (en) Hardware identity restoration post-device repair
CN106775881B (en) System upgrading method and device

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170901

WD01 Invention patent application deemed withdrawn after publication