CN116436636A - Block chain slicing method based on secret handshake - Google Patents

Block chain slicing method based on secret handshake Download PDF

Info

Publication number
CN116436636A
CN116436636A CN202310207773.6A CN202310207773A CN116436636A CN 116436636 A CN116436636 A CN 116436636A CN 202310207773 A CN202310207773 A CN 202310207773A CN 116436636 A CN116436636 A CN 116436636A
Authority
CN
China
Prior art keywords
block
user
node
transaction
secret
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310207773.6A
Other languages
Chinese (zh)
Inventor
田海博
罗玉琴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sun Yat Sen University
Original Assignee
Sun Yat Sen University
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 Sun Yat Sen University filed Critical Sun Yat Sen University
Priority to CN202310207773.6A priority Critical patent/CN116436636A/en
Publication of CN116436636A publication Critical patent/CN116436636A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0435Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Abstract

The invention relates to the technical field of blockchains, in particular to a blockchain slicing method based on secret handshaking. The segmented block chain is naturally formed through a secret handshake technology, and a user and a block chain node only know the information of the segment where the user and the block chain node are located, so that the information of other segments is hidden, and the privacy of the segments is improved; in addition, due to the inherent relationship of the DAG graph, the blocks in the slice can be confirmed by all the block chain nodes, so that the consensus speed of the blocks in the slice is improved.

Description

