A kind of development approach and system based on application program for mobile terminal safety applications
Technical field
It is the present invention relates to a kind of mobile terminal data security fields, more particularly to a kind of based on application program for mobile terminal peace
The development approach and system of full application.
Background technology
PKI:Public Key Infrastructure, i.e. PKIX, are a kind of keys for following written standards
Management platform, it can provide the cryptographic services such as encryption and decryption and digital signature and necessary key for all information security applications
With certificate management system, in simple terms, PKI is exactly that the basis of the offer security service set up using public key theory and technology is set
Apply.PKI technologies are the cores of information security technology, and the crucial and basic technology of ecommerce.
Certificate SDK:Software Development Kit, based on PKI systems, one can provide opening for safety supports
Platform is sent out, internal to different type, different medium, the certificate operation of different specification carry out unified interface encapsulation, and user is without needs
It is concerned about complicated security details, (such as P1, P7 is signed and tested, data letter need to only to call result data that the corresponding interface obtains oneself mutually wanting
Envelope, symmetrical encryption and decryption, HASH etc.).This SDK will support cross-platform, support that the CSP of main flow, P11, the close specification of state support soft or hard
Certificate.
HMAC:Hash-based Message Authentication Code, are the related Hash operation message of key
Authentication code, HMAC computings utilize hash algorithm, with a key and a message as input, generate an eap-message digest as defeated
Go out.
With the progress and development of information age, intelligent movable mobile phone has obtained rapid popularization, and mobile terminal application is made
For the core of smart mobile phone, countless, miscellaneous application program for mobile terminal has captured Mobile solution market, and these should
With the demand for meeting user's different aspect.Can be divided into from user mutual in form:User logs in, user's registration, user recognize
Card etc., can be divided into from text data information transmission:Cloud phone, mail, check document, file storage.Show exhibition from information
Show and can be divided into:Address list, mail, browser etc. are applied;Mobile terminal application provides what information showed, and transmitted and stores
Function, without in view of being packaged using encryption technology, it is ensured that the safety management of data Life cycle.
It is existing use relatively extensive some systems be all using password, domain certification and coded lock as authentication, and
And for the transmission of data all adopts clear-text way;Data are all to locally with stored in clear;
|
Basal profile |
Authentication |
User name, password, graphical passwords lock |
Data transfer |
Plaintext transmission |
Data storage |
Stored in clear |
The problem that current mobile terminal application is primarily present:
1. authentication is carried out using password or coded lock, Cipher Strength is weaker, it is impossible to guarantee identity security;
2., in data transmission procedure, plaintext transmission, data are possible to monitored;
3. downloaded using mobile terminal and file is checked in plain text, it is impossible to guarantee data safety.
Existence foundation SDK in prior art, supports as the function of mobile terminal application, and some developers are basic by some
Function package is in SDK, there is provided quickly realize phase by calling basic SDK to Mobile solution developer, upper-layer service logic
The function of answering, for the function of a certain application of mobile terminal carries out unified management, maintenance, this improve code durability,
Work efficiency and reduction company cost.
Existing SDK is directed to the functions such as user authentication, data transfer, equipment control, third-party application and is packaged, from
And the certification to user provides username-password authentication mode, the encapsulation of the technologies such as SQLite, XML is provided for data storage,
The modes such as Http, TCP are provided to network and receives and dispatches senior encapsulation.
Fig. 1 is the functional structure chart that mail SDK possesses in prior art, and Fig. 2 is mobile terminal mail in prior art
Transmission flow figure.
As shown in figure 1, existing mail SDK includes following functions component:Password logon component, sends mail components, wound
Mail components are built, mail components, database component, configuration component is received.
Mailing system of the prior art includes:Mail Clients, mail SDK, mail server, mail transmission flow is such as
Under:
1)The mail APP of Mail Clients starts to send mail;
2)Mail APP calls SDK to send mail interface;
3)After mail SDK receives mail data, mail data is transferred to into mail server;
4)Mail server receives mail data;
5)According to recipient address, mail server is transmitted data at e-mail recipient;
6)Mail server returning result information;
7)Mail SDK will send object information return;
8)Mail Clients is received and sends object information;
9)Terminate.
Encapsulation base application SDK is a kind of conventional mode of each manufacturer, such as provides mail mobile terminal SDK, address list
SDK, network data transmission SDK, data storage XML, SQLite etc. all encapsulate basic SDK, provide for upper layer application and quickly open
Send out interface.But most basic SDK does not consider how to ensure authentication safety itself, such as prevents replay attack, prevents
Only identity impersonation, excessive in network transmission consider is efficiency of transmission, or model is light, does not consider whether exist
The potential safety hazard such as divulge a secret, file data may be monitored in transmitting procedure;Arrived with clear-text way storage in terms of data storage
May locally be stolen, not do control of authority and manage with document life;Lack unified management, unified protection
The content of the invention
In order to solve the development problem of application program for mobile terminal safety applications, the present invention proposes a kind of based on mobile whole
The development approach of end application security application, the method comprise the steps:
1)Server request random number is sent terminal to, after the random number for receiving request, transmission terminal secret key is called
The random number is signed, and signature result and public signature key certificate are sent to the server, the server is demonstrate,proved
Book validation verification sign test, return authentication result if the verification passes, skip to step 2);
2)Send terminal and call safe SDK, and user profile and data message, the safe SDK roots is sent to the SDK
Receiving terminal public key is obtained according to the user profile, then in locally generated symmetric key, and using the symmetric key to receiving
The data message be encrypted, the symmetric key is encrypted using the receiving terminal public key, will be encrypted right
Claim key and data message to be assembled into digital envelope, the digital envelope is returned to into transmission terminal finally;
3)Send terminal to receiving terminal and send above-mentioned digital envelope;
4)After the receiving terminal receives the digital envelope, the safe SDK is called, the safe SDK parsings are described
Digital envelope, parses ciphertext symmetric key and ciphertext data, using receiving terminal private key decrypting ciphertext symmetric key, using bright
Literary symmetric key decryption ciphertext data, by the application layer of the clear data information transmission of decryption to receiving terminal.
Further, the step 1)In, terminal is sent after the random number for receiving request, carry out enumerating equipment, beat
Open up it is standby, enumerate certificate, then verify PIN code, if authentication failed, terminate verify flow process, if be proved to be successful, just continuation
Follow-up verification step.
Further, the step 2)Described in safe SDK the receiving terminal public key is obtained according to the user profile
Including:The safe SDK is locally searching the receiving terminal public key according to the user profile, if locally do not existed,
The user profile is sent to into server, the receiving terminal public key is received from the server.
Further, the transmission terminal and receiving terminal respectively send mail terminal and receive mail terminal, described
Server includes mail security management platform and mail server, and the transmission mail terminal is by the mail server to described
Receive mail terminal and send mail.
Further, the step 2)Middle transmission mail terminal calls the safe SDK, and sends to the safe SDK
The E-mail of plaintext, e-mail recipient's list, the safe SDK are obtained according to e-mail recipient's list and receive mail terminal public affairs
Key, and the effectiveness of the public key is verified, after being verified, to mail signature.
Further, the step 4)Used in after plaintext symmetric key decryption ciphertext data, need checking to receive mail
The effectiveness of terminal public key.
In order to solve the development problem of application program for mobile terminal safety applications, the invention allows for a kind of based on movement
The development system of end application safety applications, the system include:Send terminal, safe SDK, server, receiving terminal;
Server request random number is sent terminal to, after the random number for receiving request, transmission terminal secret key pair is called
The random number is signed, and signature result and public signature key certificate are sent to the server, and the server carries out certificate
Validation verification sign test, return authentication result;Terminal is sent after authentication success, safe SDK is called, and to described
SDK sends user profile and data message, and the safe SDK obtains receiving terminal public key, Ran Hou according to the user profile
Locally generated symmetric key, and the data message for receiving is encrypted using the symmetric key, received eventually using described
End public key is encrypted to the symmetric key, and encrypted symmetric key and data message are assembled into digital envelope, finally will
The digital envelope returns to transmission terminal, sends terminal to receiving terminal and sends above-mentioned digital envelope;The receiving terminal is received
To after the digital envelope, the safe SDK is called, the safe SDK parses the digital envelope, parses ciphertext symmetric key
With ciphertext data, using receiving terminal private key decrypting ciphertext symmetric key, using plaintext symmetric key decryption ciphertext data, will solve
Application layer of the close clear data information transmission to receiving terminal.
Further, terminal is sent after the random number for receiving request, carry out enumerating equipment, opening equipment, enumerate card
Book, then verifies PIN code, if authentication failed, terminates to verify flow process, if be proved to be successful, just continues follow-up checking step
Suddenly.
Further, the safe SDK obtains the receiving terminal public key according to the user profile and includes:The safety
SDK is locally searching the receiving terminal public key according to the user profile, if locally do not existed, by the user profile
Server is sent to, and the receiving terminal public key is received from the server.
Further, the transmission terminal and receiving terminal respectively send mail terminal and receive mail terminal, described
Server includes mail security management platform and mail server, and the transmission mail terminal is by the mail server to described
Receive mail terminal and send mail.
Further, send mail terminal and call the safe SDK, and to the safe SDK send plaintext E-mail,
E-mail recipient's list, the safe SDK are obtained according to e-mail recipient's list and receive mail terminal public key, with transmission mail
The private key of terminal is signed to mail, produces symmetric key, and privacy enhanced mail using certifying device, uses receiving terminal public key encryption
Symmetric key is simultaneously packaged into digital envelope with ciphertext mail, is assembled into secure e-mail E-mail, and secure e-mail E-mail is sent out
Deliver to mail server.
Further, the transmission mail terminal calls the safe SDK, and sends the E- of plaintext to the safe SDK
Mail, e-mail recipient's list, the safe SDK are obtained according to e-mail recipient's list and receive mail terminal public key, and are tested
The effectiveness of the public key is demonstrate,proved, after being verified, to mail signature.
Further, using after plaintext symmetric key decryption ciphertext data, needs checking receives mail end to the safe SDK
The effectiveness of end public key.
Further, the system also includes a data base, is encrypted reconciliation for the pagefile for sqlite3
It is close.
Further, the system also includes a mobile management control station, there is provided a UI operation interface, to mobile terminal row
For and user carry out management and control, including user management, strategy configuration, log audit.
By scheme proposed by the present invention, following technique effect is achieved:
The relevant issues of data information security after third-party application calls this SDK, can be avoided substantially, is recognized including identity
Card, data leak, apparatus management/control etc..Because the certificate in the identity and hardware device of user is mutually binding.If no
This hardware device, related people cannot check ciphered data information.Even if data message monitored intercepting in the transmission, but supervise
Hearer also has no idea to be decrypted data message so as to which the data for obtaining are without in all senses.
Description of the drawings
Fig. 1 is the functional unit figure that mail SDK possesses in prior art.
Fig. 2 is mobile terminal mail transmission flow figure in prior art.
Fig. 3 is the overall framework figure of the present invention.
Fig. 4 is the mobile terminal authentication flow chart of the present invention.
Fig. 5 is the mobile terminal data encryption flow figure of the present invention.
Fig. 6 is the mobile terminal data decryption flow chart of the present invention.
Fig. 7 is that the present invention realizes that mobile terminal safety sends the overall framework figure of mail.
Fig. 8 is the mobile terminal email encryption flow chart of the present invention.
Fig. 9 is the mobile terminal mail decryption flow chart of the present invention.
Specific embodiment
It is an object of the invention to provide various safe identification authentication modes, the such as certification of certificate mode, dynamic password side
Formula certification, improves mechanism of permitting the entrance, in the face of data storage security, there is provided the SQLite of safety, XML, configuration file, and landing document adds
The modes such as close storage, rights management, and life cycle management, it is ensured that mobile terminal local datastore safety;Network is passed
The HTTP encrypted transmissions agency of the defeated socket layer that safety is provided, and various TSM Security Agent modes based on certificate, such as safety,
The Socket of safety(TCP/UDP), so as to protect transmitted data on network safety, request data put distort, anti-repudiation.And offer sets
Standby management and control interface, is uniformly controlled to the wifi/ bluetooths of equipment.A series of underlying security interfaces of opening, such as credential key behaviour
Make, such as encryption and decryption, signature, sign test, P7 encapsulation, PKCS#11 standard interfaces, based on these basic security components, are incorporated into postal
In part mobile terminal, network application mobile terminal, mobile office software, it is ensured that identity security is pacified with the data in verification process
Entirely, and for network data and file data from being transferred to storage provide safety guarantee, and provide file security browse, authority pipe
Reason, the ability of life cycle management, are the data security protectings of current comparative maturity based on the data encrypting and deciphering technology of PKI systems
Solution, and it is widely used in data security arts, cryptological technique is incorporated in data message, that is for data message
Safety Industry will be a qualitative leap.
Fig. 3 illustrates the overall framework figure of the present invention, and the equipment that whole system framework is specifically included has:
Safe SDK:Under PKI systems, a development platform that can carry out certificate operation supports hardware accreditation card
A series of book, there is provided components with regard to safety such as terminal encryption, channel management, credential key, authentication, it is ensured that data message
And the safety of authentication;A series of terminal mastering components such as equipment control, traffic monitoring, screen locking control are provided, it is right to realize
Terminal unit carries out unifying management and control;MOB system support components include encrypting SQLite3, system configuration(XML/Plist), Key cards
Adapter is driven, and quick development interface is provided for upper layer application;SDK in this patent provides emphatically authentication interface and data
The interfaces such as information security, call for upper layer application.
Master server:Support that Ldap servers are synchronous with the account of AD domain servers, server interacts bag with safe SDK's
Include:User authentication, policy distribution, log audit;
Data base:For the pagefile of sqlite3, pagefile is encrypted and decrypted, solved when inquiry number
According to whole table being decrypted or by the inquiry mode of part field decryption with updating the data, operational efficiency is improved, is shielded again
The security details realized to upper strata are covered;
Mobile management control station:One UI operation interface is provided, management and control is carried out to mobile terminal behavior and user, including
User management, strategy configuration, log audit.
Fig. 4 illustrates the flow for authenticating ID figure of mobile terminal.
The authentication procedures of the mobile terminal include:
1)Mobile terminal is to server request random number;
2)Server receives request, and returns random number to mobile terminal;
3)Mobile terminal enumerates equipment;
4)Mobile terminal opens equipment;
5)Mobile terminal enumerates certificate;
6)Checking PIN code, if authentication failed terminates checking, if be proved to be successful call private key to sign random number
Name;
7)Signature result and public signature key certificate are sent to server;
8)Server authentication public key certificate effectiveness, if authentication failed, terminates checking;
9)If be proved to be successful, checking signature effectiveness, authentication failed terminate checking;
10)Signature verification success, to mobile terminal return authentication result;
11)Mobile terminal receives the result.
Above-mentioned authentication can be authenticated by way of preset key and algorithm, i.e., without public key certificate
Challenge-response mode.
Embodiment 1
The safety communicating method between a kind of mobile terminal is provided in embodiment 1.
As shown in figure 5, which show the process of mobile terminal ciphered data information of the present invention.Data encryption process is specifically wrapped
Include following steps:Mobile terminal upper level applications call safe SDK encryption datas, incoming user information and data message
Afterwards, safe SDK is by the public key according to user information searching to user(If locally do not existed, make to server request
The public key of user), then in locally generated symmetric key, data are encrypted using symmetric key, with the public key of user
Symmetric key is encrypted, the data of the symmetric key of encryption and encryption digital envelope is assembled into into, finally by digital envelope
Return to mobile terminal upper level applications.
As shown in fig. 6, which show the process that mobile terminal receives simultaneously ciphertext data information.Data receiver decrypting process bag
Include:Mobile terminal upper level applications call safe SDK ciphertext datas, by ciphertext data incoming safe SDK, safe SDK parsings
Digital envelope, parses active user's ciphertext symmetric key and ciphertext data, and it is right to be decrypted using current user credentials device private
Claim key, using plaintext symmetric key decryption ciphertext data, the clear data of decryption is delivered to into the safety applications of mobile terminal
Program.
Embodiment 2
The secure e-mail communication means between a kind of mobile terminal is provided in embodiment 2.
Shown in institute Fig. 7, the overall framework figure that mobile terminal sends safely mail by SDK is which show.
Which includes mail server, Mail Clients, safety management platform and data base, and wherein mail server realizes postal
The transmitting-receiving of part, client can both be fixed pc client, or mobile andriod/IOS clients, in client
Basic SDK is integrated with, the authentication of mail and the function of data encryption/decryption is realized, data is obtained by network communication
The KEY of encryption, client realize authentication by communicating with safety management platform, the acquisition of strategy and encrypted public key, safety
Management platform includes that safety service processes serviced component and WEB service component, and which includes authentication component, certificate pipe again respectively
Reason component, policy management component, log audit component and front-end control platform, subscriber information management component, safety management platform
Data are obtained to related database communication, data base is similar with the database function in accompanying drawing 3.
As shown in figure 8, which show the process that mobile terminal encryption sends mail, the email encryption process includes following step
Suddenly:
1)Secure e-mail application program for mobile terminal starts to send mail;
2)Secure e-mail application program for mobile terminal calls SDK ciphering signature interfaces, the E-MAIL of incoming plaintext, mail to connect
Receipts person's list;
3)Safe SDK obtains addressee's public key according to e-mail recipient's list, if local no addressee's public key, to
Mail security management platform asks addressee's public key;
4)The effectiveness of checking addressee's public key;
5)After being verified, mail is signed with the private key of sender;
6)Symmetric key privacy enhanced mail are generated using sender's certifying device;
7)With addressee's public key and urgent key encrypted symmetric key and and ciphertext mail be packaged into digital envelope, be assembled into
Secure e-mail E-MAIL;
8)Secure e-mail E-MAIL is returned to into secure e-mail application program for mobile terminal;
9)Secure e-mail application program for mobile terminal receives secure e-mail E-MAIL, and the E-MAIL of ciphertext is sent to mail
Server;
10)Mail server receives secure e-mail E-MAIL.
As shown in figure 9, which show the process of secure e-mail mobile terminal receiving and deciphering mail, the process includes following step
Suddenly:
1)The request of secure e-mail application program for mobile terminal receives mail;
2)Mail security management platform sends mail to secure e-mail application program for mobile terminal;
3)Secure e-mail application program for mobile terminal receives safe ciphertext mail;
4)Secure e-mail mobile terminal calls SDK to be decrypted, SDK parsing mail E-MAIL, parses digital envelope;
5)SDK calls addressee's private key decrypted symmetric key, using symmetric key decryption ciphertext mail;
6)Sender's public key certificate is searched in local cache;
7)If do not found in local cache, to email server requests sender's public key certificate;
8)Checking sender's public key certificate effectiveness;
9)After being verified, mail signature is verified;
10)Mail is returned in plain text and sign test result to secure e-mail application program for mobile terminal;
11)Check mail.
Above-mentioned mobile terminal(Secure e-mail mobile terminal)Can be mobile phone, PDA, the various intelligent mobile ends such as removable computer
End equipment.
By embodiments of the invention, after third-party application calls this SDK, the phase of data information security can be avoided substantially
Pass problem, leaks including authentication, data, apparatus management/control etc..Because the certificate in the identity and hardware device of user is phase
Mutually bind.If not having this hardware device, related people cannot check ciphered data information.Even if data message is in transmission
In monitored intercepting, but listener also has no idea to be decrypted data message so as to which the data for obtaining are not without in all senses.
Presently preferred embodiments of the present invention is the foregoing is only, protection scope of the present invention is not intended to limit.It is all
Within the spirit and principles in the present invention, any modification, equivalent and improvement for being made etc. all should protect the guarantor in the present invention
Within the scope of shield.