CN104363584A - Method, device and terminal for encrypting and decrypting short message - Google Patents

Method, device and terminal for encrypting and decrypting short message Download PDF

Info

Publication number
CN104363584A
CN104363584A CN201410698970.3A CN201410698970A CN104363584A CN 104363584 A CN104363584 A CN 104363584A CN 201410698970 A CN201410698970 A CN 201410698970A CN 104363584 A CN104363584 A CN 104363584A
Authority
CN
China
Prior art keywords
short message
side terminal
password
character
receiving side
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.)
Granted
Application number
CN201410698970.3A
Other languages
Chinese (zh)
Other versions
CN104363584B (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.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen 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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201410698970.3A priority Critical patent/CN104363584B/en
Publication of CN104363584A publication Critical patent/CN104363584A/en
Application granted granted Critical
Publication of CN104363584B publication Critical patent/CN104363584B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]

Abstract

The embodiment of the invention discloses a method, device and terminal for encrypting and decrypting a short message and relates to the technical field of mobile terminals. By the adoption of the method, device and terminal for encrypting and decrypting the short message, the time spent on encryption and decryption of the short message can be shortened. The method for encrypting the short message comprises the steps of obtaining a first number and a second number, generating target codes by utilizing the first number and the second number, and carrying out encryption on the short message to be sent by utilizing the target codes. The method for decrypting the short message comprises the steps of obtaining a first number and a second number, generating target codes by utilizing the first number and the second number, carrying out decryption on the received short message by utilizing the target codes, and obtaining the decrypted short message. The method, device and terminal for encrypting and decrypting the short message are suitable for the scenes that a sending terminal carries out encryption on the short message and a receiving terminal carries out decryption on the short message.

Description