Block chain slicing method based on secret handshake
Technical Field
The invention relates to the technical field of blockchains, in particular to a blockchain slicing method based on secret handshaking.
Background
The slicing technique is one of the blockchain expansion techniques. The partitioning refers to dividing the blockchain nodes into different partitions according to a certain rule, wherein nodes in each partition respectively maintain a blockchain ledger in the partition, and each partition can independently and parallelly complete consensus, so that the transaction throughput of the blockchain system is increased. Currently, common slicing technologies include network slicing, state slicing, transaction slicing and the like, but few slicing technologies consider privacy security of slicing at present, so that privacy is revealed in the slicing process.
The secret handshake technology allows for mutual authentication of individuals within the same organization without revealing the privacy of both parties during the authentication process. The characteristic enables the secret handshake technology to be widely applied to the internet user authentication scene.
Disclosure of Invention
The invention provides a block chain slicing method based on secret handshake, which improves the privacy of slicing and the consensus speed of slicing blocks.
In order to solve the technical problems, the invention adopts the following technical scheme: a block chain fragmentation method based on secret handshake comprises three entities of a block chain node CN, a user U for transmitting transaction and a group management node GA, wherein an effective point-to-point network exists between the block chain node and the user, and a safety channel exists between the block chain node and the user and the management node; wherein, the number of the block chain nodes is n, the number of users is l, the number of GA is m, n and l are natural numbers; block chain node CN i And user U j Through the secure channel to GA k Registration to obtain GA respectively k Is a credential of (2)
Figure BDA0004111551740000011
And->
Figure BDA0004111551740000012
Wherein i is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to l, and k is more than or equal to 1 and less than or equal to m; the method comprises the following steps:
s1, a user executes a secret handshake protocol with a neighbor node in a point-to-point network, and sends encrypted transactions;
s2, re-encrypting and forwarding effective transactions of users by the blockchain nodes, and packaging the effective transactions;
s3, the block chain nodes issue blocks to participate in DAG consensus of the directed acyclic graph, and update DAG block chains;
s4, when a new agreed block appears in the DAG chain, the block chain node and a generator of the block execute a secret handshake protocol, and the block chain is updated.
In one embodiment, the step S1 specifically includes:
s11, setting the user as U i The user points to a neighbor blockchain node in a point-to-point network
Figure BDA0004111551740000021
Send handshake message->
Figure BDA0004111551740000022
S12, user U j Neighboring block link points of (a)
Figure BDA0004111551740000023
Return handshake message->
Figure BDA0004111551740000024
S13, user U j With the management node GA belonging to the same group k Neighboring block link points of (a)
Figure BDA0004111551740000025
Generating a shared key
Figure BDA0004111551740000026
S14, using the shared key
Figure BDA0004111551740000027
And secure symmetric encryption algorithm encryption transaction +_>
Figure BDA0004111551740000028
Obtaining encrypted transactions
Figure BDA0004111551740000029
S15, user U j To the management node GA belonging to the same group k Neighboring block link points of (a)
Figure BDA00041115517400000210
Send encrypted transaction->
Figure BDA00041115517400000211
In one embodiment, the step S2 specifically includes:
s21, block chain node
Figure BDA00041115517400000212
Receiving user U j Is (are) encrypted transaction->
Figure BDA00041115517400000213
Use of symmetric decryption algorithm and shared key +.>
Figure BDA00041115517400000214
Decryption->
Figure BDA00041115517400000215
Obtaining user U j Transaction->
Figure BDA00041115517400000216
S22, block chain node
Figure BDA00041115517400000217
Verifying user transactions according to the verification rules of the blockchain>
Figure BDA00041115517400000218
If the transaction is valid
Figure BDA00041115517400000219
If not, stopping processing, otherwise, judging that the user transaction is valid;
s23, block chain node
Figure BDA00041115517400000220
If no valid user transaction has been forwarded +.>
Figure BDA00041115517400000221
Then->
Figure BDA00041115517400000222
Performing a secret handshake protocol using neighboring blockchain nodes of (a)A shared key generated by a secret handshake protocol encrypts a user transaction +.>
Figure BDA00041115517400000223
Forwarding the re-encrypted user valid transaction; the process of executing the secret handshake between the block chain nodes is the same as the process of executing the secret handshake between the user and the block chain node, see steps S11 to S14; in addition, after establishing a secret handshake, the block link points belonging to the same group of management nodes can re-encrypt a plurality of effective user transactions by using a shared key generated by the secret handshake, and a secret handshake protocol does not need to be executed for each user transaction;
s24, block chain node
Figure BDA00041115517400000224
Generating a block encryption key for block B>
Figure BDA00041115517400000225
The key is used whenever an effective user transaction is obtained>
Figure BDA00041115517400000226
And encrypting the user transaction by a secure symmetric encryption algorithm, and packaging the encrypted user transaction into a block B.
In one embodiment, the step S3 specifically includes:
s31, setting a system threshold t B When the blockchain node CN i The number of encrypted transactions packed in a block exceeds the system threshold t B Thereafter, the blockchain node CN i Setting a block header comprising a blockchain node CN i The handshake message of (1), the link of the two recent blocks in the current DAG chain, and the consensus information, then broadcasting the complete block to all block links through a point-to-point network; the handshake message in the step has the same meaning as the handshake message in the step S11, and is the first message of the secret handshake protocol;
s32, block chain node CN i After receiving the block, finishing DAG consensus process according to the consensus information of the block head, and updating the DAG areaA chain of blocks.
In one embodiment, the step S4 specifically includes:
s41, for new blocks with consensus in DAG chain, blockchain node CN i If the new block is detected not to be generated by the user, the handshake information of the block head is adopted, and a secret handshake message is sent to a generator of the new block; the secret handshake message sent to the new block generator in the step has the same meaning as the handshake message in the step S12, and is the second message of secret handshake;
s42, after receiving the secret handshake message, the generating party of the new block generates a shared secret key if the requesting party and the requesting party belong to the same group of management nodes, returns a block encryption key encrypted by the shared secret key and a safe symmetric encryption algorithm, and otherwise, stops processing; the shared secret key in the step has the same meaning as the shared secret key in the step S13, and is generated by a secret handshake protocol;
s43, block chain node CN i After obtaining the block encryption key, decrypting and verifying the validity of the block, if the block is valid, updating the block chain of the block, namely adding the decrypted plaintext block PB into the local block chain, otherwise, stopping processing.
In one of the embodiments, the management node GA k Creating group G k ,G k ,G k′ The cyclic group with the large prime number q as the order defines a bilinear map e: g k ×G k →G k′ For all a, b ε Z q ,P,Q∈G k Satisfy e (aP, bQ) =e (P, Q) ab The method comprises the steps of carrying out a first treatment on the surface of the Defining a hash function H 1 And H 2 Wherein H is 1 :{0,1} * →G k ,H 2 Is a SHA-1 function;
if there is a new blockchain node CN i Or user U j Adding fragment k, GA k To which credentials are assigned
Figure BDA0004111551740000031
And->
Figure BDA0004111551740000032
Figure BDA0004111551740000033
Including group identity->
Figure BDA0004111551740000034
And group secret information->
Figure BDA0004111551740000035
Figure BDA0004111551740000036
Including group identity->
Figure BDA0004111551740000037
And group secret information
Figure BDA0004111551740000038
When a node within a slice is to be removed, the GA k Broadcasting the group identity of the node to other nodes in the segment, and warning the node in the segment not to handshake with the node;
wherein, user U j Neighbor blockchain nodes in a sum-point-to-point network
Figure BDA0004111551740000039
The secret handshake procedure includes:
user U j Generating and broadcasting handshake transactions
Figure BDA00041115517400000310
Neighbor blockchain nodes
Figure BDA00041115517400000311
Receive->
Figure BDA00041115517400000312
After that, the own group identity is +.>
Figure BDA00041115517400000313
And follow upNumber of machines->
Figure BDA00041115517400000314
To the user U j
User U j Reception of
Figure BDA00041115517400000315
And->
Figure BDA00041115517400000316
After that, respond to own group identity +.>
Figure BDA00041115517400000317
Random number->
Figure BDA00041115517400000318
And message->
Figure BDA00041115517400000319
Wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure BDA0004111551740000041
neighbor blockchain nodes
Figure BDA0004111551740000042
After receiving the user response, generating
Figure BDA0004111551740000043
Verification->
Figure BDA0004111551740000044
Whether or not to be equal to
Figure BDA0004111551740000045
If equal, respond to the message->
Figure BDA0004111551740000046
If the verification is unequal, the response is not performed;
user U j Received by
Figure BDA0004111551740000047
After that, verify->
Figure BDA0004111551740000048
Whether or not equal to->
Figure BDA0004111551740000049
If equal, user U j And link point->
Figure BDA00041115517400000410
Completing secret handshake; if the verification is not equal, the handshake fails.
In one embodiment, the blockchain node CN i A block data pool, a block database and a hash confirmation list are established locally; the local area block data pool stores the block hash value which does not reach the consensus, the local area block database stores the block hash which reaches the consensus, and the hash confirmation list stores the confirmation number of each block hash; the DAG consensus process for a block includes:
block chain node CN i Every time a block is packed, the hash value of the block is stored in a local block data pool, and a node CN is added in a local hash acknowledgement list i The validation node hashed for the block and initializing a hash list comprising the hash value of the block and the node CN i Identity of (2)
Figure BDA00041115517400000411
The hash list is packaged into a block header as consensus information; the complete block is broadcast to all block links through a point-to-point network;
block chain node CN i After receiving the block, updating the local block data pool and the hash confirmation list according to the consensus information in the block head, specifically: if a new block is received, the block hash in the consensus information is stored in a local block data pool, and a node CN is added in a local hash confirmation list i A validation node hashed for the block; when the local hash confirmation list contains the block hash confirmationThe number of nodes is greater than or equal to
Figure BDA00041115517400000412
Then the block hash is stored into the local block database and deleted in the block data pool and hash validation list;
the blocks stored in the local block database are identified, and the blocks in the block database form a DAG block chain according to the link relation.
In one embodiment, the symmetric encryption algorithm comprises the AES-CCM algorithm, using the handshake message at the time of the secret handshake as a key, i.e. in steps S12 and S13, the secret handshake is used
Figure BDA00041115517400000413
As a shared key->
Figure BDA00041115517400000414
In one embodiment, a digital signature is used to verify the validity of a user transaction; user U j Generating a transfer transaction
Figure BDA0004111551740000051
Including timestamp, transaction type, transfer amount, target user identity, and user U j Signing the transaction content; user U j Executing secret handshake protocol with neighbor nodes in point-to-point network to obtain shared key +.>
Figure BDA0004111551740000052
Encryption of transactions using symmetric encryption algorithm>
Figure BDA0004111551740000053
Obtain encrypted transaction->
Figure BDA0004111551740000054
User U j To the management node GA belonging to the same group k Neighbor blockchain node->
Figure BDA0004111551740000055
Send encrypted transaction->
Figure BDA0004111551740000056
Block chain node->
Figure BDA0004111551740000057
Receiving user U j Is (are) encrypted transaction->
Figure BDA0004111551740000058
Use of symmetric decryption algorithm and shared key +.>
Figure BDA0004111551740000059
Decryption->
Figure BDA00041115517400000510
Obtaining user U j Transaction->
Figure BDA00041115517400000511
Then blockchain node->
Figure BDA00041115517400000512
Verifying user transaction +_ according to the following blockchain verification rules>
Figure BDA00041115517400000513
Is effective in (3):
checking whether the transaction signature is valid, if so, continuing checking as follows;
if the user transacts
Figure BDA00041115517400000514
If the transaction type is a transfer transaction, checking whether the transfer amount is non-negative, if so, continuing checking as follows, if not, then the transaction +.>
Figure BDA00041115517400000515
Invalidating;
checking user U j Whether or not the blockchain account balance isIf the transaction amount is greater than or equal to the transfer amount, continuing to check if the transaction amount is greater than or equal to the transfer amount, otherwise, performing the transaction
Figure BDA00041115517400000516
Invalidating;
checking whether the target user is the current blockchain user, if so, the transaction
Figure BDA00041115517400000517
If not, the transaction is +.>
Figure BDA00041115517400000518
And (3) invalidating.
In one embodiment, verifying that each user transaction in the block is valid is employed to verify that the block is valid; in step S43, the blockchain node CN i After obtaining the block encryption key, decrypt the block to obtain t B A decrypted user transaction, if t B The block is valid if the individual user transactions are valid, otherwise the block is invalid.
Compared with the prior art, the beneficial effects are that: according to the block chain slicing method based on secret handshake, the sliced block chain is naturally formed through the secret handshake technology, and the user and the block chain node only know the slicing information of the user, so that the information of other slices is hidden, and the privacy of the slices is improved; in addition, due to the inherent relationship of the DAG graph, the blocks in the slice can be confirmed by all the block chain nodes, so that the consensus speed of the blocks in the slice is improved.
Drawings
FIG. 1 is a schematic diagram of a user and blockchain node of the present invention registering with a management node.
FIG. 2 is a schematic diagram of the sliced blockchain formation of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. The invention is described in one of its examples in connection with the following detailed description. Wherein the drawings are for illustrative purposes only and are shown in schematic, non-physical, and not intended to be limiting of the present patent; for the purpose of better illustrating embodiments of the invention, certain elements of the drawings may be omitted, enlarged or reduced and do not represent the size of the actual product; it will be appreciated by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
Example l:
a block chain fragmentation method based on secret handshake comprises three entities of a block chain node CN, a user U for transmitting transaction and a group management node GA, wherein an effective point-to-point network exists between the block chain node and the user, and a safety channel exists between the block chain node and the user and the management node; wherein, the number of the block chain nodes is n, the number of users is l, the number of GA is m, n and l are natural numbers; block chain node CN i And user U j Through the secure channel to GA k Registration to obtain GA respectively k Is a credential of (2)
Figure BDA0004111551740000061
And
Figure BDA0004111551740000062
wherein i is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to l, and k is more than or equal to 1 and less than or equal to m; the method comprises the following steps:
step 1, a user executes a secret handshake protocol with a neighbor node in a point-to-point network, and sends encrypted transactions; the step Sl specifically comprises:
s11, setting the user as U j The user points to a neighbor blockchain node in a point-to-point networkSend handshake message->
Figure BDA0004111551740000064
S12, user U j Neighboring block link points of (a)
Figure BDA0004111551740000065
Return handshake message->
Figure BDA0004111551740000066
S13, user U j With the management node GA belonging to the same group k Neighboring block link points of (a)
Figure BDA0004111551740000067
Generating a shared key
Figure BDA0004111551740000068
S14, using the shared key
Figure BDA0004111551740000069
And secure symmetric encryption algorithm encryption transaction +_>
Figure BDA00041115517400000610
Obtaining encrypted transactions
Figure BDA00041115517400000611
S15, user U j To the management node GA belonging to the same group k Neighboring block link points of (a)
Figure BDA00041115517400000612
Send encrypted transaction->
Figure BDA00041115517400000613
Step 2, the blockchain node re-encrypts and forwards the effective transaction of the user, and packages the effective transaction; the step S2 specifically comprises the following steps:
s21, block chain node
Figure BDA00041115517400000614
Receiving user U j Is (are) encrypted transaction->
Figure BDA00041115517400000615
Use of symmetric decryption algorithm and shared key +.>
Figure BDA00041115517400000616
Decryption->
Figure BDA00041115517400000617
Obtaining user U j Transaction->
Figure BDA00041115517400000618
S22, block chain node
Figure BDA00041115517400000619
Verifying user transactions according to the verification rules of the blockchain>
Figure BDA00041115517400000620
If the transaction is valid
Figure BDA00041115517400000621
If not, stopping processing, otherwise, judging that the user transaction is valid;
s23, block chain node
Figure BDA0004111551740000071
If no valid user transaction has been forwarded +.>
Figure BDA0004111551740000072
Then->
Figure BDA0004111551740000073
Performing a secret handshake protocol by neighboring blockchain nodes of (a) and encrypting user transactions using a shared key generated by the secret handshake protocol>
Figure BDA0004111551740000074
Forwarding the re-encrypted user valid transaction; wherein the process of performing a secret handshake between blockchain nodes is comparable to the process of performing a secret handshake between a user and a blockchain pointSee also steps S11 to S14; in addition, after establishing a secret handshake, the block link points belonging to the same group of management nodes can re-encrypt a plurality of effective user transactions by using a shared key generated by the secret handshake, and a secret handshake protocol does not need to be executed for each user transaction;
s24, block chain node
Figure BDA0004111551740000075
Generating a block encryption key for block B>
Figure BDA0004111551740000076
The key is used whenever an effective user transaction is obtained>
Figure BDA0004111551740000077
And encrypting the user transaction by a secure symmetric encryption algorithm, and packaging the encrypted user transaction into a block B.
Step 3, the block chain node issues blocks, participates in DAG consensus of the directed acyclic graph, and updates the DAG block chain; the step S3 specifically comprises the following steps:
s31, setting a system threshold t B When the blockchain node CN i The number of encrypted transactions packed in a block exceeds the system threshold t B Thereafter, the blockchain node CN i Setting a block header comprising a blockchain node CN i The handshake message of (1), the link of the two recent blocks in the current DAG chain, and the consensus information, then broadcasting the complete block to all block links through a point-to-point network; the handshake message in the step has the same meaning as the handshake message in the step S11, and is the first message of the secret handshake protocol;
s32, block chain node CN i After receiving the block, the DAG consensus process is completed according to the consensus information of the block head, and the DAG block chain is updated.
Step 4, when a new agreed block appears in the DAG chain, the block chain node and the generator of the block execute a secret handshake protocol to update the sliced block chain; the step S4 specifically comprises the following steps:
s41. New blocks for consensus in DAG chainsBlockchain node CN i If the new block is detected not to be generated by the user, the handshake information of the block head is adopted, and a secret handshake message is sent to a generator of the new block; the secret handshake message sent to the new block generator in the step has the same meaning as the handshake message in the step S12, and is the second message of secret handshake;
s42, after receiving the secret handshake message, the generating party of the new block generates a shared secret key if the requesting party and the requesting party belong to the same group of management nodes, returns a block encryption key encrypted by the shared secret key and a safe symmetric encryption algorithm, and otherwise, stops processing; the shared secret key in the step has the same meaning as the shared secret key in the step S13, and is generated by a secret handshake protocol;
s43, block chain node CN i After obtaining the block encryption key, decrypting and verifying the validity of the block, if the block is valid, updating the block chain of the block, namely adding the decrypted plaintext block PB into the local block chain, otherwise, stopping processing.
In embodiment 1, the consensus method of the DAG chain, the specific implementation of the secret handshake protocol, the symmetric encryption algorithm adopted, the method of verifying the validity of the user transaction, the method of verifying the validity of the block, and the like are not specified.
Example 2
This embodiment employs a bilinear pair-based secret handshake scheme as proposed by Dirk Balfanz et al in published 2003 paper Secret Handshakes from Pairing-Based KeyAgreements.
Management node GA k Creating group G k ,G k ,G k ' are cyclic groups of order large prime number q, defining a bilinear map e: g k ×G k →G k ' for all a, b ε Z q ,P,Q∈G k Satisfy e (aP, bQ) =e (P, Q) ab . Defining a hash function H 1 And H 2 Wherein H is 1 :{0,1} * →G k ,H 2 Is a SHA-1 function.
If there is a new blockchain node CN i Or user U j Adding fragment k, GA k To which credentials are assigned
Figure BDA0004111551740000081
And->
Figure BDA0004111551740000082
Figure BDA0004111551740000083
Including group identity->
Figure BDA0004111551740000084
And group secret information->
Figure BDA0004111551740000085
Figure BDA0004111551740000086
Including group identity->
Figure BDA0004111551740000087
And group secret information
Figure BDA0004111551740000088
When a node within a slice is to be removed, GAk broadcasts the group identity of the node to other nodes within the slice and alerts the node within the slice to not handshake with the node.
User U j Neighbor blockchain nodes in a sum-point-to-point network
Figure BDA0004111551740000089
The secret handshake process is:
(1) User U j Generating and broadcasting handshake transactions
Figure BDA00041115517400000810
(2) Neighbor blockchain nodes
Figure BDA00041115517400000811
Receive->
Figure BDA00041115517400000812
After that, the own group identity is +.>
Figure BDA00041115517400000813
And random number->
Figure BDA00041115517400000814
To the user U j
(3) User U j Reception of
Figure BDA00041115517400000815
And->
Figure BDA00041115517400000816
After that, respond to own group identity +.>
Figure BDA00041115517400000817
Random number->
Figure BDA00041115517400000818
And message, < >>
Figure BDA00041115517400000819
Wherein (1)>
Figure BDA00041115517400000820
(4) Neighbor blockchain nodes
Figure BDA00041115517400000821
After receiving the user response, generating
Figure BDA00041115517400000822
Verification->
Figure BDA00041115517400000823
Whether or not to be equal to
Figure BDA00041115517400000824
If equal, respond to the message->
Figure BDA00041115517400000825
If the verification is unequal, the response is not performed;
(5) User U j Received by
Figure BDA00041115517400000826
After that, verify->
Figure BDA00041115517400000827
Whether or not equal to->
Figure BDA00041115517400000828
If equal, user U j And link point->
Figure BDA00041115517400000829
The secret handshake is completed. If the verification is not equal, the handshake fails.
Example 3
An implementation of DAG consensus will be specified in this embodiment. Block chain node CN i A block data pool, a block database and a hash acknowledgement list are established locally. The local block data pool stores block hash values which do not reach consensus, the local block database stores block hashes which reach consensus, and the hash confirmation list stores the confirmation number of each block hash. In this embodiment, a SHA256 hash function is used.
The common identification process of the block is as follows:
(1) Block chain node CN i Every time a block is packed, the hash value of the block is stored in a local block data pool, and a node CN is added in a local hash acknowledgement list i The validation node hashed for the block. And initializing a hash list including the hash value of the block and the node CN i Identity of (2)
Figure BDA0004111551740000091
The hash list is encapsulated as consensus information into the block header. Complete block link point broadcast to all blocks over a point-to-point network。
(2) Block chain node CN i After receiving the block, updating the local block data pool and the hash confirmation list according to the consensus information in the block head, specifically: if a new block is received, the block hash in the consensus information is stored in a local block data pool, and a node CN is added in a local hash confirmation list i The validation node hashed for the block. When the number of the confirmation nodes with block hashes in the local hash confirmation list is greater than or equal to
Figure BDA0004111551740000092
The chunk is hashed into a local chunk database and deleted in the chunk data pool and hash validation list.
The blocks stored in the local block database are identified, and the blocks in the block database form a DAG block chain according to the link relation.
Example 4
In this embodiment, the symmetric encryption algorithm used in the present invention is designated as the AES-CCM algorithm given in RFC6655, and handshake messages at the time of secret handshake are used as keys, i.e., in embodiment 1, in steps S12 and S13, the data is encrypted
Figure BDA0004111551740000093
As a shared key->
Figure BDA0004111551740000094
Example 5
In step S22 in embodiment 1, different user transaction validity checks are required according to the user transaction type. In this embodiment, ECDSA digital signature is used.
User U j Generating a transfer transaction
Figure BDA0004111551740000095
Including timestamp, transaction type, transfer amount, target user identity, and user U j Signature of transaction content. User U j Executing with neighbor nodes in a point-to-point networkSecret handshake protocol, obtaining shared key->
Figure BDA0004111551740000096
Encryption of transactions using symmetric encryption algorithm>
Figure BDA0004111551740000097
Obtain encrypted transaction->
Figure BDA0004111551740000098
User U j To the management node GA belonging to the same group k Neighbor blockchain node->
Figure BDA0004111551740000099
Send encrypted transaction->
Figure BDA0004111551740000101
Block chain node->
Figure BDA0004111551740000102
Receiving user U j Is (are) encrypted transaction->
Figure BDA0004111551740000103
Use of symmetric decryption algorithm and shared key +.>
Figure BDA0004111551740000104
Decryption->
Figure BDA0004111551740000105
Obtaining user U j Transaction->
Figure BDA0004111551740000106
Block link points
Figure BDA0004111551740000107
Verifying user transaction +_ according to the following blockchain verification rules>
Figure BDA0004111551740000108
Is provided withThe effectiveness is as follows:
(1) Checking whether the transaction signature is valid, if so, continuing checking as follows;
(2) If the user transacts
Figure BDA0004111551740000109
If the transaction type is a transfer transaction, checking whether the transfer amount is non-negative, if so, continuing checking as follows, if not, then the transaction +.>
Figure BDA00041115517400001010
Invalidating;
(3) Checking user U j Whether the blockchain account balance is greater than or equal to the transfer amount, if so, continuing to check if not, and if not, the transaction
Figure BDA00041115517400001011
Invalidating;
(4) Checking whether the target user is the current blockchain user, if so, the transaction
Figure BDA00041115517400001012
If not, the transaction
Figure BDA00041115517400001013
And (3) invalidating.
Example 6
In this embodiment, each user transaction in the block is validated to verify that the block is valid.
In step S43 of this embodiment 1, the blockchain node CN i After obtaining the block encryption key, decrypt the block to obtain t B A decrypted user transaction, if t B The block is valid if the individual user transactions are valid, otherwise the block is invalid.
It is to be understood that the above examples of the present invention are provided by way of illustration only and not by way of limitation of the embodiments of the present invention. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. It is not necessary here nor is it exhaustive of all embodiments. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the invention are desired to be protected by the following claims.

