Disclosure of Invention
The application provides a method and a device for generating a multiple signature wallet, which aim to solve the problem that multiple signature addresses are difficult to apply in the prior art.
In a first aspect, the present application provides a method of generating a multiple signature wallet, the method comprising:
acquiring the number of participants of the multiple signature addresses;
generating a public and private key pair of a sponsor, the public and private key pair comprising a public key and a private key;
receiving a public key for each participant;
generating multiple signature addresses according to the public key of each participant and the public key of the initiator, and sending notification information to the terminal of each participant, wherein the notification information comprises the multiple signature addresses, the public key of the initiator and the public keys of all participants;
and the terminals of the participants receive the notification information, verify the ownership of the public keys of the participants, and add the multiple signature addresses into the multiple signature wallets if the verification is passed.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the multiple signed address conforms to a BIP48 protocol.
With reference to the first aspect, in a second possible implementation manner of the first aspect, the public key of each participant and the public key of the initiator generate the multiple signature address through a hash operation.
With reference to the first aspect, in a third possible implementation manner of the first aspect, the verifying ownership of the public key of the participant includes:
receiving a password input by a user, and judging whether the password is the same as a local password or not;
if the private keys are the same, acquiring the private key of the participant, and generating a target public key according to the private key of the participant;
and judging whether the target public key is the same as the public key of the participant, and if so, passing the verification.
With reference to the first aspect, in a fourth possible implementation manner of the first aspect, the generating a public-private key pair of an initiator includes: and generating a public and private key pair conforming to the BIP44 protocol according to the running elliptic curve encryption algorithm.
In a second aspect, the present application provides an apparatus for generating a multiple signature wallet, the apparatus comprising:
the acquiring unit is used for acquiring the number of the participants of the multiple signature addresses;
the device comprises a first generation unit, a second generation unit and a third generation unit, wherein the first generation unit is used for generating a public and private key pair of a sponsor, and the public and private key pair comprises a public key and a private key;
a receiving unit for receiving a public key of each participant;
the second generating unit is used for generating a multiple signature address according to the public key of each participant and the public key of the initiator, and sending notification information to the terminal of each participant, wherein the notification information comprises the multiple signature address, the public key of the initiator and the public keys of all participants;
and the joining unit is used for receiving the notification information by the terminals of the participants, verifying the ownership of the public key of the participants, and joining the multiple signature addresses into the multiple signature wallets if the verification is passed.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the multiple-signature address conforms to a BIP48 protocol.
With reference to the second aspect, in a second possible implementation manner of the second aspect, the public key of each participant and the public key of the initiator generate the multiple signature address through a hash operation.
With reference to the second aspect, in a third possible implementation manner of the second aspect, the step of verifying ownership of the public key of the participant includes:
receiving a password input by a user, and judging whether the password is the same as a local password or not;
if the private keys are the same, acquiring the private key of the participant, and generating a target public key according to the private key of the participant;
and judging whether the target public key is the same as the public key of the participant, and if so, passing the verification.
With reference to the second aspect, in a fourth possible implementation manner of the second aspect, the generating a public-private key pair of the initiator includes: and generating a public and private key pair conforming to the BIP44 protocol according to the running elliptic curve encryption algorithm.
According to the technical scheme, the method and the device for generating the multiple signature wallets comprise the following steps: acquiring the number of participants of the multiple signature addresses; generating a public and private key pair of a sponsor, the public and private key pair comprising a public key and a private key; receiving a public key for each participant; generating multiple signature addresses according to the public key of each participant and the public key of the initiator, and sending notification information to the terminal of each participant, wherein the notification information comprises the multiple signature addresses, the public key of the initiator and the public keys of all participants; and the terminals of the participants receive the notification information, verify the ownership of the public keys of the participants, and add the multiple signature addresses into the multiple signature wallets if the verification is passed. In the embodiment of the application, the multiple signature addresses are automatically pushed to the terminals of the participants, so that the management difficulty can be reduced, and the usability of the multiple signature addresses is greatly improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
The current multiple signature address creation mode has the defects that the technical threshold is higher, and certain code knowledge needs to be mastered. Meanwhile, there is a problem that it is difficult to distribute and manage the control private key. Therefore, how to solve the usability of the multiple signature addresses becomes a problem to be solved urgently in the industry.
Referring to fig. 1, a first embodiment of a method for generating a multiple-signature wallet provided by the present application is applied to the field of cryptographic money wallets, and the method includes a process of generating a multiple-signature address and adding the multiple-signature address to the multiple-signature wallet, and specifically, the method includes:
s100, acquiring the number of the participants of the multiple signature addresses; specifically, the initiator may set the number of participants who generate the multiple signature addresses through the terminal of the initiator, for example, the number of participants may be two, three, four, or the like. The terminal may be a mobile terminal, such as a mobile phone.
S200, generating a public and private key pair of an initiator, wherein the public and private key pair comprises a public key and a private key; it should be noted that the private key of the initiator is stored in the terminal of the initiator.
And S300, receiving the public key of each participant. Specifically, the generation process of the public and private key pair of the participant is the same as that of the public and private key pair of the initiator, the public and private key pair of the participant is generated at the terminal of the participant, the public key of the participant is sent to the terminal of the initiator, and the private key of the participant is stored at the terminal of the participant.
S400, generating a multiple signature address according to the public key of each participant and the public key of the initiator, and sending notification information to the terminal of each participant, wherein the notification information comprises the multiple signature address, the public key of the initiator and the public keys of all participants;
it should be noted that, in the embodiment of the present application, the public key of each participant, the public key of the initiator, and the number of people are processed, and then the multiple signature addresses are generated. The multiple signature addresses may be used for reception of digital assets. The multiple signature addresses generated by the public keys of multiple persons can ensure the safety of the digital assets corresponding to the multiple signature addresses. And after the generation of the multiple signature addresses is finished, automatically sending notification information to the terminals of all participants. The notification information comprises the multiple signature addresses, the public key of the initiator and the public keys of all participants, and the public key of the initiator and the public keys of all participants are sent to the terminal of each participant, so that the participants can record and generate the public keys of the multiple signature addresses conveniently, all the participants and the initiator can manage each other conveniently, and the availability of the multiple signature addresses is improved.
And S500, the terminals of the participants receive the notification information, the ownership of the public key of the participants is verified, and if the authentication is passed, the multiple signature addresses are led into the multiple signature wallets. In the embodiment of the application, the ownership of the public key of the participant is verified by using the private key stored in the participant terminal, and specifically, the private key is stored in the security sandbox. The embodiment of the application can transfer the digital assets at different terminals at any time by means of the private key. It is also noted that the multiple signature wallets are pre-existing.
As can be seen from the above embodiments, a first embodiment of the method for generating a multiple signature wallet of the present application includes: acquiring the number of participants of the multiple signature addresses; generating a public and private key pair of a sponsor, the public and private key pair comprising a public key and a private key; receiving a public key for each participant; generating multiple signature addresses according to the public key of each participant and the public key of the initiator, and sending notification information to the terminal of each participant, wherein the notification information comprises the multiple signature addresses, the public key of the initiator and the public keys of all participants; and the terminals of the participants receive the notification information, verify the ownership of the public keys of the participants, and add the multiple signature addresses into the multiple signature wallets if the verification is passed. In the embodiment of the application, the multiple signature addresses are automatically pushed to the terminals of the participants, so that the management difficulty can be reduced, and the usability of the multiple signature addresses is greatly improved.
A second embodiment of a method for generating a multi-signature wallet is provided, the multi-signature address conforming to the BIP48 protocol. In particular, the method conforms to the bip48 specification, and all user actions are based on cryptographic principles.
In a third embodiment of the method for generating a multiple signature wallet provided by the present application, the public key of each participant and the public key of the initiator generate multiple signature addresses through hash operations. Specifically, the hash operation is to convert an input (also called a pre-mapped pre-image) of an arbitrary length into an output of a fixed length by a hash algorithm, and the output is a hash value. In short, it is a function of compressing a message of an arbitrary length to a message digest of a certain fixed length.
Referring to fig. 2, in a fourth embodiment of the method for generating a multiple signature wallet provided by the present application, the step of verifying ownership of the public key of the participant comprises:
s501, receiving a password input by a user, and judging whether the password is the same as a local password;
s502, if the private keys are the same, obtaining the private key of the participant, and generating a target public key according to the private key of the participant;
s503, judging whether the target public key is the same as the public key of the participant, and if so, passing the verification.
Specifically, the private key is stored in a secure sandbox, and the local password is set by the user and used for verifying whether the user can open the secure sandbox. If the password input by the user is the same as the local password, the security sandbox can be opened to obtain the private key of the participant in the security sandbox. In some embodiments, a private key of a participant is used to generate a corresponding target public key through elliptic curve multiplication m × G, the target public key is used for comparison with a public key of the participant in the notification message sent by the initiator terminal, if the target public key is the same as the public key of the participant, the verification is passed, and the multiple signature address can be added into the multiple signature wallet; if the target public key and the participant's public key are different, the verification fails and the multiple signature address cannot be added to the multiple signature wallet.
As can be seen from the above embodiments, in a fourth embodiment of the method for generating a multiple-signature wallet of the present application, and in a third embodiment of the method for generating a multiple-signature wallet, the step of verifying ownership of the public key of the participant comprises: receiving a password input by a user, and judging whether the password is the same as a local password or not; if the private keys are the same, acquiring the private key of the participant, and generating a target public key according to the private key of the participant; and judging whether the target public key is the same as the public key of the participant, and if so, passing the verification. In the embodiment of the application, the ownership of the public key of the participant is verified through the private key, so that the safety of the participant in operating the multiple signature addresses can be ensured.
In a fifth embodiment of the method for generating a multiple-signature wallet, the step of generating a public-private key pair of an originator comprises: and generating a public and private key pair conforming to the BIP44 protocol according to the running elliptic curve encryption algorithm.
Referring to fig. 3, the present application provides an apparatus for generating a multiple signature wallet, the apparatus comprising:
an acquisition unit 100 for acquiring the number of persons who participate in the multiple signature addresses;
a first generating unit 200, configured to generate a public and private key pair of a sponsor, where the public and private key pair includes a public key and a private key;
a receiving unit 300 for receiving a public key of each participant;
a second generating unit 400, configured to generate a multiple signature address according to the public key of each participant and the public key of the initiator, and send notification information to the terminal of each participant, where the notification information includes the multiple signature address, the public key of the initiator, and the public keys of all participants;
and the joining unit 500 is used for receiving the notification information by the terminals of the participants, verifying the ownership of the public keys of the participants, and joining the multiple signature addresses into the multiple signature wallets if the verification is passed.
In another embodiment of the present application, a loading apparatus for promiscuous mode block packets is provided, wherein the multiple signature addresses conform to the BIP48 protocol.
In another embodiment of the present application, a loading apparatus for block grouping in promiscuous mode is provided, wherein the public key of each participant and the public key of the initiator generate multiple signature addresses by a hash operation.
In another embodiment of the present application, the method for verifying ownership of a public key of a participant comprises:
receiving a password input by a user, and judging whether the password is the same as a local password or not;
if the private keys are the same, acquiring the private key of the participant, and generating a target public key according to the private key of the participant;
and judging whether the target public key is the same as the public key of the participant, and if so, passing the verification.
In another embodiment of the present application provides a loading device of promiscuous mode block grouping, the step of generating a public-private key pair of an originator comprises: and generating a public and private key pair conforming to the BIP44 protocol according to the running elliptic curve encryption algorithm.
In a specific implementation, the present application further provides a computer storage medium, where the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments of the method for prompting a process of transferring a digital asset address provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a Read-only Memory (ROM) or a Random Access Memory (RAM).
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The same and similar parts in the various embodiments in this specification may be referred to each other. In particular, for the embodiments of the secure network middleware for identity authentication and the implementation method and apparatus thereof, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the description in the embodiments of the method.
The above-described embodiments of the present application do not limit the scope of the present application.