A kind of method of short message Encrypt and Decrypt, device and terminal
Technical field
The present invention relates to technical field of mobile terminals, particularly relate to a kind of method of short message Encrypt and Decrypt, device and terminal.
Background technology
Along with the development of electronic information technology, increasing terminal uses short message transmission of information between the terminals, but in the transmittance process of short message, short message may be intercepted and captured by hacker, thus causes the information leakage in short message, produces potential safety hazard.
In order to prevent the information leakage in short message, in prior art, sending side terminal uses public-key and to be encrypted short message, and the short message after encryption is sent to receiving side terminal, receiving side terminal utilizes the private key corresponding with PKI, is decrypted, obtains short message to the short message after encryption.
Because the PKI of sending side terminal and the private key of recipient exist corresponding relation, so after sending side terminal utilizes PKI to short message encryption, need to hold consultation with receiving side terminal, receiving side terminal is made to learn the PKI that sending side terminal encryption uses, thus make recipient use the short message of the private key pair encryption corresponding with this PKI to be decrypted, ensureing can normal transmission short message between sending side terminal and receiving side terminal.When each sending side terminal and receiving side terminal transmit short message, sending side terminal all needs to consult with receiving side terminal to encrypt the PKI that uses and deciphers the private key corresponding with this PKI used.In the process to short message encryption and deciphering, the consultation meeting cost plenty of time between sending side terminal and receiving side terminal, add the time to short message encryption and deciphering process took.
Summary of the invention
Embodiments of the invention provide a kind of method of short message Encrypt and Decrypt, device and terminal, can reduce the time to the process took that short message encrypts and decrypts.
For achieving the above object, embodiments of the invention adopt following technical scheme:
First aspect, the embodiment of the present invention provides a kind of method of short message encryption, comprising:
Obtain the first number and the second number, described first number is the telephone number of sending side terminal, and described second number is the telephone number of receiving side terminal;
Utilize described first number and described second number, generate target password;
Utilize described target password, treating sends SMS message is encrypted.
Second aspect, a kind of method that the embodiment of the present invention provides short message to decipher, comprising:
Obtain the first number and the second number, described first number is the telephone number of sending side terminal, and described second number is the telephone number of receiving side terminal;
Utilize described first number and described second number, generate target password;
Utilize described target password, the short message received is decrypted, and obtain the short message after deciphering.
The third aspect, the embodiment of the present invention provides a kind of device of short message encryption, comprising:
First acquisition module, for obtaining the first number and the second number, described first number is the telephone number of sending side terminal, and described second number is the telephone number of receiving side terminal;
First generation module, for utilizing described first number and described second number, generates target password;
Encrypting module, for utilizing described target password, treating sends SMS message is encrypted.
Fourth aspect, the device that the embodiment of the present invention provides a kind of short message to decipher, comprising:
Second acquisition module, for obtaining the first number and the second number, described first number is the telephone number of sending side terminal, and described second number is the telephone number of receiving side terminal;
Second generation module, for utilizing described first number and described second number, generates target password;
Deciphering module, for utilizing described target password, is decrypted the short message received, and obtains the short message after deciphering.
5th aspect, the embodiment of the present invention provides a kind of terminal, and described terminal comprises the device of the short message encryption that such scheme provides.
6th aspect, the embodiment of the present invention provides a kind of terminal, and described terminal comprises the device of the short message deciphering that such scheme provides.
The method of a kind of short message Encrypt and Decrypt that the embodiment of the present invention provides, device and terminal, sending side terminal can according to the telephone number of the telephone number of sending side terminal and receiving side terminal, generate target password, target password is utilized to be encrypted short message, receiving side terminal adopts the method identical with sending side terminal, generate target password, utilize target password to be decrypted short message.Public key encryption is utilized with transmitting side terminal, compared with the prior art that receiving side terminal utilizes the private key corresponding with PKI to decipher, the embodiment of the present invention utilizes the telephone number of sending side terminal and the telephone number of receiving side terminal, be generated as the target password of short message encryption, because the telephone number of the telephone number of sending side terminal and receiving side terminal is the local information of sending side terminal and receiving side terminal, sending side terminal and receiving side terminal is not needed to dicide after discussion, thus eliminate the time that sending side terminal and receiving side terminal consult to spend, decrease the time to the process took that short message encrypts and decrypts.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, be briefly described to the accompanying drawing used required in embodiment below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The flow chart of the method for a kind of short message encryption that Fig. 1 provides for the embodiment of the present invention;
The flow chart of a kind of specific implementation of the method for a kind of short message encryption that Fig. 2 provides for the embodiment of the present invention;
What the numeral in the first number chosen that Fig. 2 a, Fig. 2 b provide for the embodiment of the present invention and the second number carried out combining illustrates schematic diagram;
The explanation schematic diagram of the vigenere cipher table that Fig. 2 c provides for the embodiment of the present invention;
The flow chart of the another kind of specific implementation of the method for a kind of short message encryption that Fig. 3 provides for the embodiment of the present invention;
The flow chart of the method for a kind of short message deciphering that Fig. 4 provides for the embodiment of the present invention;
The flow chart of a kind of specific implementation of the method for a kind of short message deciphering that Fig. 5 provides for the embodiment of the present invention;
The flow chart of the another kind of specific implementation of the method for a kind of short message deciphering that Fig. 6 provides for the embodiment of the present invention;
The structural representation of the device of a kind of short message encryption that Fig. 7 provides for the embodiment of the present invention;
The structural representation of the device of a kind of short message deciphering that Fig. 8 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making other embodiments all obtained under creative work prerequisite, belong to the scope of protection of the invention.
The technical scheme that the embodiment of the present invention provides, be applied to sending side terminal and receiving side terminal carries out in the scene of Encrypt and Decrypt to short message, sending side terminal and receiving side terminal can be mobile phones, also can be to be provided with the computer of transmitting-receiving note software or panel computer etc.Sending side terminal is encrypted to sent short message, and is sent to receiving side terminal by the short message after encryption, and receiving side terminal receives the short message of encryption, and is decrypted the short message of encryption, thus obtains short message.
Embodiments provide a kind of method of short message encryption, be applied to sending side terminal, as shown in Figure 1, comprising:
101, obtain the first number and the second number.
Wherein, the first number is the telephone number of sending side terminal, and the second number is the telephone number of receiving side terminal.The telephone number of the telephone number of sending side terminal acquisition itself and receiving side terminal corresponding to short message, the figure place of telephone number does not limit at this.
Wherein, sending side terminal after completing editor's short message, can receive the selection instruction of user, determines whether to sent short message encryption.
102, utilize described first number and described second number, generate target password.
Wherein, sending side terminal utilizes the telephone number of sending side terminal and receiving side terminal, by choosing, combining, utilize mapping relations substitute character to the numeral in telephone number and by technological means such as various cipher table, generate for treating the target password sending SMS message and be encrypted.
It should be noted that, the target password used when the target password obtained when sending side terminal is encrypted short message is decrypted short message with receiving side terminal is identical, and namely sending side terminal generation target password is identical with the method that receiving side terminal generates target password.
103, utilize described target password, treating sends SMS message is encrypted.
Wherein, utilize the target password generated in 102, treating sends SMS message is encrypted.
The method of a kind of short message encryption that the embodiment of the present invention provides, according to the telephone number of the telephone number of sending side terminal and receiving side terminal, can generate target password, utilizes target password to be encrypted short message.Public key encryption is utilized with transmitting side terminal, compared with the prior art that receiving side terminal utilizes the private key corresponding with PKI to decipher, the embodiment of the present invention utilizes the telephone number of sending side terminal and the telephone number of receiving side terminal, be generated as the target password of short message encryption, because the telephone number of the telephone number of sending side terminal and receiving side terminal is the local information of sending side terminal and receiving side terminal, sending side terminal and receiving side terminal is not needed to dicide after discussion, thus eliminate the time that sending side terminal and receiving side terminal consult to spend, decrease the time to the process took that short message encrypts and decrypts.
Further, in order to ensure the safety of the short message encrypted further, the embodiment of the present invention additionally provides a kind of concrete scheme of method of short message encryption, and target password comprises M character; The further refinement of the implementation of this programme to 102 in the scheme shown in Fig. 1,102 can be implemented as 1021-1024, as shown in Figure 2, comprising:
1021, choose M1 numeral in described first number and M2 numeral in described second number.
Wherein, target password comprises M character, and M is integer.In the first number, choose M1 numeral, and in the second number, choose M2 numeral, make M1+M2=M, and M1, M2 are integer.Choose in the process of the numeral in the first number and the second number at sending side terminal, concrete, avoid choosing in the first number and the second number the numeral with comparatively strong regularity, such as phone number first bit digital is mostly identical, be 1, can avoid choosing such numeral.When the first number and the second number are the cell-phone number of 11, it is 128 bits that target password requires, i.e. long 16 bytes of target password, when alternatively target password comprises 16 characters, because the first bit digital of most of phone number is 1, second-order digit is 3,5 or 8, so when selecting numeral in the first number and the second number, first get rid of the first bit digital and the second-order digit of the first number and the second number, 8 numerals can be chosen again from remaining 9 numerals of the first number, from remaining 9 numerals of the second number, choose 8 numerals.Such as: the first number is the 13316881857, second number is 18612345678, cast out the first bit digital 1 in the first number and second-order digit 3, the 6th bit digital 8 can also be cast out; Simultaneously, cast out the first bit digital 1 in the second number and second-order digit 3, the 6th bit digital 3 can also be cast out, choose remaining 8 numerals 6,1,2,4,5,6,7,8 of the first number remaining 8 numerals 3,1,6,8,1,8,5,7 and second number.
It should be noted that M1 numeral of the first number that receiving side terminal is chosen and M2 numeral of the second number are identical with M1 numeral of the first number that sending side terminal is chosen and M2 numeral of the second number.
1022, by M1 numeral in described first number chosen and M2 combination of numbers in described second number, obtain ground floor password.
Wherein, M2 numeral in M1 in first number numeral and the second number can directly arrange by sending side terminal in order, be combined into ground floor password, such as: as shown in Figure 2 a, 8 numerals 6,1,2,4,5,6,7,8 chosen in 8 numerals 3,1,6,8,1,8,5,7 and second number chosen in first number, arrange by original order, composition ground floor password 3168185761245678.Sending side terminal also can M1 numeral in impassioned first number and M2 numeral in the second number be upset sequentially, composition ground floor password, such as: as shown in Figure 2 b, 8 numerals 6,1,2,4,5,6,7,8 chosen in 8 numerals 3,1,6,8,1,8,5,7 and second number chosen in first number, by adjacent every two digital position exchanges, composition ground floor password 1386817516426587.
It should be noted that, receiving side terminal is by the method for M2 combination of numbers of the M1 of the first number numeral and the second number, and the method for M2 combination of numbers of and second number digital by the M1 of the first number with sending side terminal is identical.
1023, according to described ground floor password and the shared mapping relations being stored in described sending side terminal, obtain second layer password.
Wherein, second layer password is made up of mapping character, mapping character is specifically as follows the character such as English character, Latin character, and shared mapping relations comprise the mapping relations of numeral in the first number and mapping character, and the mapping relations of numeral in the second number and mapping character.Sending side terminal can choose 10 English characters in 26 English characters and digital 0-9 forms mapping relations, and namely sharing mapping relations can for the mapping relations between 10 English characters choosing and digital 0-9.Such as: as shown in Table 1, if ground floor password is 3168185761245678, sending side terminal utilizes shared mapping relations as shown in Table 1 to shared mapping relations, can obtain second layer password FQMTQTSWMQHLSMWT.
Table one
Numeral 0 1 2 3 4 5 6 7 8 9
English character C Q H F L S M W T Z
It should be noted that, receiving side terminal stores the shared mapping relations identical with sending side terminal.
1024, according to described second layer password, the shared secret table being stored in described sending side terminal, and the shared key preset, obtain described target password.
Wherein, according to the mapping character in second layer password, default shared key, and the shared secret table being stored in sending side terminal, obtain target password.Shared secret table comprises the corresponding relation of the character in the combination of the character in mapping character and shared key and target password, and shared secret table can be vigenere cipher table or the polyalphabetic cipher table similar with vigenere cipher table.The shared key utilizing second layer password and preset, can find the code characters corresponding with the combination of the character in mapping character and shared key, thus obtain target password in shared secret table.Such as, shared secret table is vigenere cipher table as shown in Figure 2 c, first behavior mapping character, first is classified as the character in shared key, other parts in vigenere cipher table are the character that may occur in target password, in vigenere cipher table, intersect the character of gained according to the character in mapping character and shared key, can target password be obtained.Such as: second layer password is FQMTQTSWMQHLSMWT, the shared key preset is RELATIONS, character in the target password that mapping character F is corresponding with the combination of the character R in shared key is W, character in the target password that mapping character Q is corresponding with the combination of the character E in shared key is U, by that analogy, the corresponding relation of available second layer password, shared key and target password is as shown in Table 2:
Table two
Second layer password F Q M T Q T S W M Q H L S M W T
Shared key R E L A T I O N S R E L A T I O
Target password W U X T J B G J E H L W S F E H
So the target password obtained is WUXTJBGJEHLWSFEH.
It should be noted that, receiving side terminal stores the shared secret table identical with sending side terminal, and the shared key preset identical with sending side terminal.
The method of a kind of short message encryption that the embodiment of the present invention provides, according to the telephone number of the telephone number of sending side terminal and receiving side terminal, can generate target password, utilizes target password to be encrypted short message.Public key encryption is utilized with transmitting side terminal, compared with the prior art that receiving side terminal utilizes the private key corresponding with PKI to decipher, the embodiment of the present invention utilizes the telephone number of sending side terminal and the telephone number of receiving side terminal, be generated as the target password of short message encryption, because the telephone number of the telephone number of sending side terminal and receiving side terminal is the local information of sending side terminal and receiving side terminal, sending side terminal and receiving side terminal is not needed to dicide after discussion, thus eliminate the time that sending side terminal and receiving side terminal consult to spend, decrease the time to the process took that short message encrypts and decrypts.Concrete, ground floor password is generated according to the first number and the second number, again ground floor password is converted into second layer password, finally utilize cipher table that second layer password is converted into target password, the table that accesses to your password effectively can resist word frequency statistic, improve the difficulty of decryption, further increase the fail safe of password.
In addition, in order to show short message be encryption short message, the embodiment of the present invention additionally provides a kind of concrete scheme of method of short message encryption, this programme in the scheme shown in Fig. 1 103 after, add 105-106, as shown in Figure 3, comprising:
105, the short message to be sent of described encryption is made a summary, obtains clip Text.
Wherein, sending side terminal can carry out MD5 (Message-Digest Algorithm5, Message Digest Algorithm 5) Hash digest to the short message of encryption, obtains clip Text; Or sending side terminal can also carry out HMAC (Hash-based Message Authentication Code, Hash operation message authentication code) summary to the short message after encryption, obtain clip Text.Clip Text is the mark of the note after encryption as this note by sending side terminal and receiving side terminal.
106, described clip Text is added in the short message to be sent of described encryption.
Wherein, clip Text adds in the short message to be sent of encryption by sending side terminal, concrete, clip Text can be filled into the afterbody of the short message to be sent of encryption, in follow-up process of transmitting, the short message to be sent that with the addition of the encryption of clip Text is sent to receiving side terminal.
The method of a kind of short message encryption that the embodiment of the present invention provides, according to the telephone number of the telephone number of sending side terminal and receiving side terminal, can generate target password, utilizes target password to be encrypted short message.Public key encryption is utilized with transmitting side terminal, compared with the prior art that receiving side terminal utilizes the private key corresponding with PKI to decipher, the embodiment of the present invention utilizes the telephone number of sending side terminal and the telephone number of receiving side terminal, be generated as the target password of short message encryption, because the telephone number of the telephone number of sending side terminal and receiving side terminal is the local information of sending side terminal and receiving side terminal, sending side terminal and receiving side terminal is not needed to dicide after discussion, thus eliminate the time that sending side terminal and receiving side terminal consult to spend, decrease the time to the process took that short message encrypts and decrypts.And add clip Text in the short message to be sent of encryption, identify the short message that this short message is encryption, whether receiving side terminal can have clip Text according to the short message received, and judges whether to need the short message to receiving to be decrypted.
Embodiments provide the method for a kind of short message deciphering, be applied to receiving side terminal, as shown in Figure 4, comprise:
201, obtain the first number and the second number.
Wherein, the first number is the telephone number of sending side terminal, and the second number is the telephone number of receiving side terminal.The telephone number of the telephone number of receiving side terminal acquisition itself and sending side terminal corresponding to short message, the figure place of telephone number does not limit at this.
202, utilize described first number and described second number, generate target password.
Wherein, receiving side terminal utilizes the telephone number of sending side terminal and receiving side terminal, by choosing, combining, utilize mapping relations substitute character to the numeral in telephone number and by technological means such as various cipher table, generate the target password being used for being decrypted the short message received.
203, utilize described target password, the short message received is decrypted, and obtain the short message after deciphering.
Wherein, receiving side terminal utilizes the target password generated in 202, is decrypted the short message received, and obtains the short message after deciphering.
The method of a kind of short message deciphering that the embodiment of the present invention provides, according to the telephone number of the telephone number of sending side terminal and receiving side terminal, can generate target password, utilizes the short message of target password to encryption to be decrypted.Public key encryption is utilized with transmitting side terminal, compared with the prior art that receiving side terminal utilizes the private key corresponding with PKI to decipher, the embodiment of the present invention utilizes the telephone number of sending side terminal and the telephone number of receiving side terminal, generate the target password of the short message deciphering be used for encryption, because the telephone number of the telephone number of sending side terminal and receiving side terminal is the local information of sending side terminal and receiving side terminal, sending side terminal and receiving side terminal is not needed to dicide after discussion, thus eliminate the time that sending side terminal and receiving side terminal consult to spend, decrease the time to the process took that short message encrypts and decrypts.
Further, in order to ensure the safety be decrypted the short message of encryption further, the embodiment of the present invention additionally provides the concrete scheme of the method for a kind of short message deciphering, and target password comprises M character; The further refinement of the implementation of this programme to 202 in the scheme shown in Fig. 4,202 can be implemented as 2021-2024, as shown in Figure 5, comprising:
2021, choose M1 numeral in described first number and M2 numeral in described second number.
Wherein, M1+M2=M, described M1, M2, M are integer.Receiving side terminal choose in the first number and the second number numeral particular content see 1021 in particular content, do not repeat them here.
It should be noted that M1 numeral of the first number that receiving side terminal is chosen and M2 numeral of the second number are identical with M1 numeral of the first number that sending side terminal is chosen and M2 numeral of the second number.
2022, by M1 numeral in described first number chosen and M2 combination of numbers in described second number, obtain ground floor password.
Wherein, the method that receiving side terminal obtains ground floor password, see the particular content in 1022, does not repeat them here.
It should be noted that, receiving side terminal is by the method for M2 combination of numbers of the M1 of the first number numeral and the second number, and the method for M2 combination of numbers of and second number digital by the M1 of the first number with sending side terminal is identical.
2023, according to described ground floor password and the shared mapping relations being stored in described receiving side terminal, obtain second layer password.
Wherein, second layer password is made up of mapping character, and shared mapping relations comprise the mapping relations of numeral in the first number and mapping character, and the mapping relations of numeral in the second number and mapping character.The method that receiving side terminal obtains second layer password, see the particular content in 1023, does not repeat them here.
It should be noted that, the shared mapping relations that receiving side terminal stores are identical with the shared mapping relations that sending side terminal stores.
2024, according to described second layer password, the shared secret table being stored in described receiving side terminal, and the shared key preset, obtain described target password.
Wherein, shared secret table comprises the corresponding relation of the character in the combination of the character in mapping character and shared key and target password.Receiving side terminal obtains order calibration method see the particular content in 1024, does not repeat them here.
It should be noted that, the shared secret table that receiving side terminal stores is identical with the shared secret table that sending side terminal stores, and the shared key that receiving side terminal is preset is identical with the shared key that sending side terminal is preset.
The method of a kind of short message deciphering that the embodiment of the present invention provides, according to the telephone number of the telephone number of sending side terminal and receiving side terminal, can generate target password, utilizes the short message of target password to encryption to be decrypted.Public key encryption is utilized with transmitting side terminal, compared with the prior art that receiving side terminal utilizes the private key corresponding with PKI to decipher, the embodiment of the present invention utilizes the telephone number of sending side terminal and the telephone number of receiving side terminal, generate the target password of the short message deciphering be used for encryption, because the telephone number of the telephone number of sending side terminal and receiving side terminal is the local information of sending side terminal and receiving side terminal, sending side terminal and receiving side terminal is not needed to dicide after discussion, thus eliminate the time that sending side terminal and receiving side terminal consult to spend, decrease the time to the process took that short message encrypts and decrypts.Concrete, ground floor password is generated according to the first number and the second number, again ground floor password is converted into second layer password, finally utilize cipher table that second layer password is converted into target password, the table that accesses to your password effectively can resist word frequency statistic, improves the difficulty of decryption, further increases the fail safe of password, make in decrypting process, receiving side terminal can be decrypted the short message of sending side terminal encryption accurately.
In addition, in order to determine whether the short message received is the short message encrypted, the embodiment of the present invention additionally provides the concrete scheme of the method for a kind of short message deciphering, this programme added and judges that whether this short message is the step of the short message of encryption before being decrypted the reception short message received, as shown in Figure 6, comprising:
301, detect the short message received and whether comprise clip Text.
Wherein, clip Text indicate the short message received be encryption after short message.Clip Text can add the afterbody of the short message of reception to, concrete, and whether the afterbody that receiving side terminal can detect the short message of reception has clip Text.
302, if described reception short message comprises clip Text, then obtain the first number and the second number.
Wherein, if the short message received comprises clip Text, represent that the short message of this reception is the short message of encryption, need to be decrypted, just can obtain the short message that can read.
If do not comprise clip Text in the short message received, then represent that the short message of this reception is the short message do not encrypted, do not need to be decrypted, the short message of this reception can be opened according to the mode opening normal short message, and read.
303, utilize described first number and described second number, generate target password.
304, utilize described target password, the short message received is decrypted, and obtain the short message after deciphering.
Wherein, the particular content of 302-304, see the content in 201-203, does not repeat them here.
The method of a kind of short message deciphering that the embodiment of the present invention provides, according to the telephone number of the telephone number of sending side terminal and receiving side terminal, can generate target password, utilizes the short message of target password to encryption to be decrypted.Public key encryption is utilized with transmitting side terminal, compared with the prior art that receiving side terminal utilizes the private key corresponding with PKI to decipher, the embodiment of the present invention utilizes the telephone number of sending side terminal and the telephone number of receiving side terminal, generate the target password of the short message deciphering be used for encryption, because the telephone number of the telephone number of sending side terminal and receiving side terminal is the local information of sending side terminal and receiving side terminal, sending side terminal and receiving side terminal is not needed to dicide after discussion, thus eliminate the time that sending side terminal and receiving side terminal consult to spend, decrease the time to the process took that short message encrypts and decrypts.And, receiving side terminal can according to receive short message whether have clip Text, judge whether need to receive short message be decrypted, thus receive short message and in unencrypted situation, this short message is not decrypted, avoids wasting the resource shared by deciphering.
Embodiments provide a kind of device 400 of short message encryption, as shown in Figure 7, comprising:
First acquisition module 401, for obtaining the first number and the second number.
Wherein, the first number is the telephone number of sending side terminal, and the second number is the telephone number of receiving side terminal.
First generation module 402, for utilizing described first number and described second number, generates target password.
Encrypting module 403, for utilizing described target password, treating sends SMS message is encrypted.
Concrete, the first generation module 402, also for choosing M1 numeral in described first number and M2 numeral in described second number, wherein, target password comprises M character, M1+M2=M, and described M1, M2, M are integer; By M1 numeral in described first number chosen and M2 combination of numbers in described second number, obtain ground floor password; According to described ground floor password and the shared mapping relations being stored in described sending side terminal, obtain second layer password, described second layer password is made up of mapping character, described shared mapping relations comprise the mapping relations of numeral in described first number and described mapping character, and the mapping relations of numeral in described second number and described mapping character; According to described second layer password, the shared secret table being stored in described sending side terminal, and the shared key preset, obtain described target password, described shared secret table comprises the corresponding relation of the character in the combination of the character in described mapping character and described shared key and described target password.
In addition, encrypting module 403, also for making a summary to the short message to be sent of described encryption, obtains clip Text; Described clip Text is added in the short message to be sent of described encryption.
The device of a kind of short message encryption that the embodiment of the present invention provides, according to the telephone number of the telephone number of sending side terminal and receiving side terminal, can generate target password, utilizes target password to be encrypted short message.Public key encryption is utilized with transmitting side terminal, compared with the prior art that receiving side terminal utilizes the private key corresponding with PKI to decipher, the embodiment of the present invention utilizes the telephone number of sending side terminal and the telephone number of receiving side terminal, be generated as the target password of short message encryption, because the telephone number of the telephone number of sending side terminal and receiving side terminal is the local information of sending side terminal and receiving side terminal, sending side terminal and receiving side terminal is not needed to dicide after discussion, thus eliminate the time that sending side terminal and receiving side terminal consult to spend, decrease the time to the process took that short message encrypts and decrypts.Concrete, ground floor password is generated according to the first number and the second number, again ground floor password is converted into second layer password, finally utilize cipher table that second layer password is converted into target password, the table that accesses to your password effectively can resist word frequency statistic, improve the difficulty of decryption, further increase the fail safe of password.And add clip Text in the short message to be sent of encryption, identify the short message that this short message is encryption, whether receiving side terminal can have clip Text according to the short message received, and judges whether to need the short message to receiving to be decrypted.
Embodiments provide the device 500 of a kind of short message deciphering, as shown in Figure 8, comprising:
Second acquisition module 501, for obtaining the first number and the second number.
Wherein, the first number is the telephone number of sending side terminal, and the second number is the telephone number of receiving side terminal.
Second generation module 502, for utilizing described first number and described second number, generates target password.
Deciphering module 503, for utilizing described target password, is decrypted the short message received, and obtains the short message after deciphering.
Concrete, the second generation module 502, also for choosing M1 numeral in described first number and M2 numeral in described second number, wherein, M1+M2=M, described M1, M2, M are integer; By M1 numeral in described first number chosen and M2 combination of numbers in described second number, obtain ground floor password; According to described ground floor password and the shared mapping relations being stored in described receiving side terminal, obtain second layer password, described second layer password is made up of mapping character, described shared mapping relations comprise the mapping relations of numeral in described first number and described mapping character, and the mapping relations of numeral in described second number and described mapping character; According to described second layer password, the shared secret table being stored in described receiving side terminal, and the shared key preset, obtain described target password, described shared secret table comprises the corresponding relation of the character in the combination of the character in described mapping character and described shared key and described target password.
In addition, whether deciphering module 503, also comprise clip Text for detecting the short message received, described clip Text indicate the short message received be encryption after short message; When the short message received comprises clip Text, flow process is decrypted to the short message received.
The device of a kind of short message deciphering that the embodiment of the present invention provides, according to the telephone number of the telephone number of sending side terminal and receiving side terminal, can generate target password, utilizes the short message of target password to encryption to be decrypted.Public key encryption is utilized with transmitting side terminal, compared with the prior art that receiving side terminal utilizes the private key corresponding with PKI to decipher, the embodiment of the present invention utilizes the telephone number of sending side terminal and the telephone number of receiving side terminal, generate the target password of the short message deciphering be used for encryption, because the telephone number of the telephone number of sending side terminal and receiving side terminal is the local information of sending side terminal and receiving side terminal, sending side terminal and receiving side terminal is not needed to dicide after discussion, thus eliminate the time that sending side terminal and receiving side terminal consult to spend, decrease the time to the process took that short message encrypts and decrypts.Concrete, ground floor password is generated according to the first number and the second number, again ground floor password is converted into second layer password, finally utilize cipher table that second layer password is converted into target password, the table that accesses to your password effectively can resist word frequency statistic, improves the difficulty of decryption, further increases the fail safe of password, make in decrypting process, receiving side terminal can be decrypted the short message of sending side terminal encryption accurately.And, receiving side terminal can according to receive short message whether have clip Text, judge whether need to receive short message be decrypted, thus receive short message and in unencrypted situation, this short message is not decrypted, avoids wasting the resource shared by deciphering.
The embodiment of the present invention additionally provides a kind of terminal, and described terminal comprises the device 400 of the short message encryption that the embodiment of the present invention provides, and particular content, see above-described embodiment, does not repeat them here.
The embodiment of the present invention additionally provides a kind of terminal, and described terminal comprises the device 500 of the short message deciphering that the embodiment of the present invention provides, and particular content, see above-described embodiment, does not repeat them here.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.Especially, for apparatus embodiments, because it is substantially similar to embodiment of the method, so describe fairly simple, relevant part illustrates see the part of embodiment of the method.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; the change that can expect easily or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.