Claims (10)

1. A block chain fragmentation method based on secret handshake is characterized by comprising three entities, namely a block chain node CN, a user U for transmitting transaction and a group management node GA, wherein an effective point-to-point network exists between the block chain node and the user, and a safety channel exists between the block chain node and the user and the management node; wherein, the number of the block chain nodes is n, the number of users is l, the number of GA is m, n and l are natural numbers; block chain node CN i And user U j Through the secure channel to GA k Registration to obtain GA respectively k Is a credential of (2)
Figure FDA0004111551730000011
And->
Figure FDA0004111551730000012
Wherein i is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to l, and k is more than or equal to 1 and less than or equal to m; the method comprises the following steps:
s1, a user executes a secret handshake protocol with a neighbor node in a point-to-point network, and sends encrypted transactions;
s2, re-encrypting and forwarding effective transactions of users by the blockchain nodes, and packaging the effective transactions;
s3, the block chain nodes issue blocks to participate in DAG consensus of the directed acyclic graph, and update DAG block chains;
s4, when a new agreed block appears in the DAG chain, the block chain node and a generator of the block execute a secret handshake protocol, and the block chain is updated.
2. The blockchain slicing method based on secret handshake of claim 1, wherein the step S1 specifically includes:
s11, setting the user as U j The user points to a neighbor blockchain node in a point-to-point network
Figure FDA0004111551730000013
Sending handshake messages
Figure FDA0004111551730000014
S12, user U j Neighboring block link points of (a)
Figure FDA0004111551730000015
Return handshake message->
Figure FDA0004111551730000016
S13, user U j With the management node GA belonging to the same group k Neighboring block link points of (a)
Figure FDA0004111551730000017
Generating a shared key
Figure FDA0004111551730000018
S14, using the shared key
Figure FDA0004111551730000019
And secure symmetric encryption algorithm encryption transaction +_>
Figure FDA00041115517300000110
Obtaining encrypted transactions
Figure FDA00041115517300000111
S15, user U j To the management node GA belonging to the same group k Neighboring block link points of (a)
Figure FDA00041115517300000112
Send encrypted transaction->
Figure FDA00041115517300000113
3. The blockchain slicing method based on secret handshake according to claim 2, wherein the step S2 specifically includes:
s21, block chain node
Figure FDA00041115517300000114
Receiving user U j Is (are) encrypted transaction->
Figure FDA00041115517300000115
Use of symmetric decryption algorithm and shared key +.>
Figure FDA00041115517300000116
Decryption->
Figure FDA00041115517300000117
Obtaining user U j Transaction->
Figure FDA00041115517300000118
S22, block chain node
Figure FDA00041115517300000119
Verifying user transactions according to the verification rules of the blockchain>
Figure FDA00041115517300000120
Is to be used if trade +>
Figure FDA0004111551730000021
If not, stopping processing, otherwise, judging that the user transaction is valid;
s23, block chain node
Figure FDA0004111551730000022
If no valid user transaction has been forwarded +.>
Figure FDA0004111551730000023
Then->
Figure FDA0004111551730000024
Performing a secret handshake protocol by neighboring blockchain nodes of (a) and encrypting user transactions using a shared key generated by the secret handshake protocol>
Figure FDA0004111551730000025
Forwarding the re-encrypted user valid transaction;
s24, block chain node
Figure FDA0004111551730000026
Generating a block encryption key for block B>
Figure FDA0004111551730000027
The key is used whenever an effective user transaction is obtained>
Figure FDA0004111551730000028
And encrypting the user transaction by a secure symmetric encryption algorithm, and packaging the encrypted user transaction into a block B.
4. The blockchain slicing method based on secret handshaking as in claim 3, wherein step S3 specifically includes:
s31, setting a system threshold t B When the blockchain node CN i The number of encrypted transactions packed in a block exceeds the system threshold t B Thereafter, the blockchain node CN i Setting a block header comprising a blockchain node CN i The handshake message of (1), the link of the two recent blocks in the current DAG chain, and the consensus information, then broadcasting the complete block to all block links through a point-to-point network; the handshake message in this step has the meaning of the handshake message in step S11The same, the first message of the secret handshake protocol;
s32, block chain node CN i After receiving the block, the DAG consensus process is completed according to the consensus information of the block head, and the DAG block chain is updated.
5. The blockchain slicing method based on secret handshaking of claim 4, wherein step S4 specifically includes:
s41, for new blocks with consensus in DAG chain, blockchain node CN i If the new block is detected not to be generated by the user, the handshake information of the block head is adopted, and a secret handshake message is sent to a generator of the new block; the secret handshake message sent to the new block generator in the step has the same meaning as the handshake message in the step S12, and is the second message of secret handshake;
s42, after receiving the secret handshake message, the generating party of the new block generates a shared secret key if the requesting party and the requesting party belong to the same group of management nodes, returns a block encryption key encrypted by the shared secret key and a safe symmetric encryption algorithm, and otherwise, stops processing; the shared secret key in the step has the same meaning as the shared secret key in the step S13, and is generated by a secret handshake protocol;
s43, block chain node CN i After obtaining the block encryption key, decrypting and verifying the validity of the block, if the block is valid, updating the block chain of the block, namely adding the decrypted plaintext block PB into the local block chain, otherwise, stopping processing.
6. The secret handshake-based blockchain slicing method of any of claims 1-5, wherein the management node GA k Creating group G k ,G k ,G k′ Are all cyclic groups with the order of large prime number q, and define bilinear mapping e: G k ×G k →G k′ For all a, b ε Z q ,P,Q∈G k Satisfy e (aP, bQ) =e (P, Q) ab The method comprises the steps of carrying out a first treatment on the surface of the Defining a hash function H 1 And H 2 Wherein H is 1 :{0,1} * →G k ,H 2 Is a SHA-1 function;
if there is a new blockchain node CN i Or user U j Adding fragment k, GA k To which credentials are assigned
Figure FDA0004111551730000031
And->
Figure FDA0004111551730000032
Figure FDA0004111551730000033
Including group identity->
Figure FDA0004111551730000034
And group secret information->
Figure FDA0004111551730000035
Figure FDA0004111551730000036
Including group identity->
Figure FDA0004111551730000037
And group secret information
Figure FDA0004111551730000038
When a node within a slice is to be removed, the GA k Broadcasting the group identity of the node to other nodes in the segment, and warning the node in the segment not to handshake with the node;
wherein, user U j Neighbor blockchain nodes in a sum-point-to-point network
Figure FDA0004111551730000039
The secret handshake procedure includes:
user U j Generating and broadcasting handshake transactions
Figure FDA00041115517300000310
Neighbor blockchain nodes
Figure FDA00041115517300000311
Receive->
Figure FDA00041115517300000312
After that, the own group identity is +.>
Figure FDA00041115517300000313
And random number->
Figure FDA00041115517300000314
To the user U j
User U j Reception of
Figure FDA00041115517300000315
And->
Figure FDA00041115517300000316
After that, respond to own group identity +.>
Figure FDA00041115517300000317
Random number->
Figure FDA00041115517300000318
And message->
Figure FDA00041115517300000319
Wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure FDA00041115517300000320
neighbor blockchain nodes
Figure FDA00041115517300000321
After receiving the user response, generating
Figure FDA00041115517300000322
Verification->
Figure FDA00041115517300000323
Whether or not to be equal to
Figure FDA00041115517300000324
If equal, respond to the message->
Figure FDA00041115517300000325
If the verification is unequal, the response is not performed;
user U j Received by
Figure FDA00041115517300000326
After that, verify->
Figure FDA00041115517300000327
Whether or not equal to->
Figure FDA00041115517300000328
If equal, user U j And link point->
Figure FDA00041115517300000329
Completing secret handshake; if the verification is not equal, the handshake fails.
7. The secret handshake-based blockchain sharding method of any of claims 1 to 5, wherein a blockchain node CN i A block data pool, a block database and a hash confirmation list are established locally; the local area block data pool stores the block hash value which does not reach the consensus, the local area block database stores the block hash which reaches the consensus, and the hash confirmation list stores the confirmation number of each block hash; the DAG consensus process for a block includes:
block chain node CN i Each time a block is packed, the block is packedThe hash value is stored in the local block data pool, and the node CN is added in the local hash confirmation list i The validation node hashed for the block and initializing a hash list comprising the hash value of the block and the node CN i Identity of (2)
Figure FDA0004111551730000041
The hash list is packaged into a block header as consensus information; the complete block is broadcast to all block links through a point-to-point network;
block chain node CN i After receiving the block, updating the local block data pool and the hash confirmation list according to the consensus information in the block head, specifically: if a new block is received, the block hash in the consensus information is stored in a local block data pool, and a node CN is added in a local hash confirmation list i A validation node hashed for the block; when the number of the confirmation nodes with block hashes in the local hash confirmation list is greater than or equal to
Figure FDA0004111551730000042
Then the block hash is stored into the local block database and deleted in the block data pool and hash validation list;
the blocks stored in the local block database are identified, and the blocks in the block database form a DAG block chain according to the link relation.
8. The secret handshake-based blockchain slicing method of any of claims 2-5, wherein the symmetric encryption algorithm comprises an AES-CCM algorithm using handshake messages at the time of secret handshake as keys, i.e. in steps S12 and S13, the secret handshake is to be used as a key
Figure FDA0004111551730000043
As a shared key->
Figure FDA0004111551730000044
9. A blockchain fragmenting method based on secret handshaking according to any claim 3 to 5, characterised in that in step S22 the validity of the user transaction is verified with a digital signature; user U j Generating a transfer transaction
Figure FDA0004111551730000045
Including timestamp, transaction type, transfer amount, target user identity, and user U j Signing the transaction content; user U j Executing secret handshake protocol with neighbor nodes in point-to-point network to obtain shared key +.>
Figure FDA0004111551730000046
Encryption of transactions using symmetric encryption algorithm>
Figure FDA0004111551730000047
Obtain encrypted transaction->
Figure FDA0004111551730000048
User U j To the management node GA belonging to the same group k Neighbor blockchain node->
Figure FDA0004111551730000049
Sending encrypted transactions
Figure FDA00041115517300000410
Block chain node->
Figure FDA00041115517300000411
Receiving user U j Is (are) encrypted transaction->
Figure FDA00041115517300000412
Use of symmetric decryption algorithm and shared key +.>
Figure FDA00041115517300000413
Decryption
Figure FDA00041115517300000414
Obtaining user U j Transaction->
Figure FDA00041115517300000415
Then blockchain node->
Figure FDA00041115517300000416
Validating user transactions according to validation rules of a blockchain
Figure FDA00041115517300000417
Is effective in (3):
checking whether the transaction signature is valid, if so, continuing checking as follows;
if the user transacts
Figure FDA00041115517300000418
If the transaction type is a transfer transaction, checking whether the transfer amount is non-negative, if so, continuing checking as follows, if not, then the transaction +.>
Figure FDA00041115517300000419
Invalidating;
checking user U j Whether the blockchain account balance is greater than or equal to the transfer amount, if so, continuing to check if not, and if not, the transaction
Figure FDA00041115517300000420
Invalidating;
checking whether the target user is the current blockchain user, if so, the transaction
Figure FDA00041115517300000421
If not, the transaction is +.>
Figure FDA00041115517300000422
And (3) invalidating.
10. The secret handshake-based blockchain sharding method of claim 5 wherein,
verifying the block validity using each user transaction validity in the verification block; in step S43, the blockchain node CN i After obtaining the block encryption key, decrypt the block to obtain t B A decrypted user transaction, if t B The block is valid if the individual user transactions are valid, otherwise the block is invalid.
CN202310207773.6A 2023-03-06 2023-03-06 Block chain slicing method based on secret handshake Pending CN116436636A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310207773.6A CN116436636A (en) 2023-03-06 2023-03-06 Block chain slicing method based on secret handshake

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310207773.6A CN116436636A (en) 2023-03-06 2023-03-06 Block chain slicing method based on secret handshake

Publications (1)

Publication Number Publication Date
CN116436636A true CN116436636A (en) 2023-07-14

Family

ID=87089784

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310207773.6A Pending CN116436636A (en) 2023-03-06 2023-03-06 Block chain slicing method based on secret handshake

Country Status (1)

Country Link
CN (1) CN116436636A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116743377A (en) * 2023-08-09 2023-09-12 腾讯科技(深圳)有限公司 Data processing method, device, equipment and storage medium based on blockchain key

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116743377A (en) * 2023-08-09 2023-09-12 腾讯科技(深圳)有限公司 Data processing method, device, equipment and storage medium based on blockchain key
CN116743377B (en) * 2023-08-09 2023-11-03 腾讯科技(深圳)有限公司 Data processing method, device, equipment and storage medium based on blockchain key

Similar Documents

Publication Publication Date Title
US11323276B2 (en) Mutual authentication of confidential communication
EP2533460B1 (en) Digital signatures with implicit certificate chains
US11914754B2 (en) Cryptographic method for verifying data
US11870891B2 (en) Certificateless public key encryption using pairings
CN111614621B (en) Internet of things communication method and system
JP2004515117A (en) Encrypted data security system and method
JP2007049708A (en) System and method for updating keys used for public key cryptography
JPH1041932A (en) Ciphering key recovery method and equipment
US11956367B2 (en) Cryptographic method for verifying data
CN111416712B (en) Quantum secret communication identity authentication system and method based on multiple mobile devices
CN106657002A (en) Novel crash-proof base correlation time multi-password identity authentication method
CN116436636A (en) Block chain slicing method based on secret handshake
CN114726583A (en) Trusted hardware cross-chain transaction privacy protection system and method based on block chain distributed identification
CN111245611B (en) Anti-quantum computation identity authentication method and system based on secret sharing and wearable equipment
US20220038267A1 (en) Methods and devices for secured identity-based encryption systems with two trusted centers
Chen et al. Provable secure group key establishment scheme for fog computing
Kwon et al. Certificate transparency with enhanced privacy
CN111526131B (en) Anti-quantum-computation electronic official document transmission method and system based on secret sharing and quantum communication service station
CN110572257B (en) Identity-based data source identification method and system
Singh et al. Pseudo-identity based secure communication scheme for vehicular ad-hoc networks
US20240160792A1 (en) Cryptographic method for verifying data
US20240089240A1 (en) Cryptographic method for verifying data
CN118018211A (en) Trusted distributed digital identity authentication method and system
CN117202191A (en) Access authentication method between quantum security boundary base stations
CN117896061A (en) Encryption communication method for Internet of things equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination