Summary of the invention
This application provides backup method, device and the terminals of a kind of digital cash private key, to solve existing digital goodsIn the backup mode of coin private key, when the private key that user generates in digital monetary assets management tool carries out copy backup, cutThe data of cutting plate and its be easy by wooden horse or virus monitor, cause generate private key be leaked, to cause loss of assetsProblem.
In a first aspect, the application provides a kind of backup method of digital cash private key, which comprises
It receives private key and generates request;
Request, which is generated, according to the private key generates original private keys;
The original private keys are carried out to obscure processing, obtain obscuring private key;
Obscure private key by described and show to the first display area of display interface, while second in the display interface is aobviousShow that region is shown and obscures prompt information;
It receives to the duplicate instructions for obscuring private key, obscures private key by described and be copied to shear plate;
It receives the stickup to the data of the shear plate to instruct, obscures private key by described and affix to backup area.
With reference to first aspect, the first in first aspect can carry out the original private keys to obscure place in realization modeReason, obtains obscuring private key, comprising:
A random number and a random character are generated, the character string that the size of the random number is less than original private keys is longDegree;
The position that character to be replaced in original private keys is determined according to the random number, will be under position described in original private keysCharacter replace with the random character, obtain obscuring private key.
With reference to first aspect, in second of achievable mode of first aspect, the original private keys are carried out to obscure placeReason, obtains obscuring private key, comprising:
Generate a random number and a random string, the length of the size of the random number and the random stringThe respectively less than string length of original private keys;
The position that character string to be replaced in original private keys is determined according to the random number, by position described in original private keysThe character string of lower corresponding length replaces with the random string, obtains obscuring private key.
With reference to first aspect, the third in first aspect can carry out the original private keys to obscure place in realization modeReason, obtains obscuring private key, comprising:
Two or more random numbers and random character are generated, the size of the random number is less than the word of original private keysString length is accorded with, the quantity of the random character is identical as the quantity of the random number;
The position for determining each character to be replaced in original private keys respectively according to the random number, by institute in original private keysCharacter under rheme is set replaces with the random character respectively, obtains obscuring private key.
With reference to first aspect, in the 4th kind of achievable mode of first aspect, the original private keys are carried out to obscure placeReason, obtains obscuring private key, comprising:
Generate two or more random numbers and random string, the size of the random number and the random characterThe length of string is respectively less than the string length of original private keys, the quantity phase of the quantity of the random string and the random numberTogether;
The position for determining each character string to be replaced in original private keys respectively according to the random number, will be in original private keysThe character string of equal length replaces with the random string respectively under the position, obtains obscuring private key.
Second aspect, the application provide a kind of back-up device of digital cash private key, and described device includes:
Receiving unit generates request for receiving private key;
Generation unit generates original private keys for generating request according to the private key;
Processing unit obscures processing for carrying out to the original private keys, obtains obscuring private key;
Display unit, for obscuring private key by described and showing to the first display area of display interface, while described aobviousShow that second display area at interface is shown and obscures prompt information;
Copied cells obscure private key and are copied to shear plate for receiving to the duplicate instructions for obscuring private key by described;
Application unit, for receive the stickup to the data of the shear plate instruction, by it is described obscure private key affix to it is standbyPart area.
In conjunction with second aspect, the first in second aspect can be in realization mode, the processing unit, comprising:
Subelement is generated, for generating a random number and a random character, the size of the random number is less than originalThe string length of private key;
Replacing subelement will be original for determining the position of character to be replaced in original private keys according to the random numberCharacter under position described in private key replaces with the random character, obtains obscuring private key.
In conjunction with second aspect, in second of achievable mode of second aspect, the processing unit, comprising:
Subelement is generated, for generating a random number and a random string, the size of the random number and describedThe length of random string is respectively less than the string length of original private keys;
Replacing subelement will be former for determining the position of character string to be replaced in original private keys according to the random numberThe character string of corresponding length replaces with the random string under position described in beginning private key, obtains obscuring private key.
In conjunction with second aspect, the third in second aspect can be in realization mode, the processing unit, comprising:
Subelement is generated, for generating two or more random numbers and random character, the size of the random numberLess than the string length of original private keys, the quantity of the random character is identical as the quantity of the random number;
Subelement is replaced, for determining the position of each character to be replaced in original private keys respectively according to the random numberIt sets, the character under position described in original private keys is replaced with into the random character respectively, obtains obscuring private key.
In conjunction with second aspect, in the 4th kind of achievable mode of second aspect, the processing unit, comprising:
Generate subelement, for generating two or more random numbers and random string, the random number it is bigThe length of the small and described random string is respectively less than the string length of original private keys, the quantity of the random string with it is describedThe quantity of random number is identical;
Subelement is replaced, for determining the position of each character string to be replaced in original private keys respectively according to the random numberIt sets, the character string of equal length under position described in original private keys is replaced with into the random string respectively, obtains obscuring privateKey.
The third aspect, the application provide a kind of back-up terminals of digital cash private key, and the terminal includes: processor, withAnd the memory for storage processor executable instruction;
Wherein, the processor is configured to:
It receives private key and generates request;
Request, which is generated, according to the private key generates original private keys;
The original private keys are carried out to obscure processing, obtain obscuring private key;
Obscure private key by described and show to the first display area of display interface, while second in the display interface is aobviousShow that region is shown and obscures prompt information;
It receives to the duplicate instructions for obscuring private key, obscures private key by described and be copied to shear plate;
It receives the stickup to the data of the shear plate to instruct, obscures private key by described and affix to backup area.
From the above technical scheme, backup method, device and the terminal of a kind of digital cash private key provided by the present application,It receives private key and generates request, request is generated according to private key and generates original private keys, original private keys are carried out to obscure processing, are obscuredPrivate key will be obscured private key and be shown to the first display area of display interface, while showing in the second display area of display interfaceObscure prompt information, receive to the duplicate instructions for obscuring private key, private key will be obscured and be copied to shear plate, receive the number to shear plateAccording to stickup instruction, private key will be obscured and affix to backup area;The application obscures the content of private key when generating private key,And it is showing that the other positions other than private key carry out prompt explanation to the content obscured, is informing the details that user obscures,Lead to private key address to while being convenient for user ID private key, avoid the data of shear plate from being monitored by wooden horse or virusIt is leaked, even if listener, which obtains in shear plate, obscures private key, is also unable to get original private keys, is obviously improved user's assetsSafety.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment andTechnical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application oneSection Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doingEvery other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.Below in conjunction with attached drawing,The technical scheme provided by various embodiments of the present application will be described in detail.
Referring to Fig. 1, being a kind of flow chart of the backup method of digital cash private key provided by the present application, the method packetIt includes:
Step 101, it receives private key and generates request.
Specifically, common digital cash resource management software currently on the market usually all has the function of generating account,Generate a private key address corresponding with the private key.
Step 102, request is generated according to the private key and generates original private keys.
The address of bit coin and private key are calculated by ECDSA elliptic curve encryption algorithm.
For example, the address format of bit coin is similar to:
1HvQb2hbkMpsJzNXU8ePX55TE9vDPDxJxh;
The private key format of bit coin is similar to:
L2kVdpKzCQHrxFzv5MNCyDF86LonYjSKwm23k4AanjCe2WhX7ozR。
The private key of bit coin is unique, similar other digital cash assets such as Lay spy coin, the digital assets such as ether millPrivate key length be also generally so.Since private key address is too long and very complicated, for convenient consideration, digital asset management softwareFor generation private key usually without any processing, all show in plain text, user can be in such a way that duplication be pastedPrivate key is stored in the place of other safety.
Step 103, the original private keys are carried out obscuring processing, obtains obscuring private key.
Specifically, after the equipment of user is mounted wooden horse or middle virus without knowing it, user is in logarithmWhen the private key that generates in word monetary assets management tool carries out copy backup, the data of shear plate and its it is easy by wooden horse or diseasePoison is monitored, and causes the private key generated to be leaked, to cause loss of assets.Therefore, after generating private key in the application, not directlyIt is shown in display interface, but private key is carried out to obscure processing.
Step 104, obscure private key by described and show to the first display area of display interface, while in the display interfaceThe second display area show and obscure prompt information.
Referring to Fig. 9, obtain after obscuring private key, the first display area private key will be obscured be shown in display interface, simultaneouslyThe second display area other than the first display area, which is shown, obscures prompt information, to inform the original private keys before user obscures.In the present embodiment, obscuring prompt information is specially to be shown in the lower zone for obscuring private key, obscures prompt information and needs to describe clearlyChu guarantees that user can see the prompt information in time, and can the prompt information easily know original private keys.
Step 105, it receives to the duplicate instructions for obscuring private key, obscures private key by described and be copied to shear plate.
Specifically, for user when display interface replicates private key, actual copy to shear plate is to have already passed through placeReason obscures private key, therefore, when the equipment of user is mounted wooden horse or middle virus, the number of shear plate without knowing itIt, also can not be to the digital goods of user even if listener, which obtains in shear plate, obscures private key when according to being monitored by wooden horse or virusAssets threaten, because obscuring private key is equivalent to a wrong private key, listener is unable to get original private keys, so as to aobviousWrite the safety for promoting user's assets.
Step 106, it receives the stickup to the data of the shear plate to instruct, obscures private key by described and affix to backup area.
Specifically, can be according to prompt information be obscured after the data of shear plate are affixed to safe backup area by user, it willObscuring private key correction is correct original private keys, is saved to complete backup.
From the above technical scheme, the backup method of a kind of digital cash private key provided by the present application is generating private keyWhen, the content of private key is obscured, and showing that the other positions other than private key carry out prompt explanation to the content obscured,Inform the details obscured of user, thus while being convenient for user ID private key, avoid the data of shear plate by wooden horse orPerson's virus is monitored and private key address is caused to be leaked, even if listener, which obtains in shear plate, obscures private key, is also unable to get originalBeginning private key is obviously improved the safety of user's assets.
Referring to Fig. 2, in a kind of first embodiment of the backup method of digital cash private key provided by the present application, to instituteIt states original private keys to carry out obscuring processing, obtains obscuring private key, can specifically include:
Step 201, a random number and a random character are generated, the size of the random number is less than the word of original private keysAccord with string length.
Specifically, random number is used to determine the position of character to be replaced in original private keys, and therefore, it is necessary to be less than beginning private keyString length, with guarantee according to random number determine position it is effective.
Step 202, the position that character to be replaced in original private keys is determined according to the random number, by institute in original private keysCharacter under rheme is set replaces with the random character, obtains obscuring private key.
For example, the random number generated is " 2 ", then it represents that character to be replaced is second character in original private keys, and withMachine character is for replacing the second character, for example, second character is " a " in original private keys, random character is " b ", then willThe private key that second character " a " in original private keys replaces with random character to obtain after " b " is to obscure private key.
The present embodiment is by being transformed to obscure private key for original private keys, when user ID private key, even if listener acquisition is cutPrivate key is obscured in cutting plate, is also unable to get original private keys.
Referring to Fig. 3, in a kind of second embodiment of the backup method of digital cash private key provided by the present application, to instituteIt states original private keys to carry out obscuring processing, obtains obscuring private key, specifically also may include:
Step 301, a random number and a random string, the size of the random number and the random character are generatedThe length of string is respectively less than the string length of original private keys.
Specifically, random number is used to determine the position of character string to be replaced in original private keys, and random string is for replacingThe character string for changing equal length in original private keys, therefore, it is necessary to the sizes of random number and the length of random string to be respectively less than originalThe string length of beginning private key.
Step 302, the position that character string to be replaced in original private keys is determined according to the random number, will be in original private keysThe character string of corresponding length replaces with the random string under the position, obtains obscuring private key.
For example, the random number generated is " 3 ", then it represents that character string to be replaced is to start from third position in original private keysCharacter string, and random string is to be used to replace the character string started from third position, for example, third, the 4th in original private keysThe character string of position character composition is " kV ", and random string is " Xm ", then by the third in original private keys, the 4th character compositionCharacter string " kV " replace with after random string is " Xm ", obtained private key is to obscure private key.Compared to the first embodiment,The present embodiment improves safety using the character string of the equal length in random string replacement original private keys to a certain extentProperty.
Referring to Fig. 4, in a kind of 3rd embodiment of the backup method of digital cash private key provided by the present application, to instituteIt states original private keys to carry out obscuring processing, obtains obscuring private key, specifically also may include:
Step 401, two or more random numbers and random character are generated, the size of the random number is less than originalThe string length of private key, the quantity of the random character are identical as the quantity of the random number.
Specifically, by taking two random numbers as an example, two random numbers are respectively used to determine to be replaced in original private keys twoThe position of character, correspondingly, the quantity of random character also should be two, and two random characters are respectively used in replacement original private keysTwo characters corresponding with two random numbers, therefore, it is necessary to the string lengths that the size of random number is less than original private keys, at randomThe quantity of character and the quantity of random number are identical.
Step 402, the position for determining each character to be replaced in original private keys respectively according to the random number, will be originalCharacter under position described in private key replaces with the random character respectively, obtains obscuring private key.
For example, two random numbers generated are respectively " 3 " and " 7 ", then it represents that two characters to be replaced in original private keysFor positioned at two characters of third position and the 7th, two random characters are respectively used to replace the third position and the two of the 7thA character.For example, third position and the 7th two characters are respectively " Y " and " j ", two random character difference in original private keysFor " C " and " e ", then by original private keys third position and the 7th two characters " Y " and " j " replace with random character respectivelyAfter " C " and " e ", obtained private key is to obscure private key.
Compared to the first embodiment, the present embodiment replaces multiple characters in original private keys by multiple random characters,Safety is improved to a certain extent.
Referring to Fig. 5, in a kind of fourth embodiment of the backup method of digital cash private key provided by the present application, to instituteIt states original private keys to carry out obscuring processing, obtains obscuring private key, specifically also may include:
Step 501, two or more random numbers and random string are generated, the size of the random number and describedThe length of random string is respectively less than the string length of original private keys, the quantity of the random string and the random numberQuantity is identical.
Specifically, by taking two random numbers as an example, two random numbers are respectively used to determine to be replaced in original private keys twoThe position of character string, correspondingly, the quantity of random string also should be two, and two random strings are respectively used to replace originalTwo character strings corresponding with two random numbers in private key, therefore, it is necessary to the length of the size of random number and random string is equalLess than the string length of original private keys, the quantity of random string and the quantity of random number are identical.
Step 502, the position for determining each character string to be replaced in original private keys respectively according to the random number, will be formerThe character string of equal length replaces with the random string respectively under position described in beginning private key, obtains obscuring private key.
For example, two random numbers generated are respectively " 3 " and " 7 ", then it represents that two characters to be replaced in original private keysString is two character strings starting from third position and the 7th, and two random strings are respectively used to replace the third position and theSeven start of calculation and digit two character strings identical with the digit of random string.For example, third position and the 7th in original private keysTwo character strings that position is started are respectively " MN " and " 4A ", and two random strings are respectively " F8 " and " nj ", then by original privateTwo character strings " MN " and " 4A " of third position in key and the 7th start of calculation replace with respectively two random strings " F8 " andAfter " nj ", obtained private key is to obscure private key.In addition, in the embodiment, random string and random can also be generated simultaneouslyCharacter, to replace the character string and character of corresponding position in original private keys, to obtain obscuring private key.
Compared to first to 3rd embodiment, the present embodiment is more in original private keys by replacing multiple random stringsA character string, further improves safety.
Referring to Fig. 6, the application provides a kind of back-up device of digital cash private key, described device includes:
Receiving unit 601 generates request for receiving private key.
Generation unit 602 generates original private keys for generating request according to the private key.
Processing unit 603 obscures processing for carrying out to the original private keys, obtains obscuring private key.
Display unit 604, for obscuring private key by described and showing to the first display area of display interface, while describedSecond display area of display interface, which is shown, obscures prompt information.
Copied cells 605 obscure private key and are copied to shearing for receiving to the duplicate instructions for obscuring private key by describedPlate.
Application unit 606 is obscured private key and is affixed to for receiving the instruction of the stickup to the data of the shear plate by describedBackup area.
Referring to Fig. 7, in a kind of one embodiment of the back-up device of digital cash private key of the application, the processingUnit 603, can specifically include:
Subelement 701 is generated, for generating a random number and a random character, the size of the random number is less than originalThe string length of beginning private key.
Replacing subelement 702 will be former for determining the position of character to be replaced in original private keys according to the random numberCharacter under position described in beginning private key replaces with the random character, obtains obscuring private key.
Referring to Fig. 7, in a kind of another embodiment of the back-up device of digital cash private key of the application, the placeUnit is managed, can specifically include:
Subelement 701 is generated, for generating a random number and a random string, the size of the random number and instituteThe length for stating random string is respectively less than the string length of original private keys.
Subelement 702 is replaced, it, will for determining the position of character string to be replaced in original private keys according to the random numberThe character string of corresponding length replaces with the random string under position described in original private keys, obtains obscuring private key.
Referring to Fig. 7, in a kind of another embodiment of the back-up device of digital cash private key of the application, the placeUnit is managed, can specifically include:
Generate subelement 701, for generating two or more random numbers and random character, the random number it is bigIt is less than the string length of original private keys, the quantity of the random character is identical as the quantity of the random number.
Subelement 702 is replaced, for determining each character to be replaced in original private keys respectively according to the random numberCharacter under position described in original private keys is replaced with the random character respectively, obtains obscuring private key by position.
Referring to Fig. 7, in a kind of another embodiment of the back-up device of digital cash private key of the application, the placeUnit is managed, can specifically include:
Generate subelement 701, for generating two or more random numbers and random string, the random numberSize and the length of the random string are respectively less than the string length of original private keys, the quantity of the random string and instituteThe quantity for stating random number is identical.
Subelement 702 is replaced, for determining each character string to be replaced in original private keys respectively according to the random numberPosition, the character string of equal length under position described in original private keys is replaced with into the random string respectively, is mixedConfuse private key.
Referring to Fig. 8, the application also provides a kind of back-up terminals of digital cash private key, the terminal includes: processor81, and for the memory 82 of 81 executable instruction of storage processor.
Wherein, the processor 81 is configured as: being received private key and is generated request, is generated according to private key generation request formerBeginning private key carries out the original private keys to obscure processing, obtains obscuring private key, obscures private key by described and shows to display interfaceFirst display area, while being shown in the second display area of the display interface and obscuring prompt information, reception is obscured describedThe duplicate instructions of private key obscure described private key and are copied to shear plate, receive the stickup to the data of the shear plate and instruct, willIt is described to obscure private key and affix to backup area.
In the specific implementation, the application also provides a kind of computer storage medium, wherein the computer storage medium can storeThere is program, which may include the part in each embodiment of the backup method of digital cash private key provided by the invention when executingOr Overall Steps.The storage medium can for magnetic disk, CD, read-only memory (English: Read-Only Memory,Referred to as: ROM) or random access memory (English: Random Access Memory, referred to as: RAM) etc..
It is required that those skilled in the art can be understood that the technology in the embodiment of the present invention can add by softwareThe mode of general hardware platform realize.Based on this understanding, the technical solution in the embodiment of the present invention substantially orSay that the part that contributes to existing technology can be embodied in the form of software products, which can depositStorage is in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are used so that computer equipment (can be withIt is personal computer, server or the network equipment etc.) execute certain part institutes of each embodiment of the present invention or embodimentThe method stated.
Same and similar part may refer to each other between each embodiment in this specification.Especially for digital cashFor the back-up device and terminal embodiment of private key, since it is substantially similar to the method embodiment, so the comparison of description is simpleSingle, related place is referring to the explanation in embodiment of the method.
Above-described the application embodiment does not constitute the restriction to the application protection scope.