Claims (10)

1. a method for short message encryption, is characterized in that, comprising:
Obtain the first number and the second number, described first number is the telephone number of sending side terminal, and described second number is the telephone number of receiving side terminal;
Utilize described first number and described second number, generate target password;
Utilize described target password, treating sends SMS message is encrypted.
2. method according to claim 1, is characterized in that, described target password comprises M character; Describedly utilize described first number and described second number, generate target password, comprising:
Choose M1 numeral in described first number and M2 numeral in described second number, wherein, M1+M2=M, described M1, M2, M are integer;
By M1 numeral in described first number chosen and M2 combination of numbers in described second number, obtain ground floor password;
According to described ground floor password and the shared mapping relations being stored in described sending side terminal, obtain second layer password, described second layer password is made up of mapping character, described shared mapping relations comprise the mapping relations of numeral in described first number and described mapping character, and the mapping relations of numeral in described second number and described mapping character;
According to described second layer password, the shared secret table being stored in described sending side terminal, and the shared key preset, obtain described target password, described shared secret table comprises the corresponding relation of the character in the combination of the character in described mapping character and described shared key and described target password.
3. method according to claim 1, is characterized in that, utilizes described target password described, treating sends SMS message be encrypted after, also comprise:
The short message to be sent of described encryption is made a summary, obtains clip Text;
Described clip Text is added in the short message to be sent of described encryption.
4. a method for short message deciphering, is characterized in that, comprising:
Obtain the first number and the second number, described first number is the telephone number of sending side terminal, and described second number is the telephone number of receiving side terminal;
Utilize described first number and described second number, generate target password;
Utilize described target password, the short message received is decrypted, and obtain the short message after deciphering.
5. method according to claim 4, is characterized in that, described target password comprises M character; Describedly utilize described first Identity Code and the second Identity Code, generate target password, comprising:
Choose M1 numeral in described first number and M2 numeral in described second number, wherein, M1+M2=M, described M1, M2, M are integer;
By M1 numeral in described first number chosen and M2 combination of numbers in described second number, obtain ground floor password;
According to described ground floor password and the shared mapping relations being stored in described receiving side terminal, obtain second layer password, described second layer password is made up of mapping character, described shared mapping relations comprise the mapping relations of numeral in described first number and described mapping character, and the mapping relations of numeral in described second number and described mapping character;
According to described second layer password, the shared secret table being stored in described receiving side terminal, and the shared key preset, obtain described target password, described shared secret table comprises the corresponding relation of the character in the combination of the character in described mapping character and described shared key and described target password.
6. method according to claim 5, is characterized in that, before described acquisition first number and the second number, also comprises:
Detect the short message that receives and whether comprise clip Text, described clip Text indicate the short message received to be short message after encrypting;
If the short message received comprises clip Text, then flow process is decrypted to the short message received.
7. a device for short message encryption, is characterized in that, comprising:
First acquisition module, for obtaining the first number and the second number, described first number is the telephone number of sending side terminal, and described second number is the telephone number of receiving side terminal;
First generation module, for utilizing described first number and described second number, generates target password;
Encrypting module, for utilizing described target password, treating sends SMS message is encrypted.
8. a device for short message deciphering, is characterized in that, comprising:
Second acquisition module, for obtaining the first number and the second number, described first number is the telephone number of sending side terminal, and described second number is the telephone number of receiving side terminal;
Second generation module, for utilizing described first number and described second number, generates target password;
Deciphering module, for utilizing described target password, is decrypted the short message received, and obtains the short message after deciphering.
9. a terminal, is characterized in that, described terminal comprises device according to claim 7.
10. a terminal, is characterized in that, described terminal comprises device according to claim 8.
CN201410698970.3A 2014-11-27 2014-11-27 A kind of method, apparatus and terminal of short message Encrypt and Decrypt Active CN104363584B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410698970.3A CN104363584B (en) 2014-11-27 2014-11-27 A kind of method, apparatus and terminal of short message Encrypt and Decrypt

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410698970.3A CN104363584B (en) 2014-11-27 2014-11-27 A kind of method, apparatus and terminal of short message Encrypt and Decrypt

Publications (2)

Publication Number Publication Date
CN104363584A true CN104363584A (en) 2015-02-18
CN104363584B CN104363584B (en) 2018-06-15

Family

ID=52530795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410698970.3A Active CN104363584B (en) 2014-11-27 2014-11-27 A kind of method, apparatus and terminal of short message Encrypt and Decrypt

Country Status (1)

Country Link
CN (1) CN104363584B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106535144A (en) * 2016-10-27 2017-03-22 珠海格力电器股份有限公司 Sending method for encrypted short message and terminal
CN106844288A (en) * 2015-12-07 2017-06-13 阿里巴巴集团控股有限公司 A kind of random string generation method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050232422A1 (en) * 2004-04-19 2005-10-20 Jingdong Lin GSM (Global System for Mobile communication) handset with carrier independent personal encryption
CN101626567A (en) * 2009-06-29 2010-01-13 深圳华为通信技术有限公司 Short message sending and receiving method, short message sending and receiving device and mobile terminal
CN101854594A (en) * 2009-04-03 2010-10-06 北京航空航天大学 Method and device for transmitting information and method and device for receiving information
CN102523565A (en) * 2011-11-23 2012-06-27 宇龙计算机通信科技(深圳)有限公司 Method, system and mobile communication terminal for encrypting and decrypting message data safely
CN102905238A (en) * 2012-09-11 2013-01-30 中国科学院信息工程研究所 Short message generation method, short message generation device, short message analyzing method, short message analyzing device which contain control instruction
CN103458382A (en) * 2013-05-22 2013-12-18 深圳市中易通网络技术有限公司 Hardware encryption transmission and storage method and system of mobile phone private short messages
CN103795524A (en) * 2014-01-24 2014-05-14 闻泰通讯股份有限公司 Dynamic short message encryption and decryption method based on 3DES

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050232422A1 (en) * 2004-04-19 2005-10-20 Jingdong Lin GSM (Global System for Mobile communication) handset with carrier independent personal encryption
CN101854594A (en) * 2009-04-03 2010-10-06 北京航空航天大学 Method and device for transmitting information and method and device for receiving information
CN101626567A (en) * 2009-06-29 2010-01-13 深圳华为通信技术有限公司 Short message sending and receiving method, short message sending and receiving device and mobile terminal
CN102523565A (en) * 2011-11-23 2012-06-27 宇龙计算机通信科技(深圳)有限公司 Method, system and mobile communication terminal for encrypting and decrypting message data safely
CN102905238A (en) * 2012-09-11 2013-01-30 中国科学院信息工程研究所 Short message generation method, short message generation device, short message analyzing method, short message analyzing device which contain control instruction
CN103458382A (en) * 2013-05-22 2013-12-18 深圳市中易通网络技术有限公司 Hardware encryption transmission and storage method and system of mobile phone private short messages
CN103795524A (en) * 2014-01-24 2014-05-14 闻泰通讯股份有限公司 Dynamic short message encryption and decryption method based on 3DES

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844288A (en) * 2015-12-07 2017-06-13 阿里巴巴集团控股有限公司 A kind of random string generation method and device
WO2017097159A1 (en) * 2015-12-07 2017-06-15 阿里巴巴集团控股有限公司 Method and apparatus for generating random character string
KR20180088895A (en) * 2015-12-07 2018-08-07 알리바바 그룹 홀딩 리미티드 Method and apparatus for generating random string
US20180285078A1 (en) * 2015-12-07 2018-10-04 Alibaba Group Holding Limited Method and apparatus for generating random character string
AU2016367801B2 (en) * 2015-12-07 2019-10-31 Advanced New Technologies Co., Ltd. Method and apparatus for generating random character string
US10489117B2 (en) * 2015-12-07 2019-11-26 Alibaba Group Holding Limited Method and apparatus for generating random character string
KR102111871B1 (en) * 2015-12-07 2020-05-18 알리바바 그룹 홀딩 리미티드 Method and apparatus for generating random string
CN106844288B (en) * 2015-12-07 2022-03-22 创新先进技术有限公司 Random character string generation method and device
CN106535144A (en) * 2016-10-27 2017-03-22 珠海格力电器股份有限公司 Sending method for encrypted short message and terminal

Also Published As

Publication number Publication date
CN104363584B (en) 2018-06-15

Similar Documents

Publication Publication Date Title
EP3293934B1 (en) Cloud storage method and system
CN106412862B (en) short message reinforcement method, device and system
CN103259651B (en) A kind of method and system to terminal data encryption and decryption
CN105553951A (en) Data transmission method and data transmission device
CN107483192B (en) Data transmission method and device based on quantum communication
US11140547B2 (en) Method for securely controlling smart home, and terminal device
CN105245505A (en) Data transmitting method and device, data receiving method and device, and receiving-transmitting system
CN105812332A (en) Data protection method
CN104144049A (en) Encryption communication method, system and device
CN105450406A (en) Data processing method and device
CN1401171A (en) Generation of a common encryption key
US10021562B2 (en) Mobile trusted module (MTM)-based short message service security system and method thereof
CN106411504B (en) Data encryption system, method and device
CN105208028A (en) Data transmission method and related device and equipment
CN105989643A (en) Communication encryption method used for electronic lock, electronic lock apparatus and system thereof
CN113114654B (en) Terminal equipment access security authentication method, device and system
CN112115461B (en) Equipment authentication method and device, computer equipment and storage medium
US11128455B2 (en) Data encryption method and system using device authentication key
KR20080080152A (en) Method for cipher key conversion in wireless communication
CN111224958A (en) Data transmission method and system
CN114117406A (en) Data processing method, device, equipment and storage medium
CN116455572B (en) Data encryption method, device and equipment
CN104363584A (en) Method, device and terminal for encrypting and decrypting short message
CN111277605A (en) Data sharing method and device, computer equipment and storage medium
CN107968793B (en) Method, device and storage medium for downloading white box key

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant