A detection method and system for blockchain system
By implementing multiple tests in the blockchain system to ensure the compliance of identity management, on-chain transactions, off-chain transactions, ledger storage, communication security, consensus mechanism and privacy protection, it solves the problem of transaction processing efficiency of the blockchain system. and security deficiencies, enabling a more efficient and secure transaction process.
Patent Information
- Application Number
- CN202410822828.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-06-25
AI Technical Summary
Blockchain systems have deficiencies in transaction processing efficiency and security, especially in Internet environments with limited resources, and lack of effective key management and private data protection measures, resulting in slow transaction processes and high risks of private data leakage.
Propose a detection method and system for the blockchain system, which ensures that all parties can use identity management detection, on-chain transaction detection, off-chain transaction detection, ledger storage detection, communication security detection, consensus mechanism detection, smart contract detection and privacy protection detection. Only after passing the test can the system test be passed. Including account creation, real-name authentication, identification and authorization, transaction creation, identity authentication, password hash algorithm, encrypted storage, information encryption, user identity authentication, information encryption, counter-attack, smart contract deployment and password protection technology and many other tests to ensure System security and compliance.
It improves the transaction processing efficiency and security of the blockchain system, prevents key leaks and private data leaks, ensures that sensitive account data is not accessed without authorization, provides a secure network environment, and enhances the security of keys and transactions. reliability.
Smart Images

Figure CN118378310B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of random number detection, and in particular to a detection method and system for a blockchain system. Background Art
[0002] Blockchain technology includes cryptography technology, smart contract technology, etc. It is essentially a decentralized database that uses cryptography to link blocks of data to form a block chain data structure. Each data block contains a batch of Bitcoin network transaction information, which is used to verify the validity of its information and generate the next block. Compared with traditional centralized technology, blockchain has no advantages in data transmission, processing and storage. For example, if the system transaction volume per unit time exceeds the carrying capacity of the software and hardware network environment, or exceeds the performance of the weakest node in processing capacity, the related transactions will be similar to the message processing system to generate a backlog queue, causing users to experience slow processing. Therefore, in addition to ensuring the security of the transaction process, blockchain technology also needs to improve the efficiency of transaction processing. Under the current situation of limited resources, especially Internet bandwidth, if high-time transaction behaviors rely entirely on blockchain data storage technology, good customer experience will not be achieved. On the other hand, the transaction process of blockchain must be coordinated with cryptography technology. The cryptographic means used in blockchain need to be coordinated with efficient key management protocols. Effective key encryption methods ensure the efficiency and security of the transaction processing process.
[0003] As a development technology, the application structure of blockchain is complex and large-scale, and faces many problems. The conventional detection method is to detect the correctness of cryptographic operations and the compliance of key management; there are no detection measures for key security issues, information on the blockchain, and login identity management. The information on the blockchain is open and transparent to all participants. Most of this information is private data processed by the participant's key. Once the participant's key is leaked, the corresponding private data will be leaked, which will cause irreparable losses to the participant.
[0004] In this regard, the present application proposes a detection method and system for a blockchain system. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a detection method and system for a blockchain system.
[0006] A detection method for a blockchain system,
[0007] In the blockchain system, identity management detection, on-chain transaction detection, off-chain transaction detection, ledger storage detection, communication security detection, consensus mechanism detection, smart contract detection and privacy protection detection are carried out in the preset order. If any of the detections fails, the blockchain system fails the detection.
[0008] The identity management test includes: account creation test, real-name authentication test, identification and authorization test;
[0009] The on-chain transaction detection includes: transaction creation detection and transaction verification detection;
[0010] The off-chain transaction detection includes: identity authentication mechanism detection and simulated transaction detection;
[0011] The account book storage detection includes: cryptographic hash algorithm detection, integrity detection, encrypted storage detection, and access mechanism detection;
[0012] The communication security detection includes: endpoint communication detection and node communication detection;
[0013] The consensus mechanism detection includes: user identity authentication, information encryption detection, security description detection and anti-attack detection;
[0014] The smart contract detection includes: user deployment detection and contract tampering detection;
[0015] The privacy protection detection includes: password protection technology detection and effective protection detection.
[0016] Furthermore, in the identity management detection,
[0017] The account creation test includes support test, dependency test and private key test. If any test fails, a warning is output;
[0018] The real-name authentication test includes:
[0019] Check whether the blockchain uses digital certificate technology to identify the legitimacy and validity of user identities;
[0020] If digital certificate technology is not used, a warning is output;
[0021] If the legitimacy and validity of the user's identity are not verified, a warning is output;
[0022] The identification and authorization detection includes:
[0023] Simulate the transaction process and authenticate the user's identity. The authentication includes authentication of the user's identity and authentication of the node's identity. If the authentication of the user's identity is unsuccessful, a warning is output.
[0024] Simulate the node admission process and perform authorization detection on the node; the authorization includes legal node authorization and illegal node authorization;
[0025] If illegal authorization is performed on an illegal node, a warning is output;
[0026] If any of the account creation test, real-name authentication test, and identification and authorization test in the identity management test outputs a warning, the identity management test fails.
[0027] Further in the on-chain transaction detection,
[0028] The transaction creation test includes: signature verification test, information protection test, packaging test, Merkel number test and nonce value test. If any test fails, a warning is output;
[0029] The transaction verification test includes:
[0030] Simulate the transaction process on the chain, and perform signature record detection, signature verification detection, and replay record detection on the transaction process;
[0031] If any test fails, a warning is output;
[0032] If any of the transaction creation test and transaction verification test in the on-chain transaction test outputs a warning, the on-chain transaction test fails.
[0033] Furthermore, in the off-chain transaction detection,
[0034] The identity authentication mechanism detection includes: mechanism existence detection, forged identity detection and identity authentication detection, wherein:
[0035] The mechanism existence detection includes detecting whether the identity authentication mechanism is adopted in the blockchain system; if not adopted, a warning is output;
[0036] The forged identity detection includes using a forged identity to conduct off-chain transactions and detecting whether the identity authentication mechanism is capable of detecting the forged identity;
[0037] The identity authentication test includes detecting whether the identity authentication mechanism uses a message authentication code and a digital signature for dual authentication protection; the identity authentication test also includes detecting whether the digital signature corresponds to the real identity of the transaction party one by one;
[0038] If any test fails, a warning is output;
[0039] The simulated transaction detection includes: on-chain detection and transaction settlement detection;
[0040] The on-chain detection includes simulating the on-chain operation in the off-chain transaction to detect whether the blockchain can verify the validity of the unregistered transaction;
[0041] If the validity of any unregistered transaction is not verified, a warning is output;
[0042] The transaction settlement detection includes detecting whether there is a transaction settlement mechanism;
[0043] If it does not exist, a warning is output and the detection ends;
[0044] If any of the authentication mechanism test and simulated transaction test in the off-chain transaction test outputs a warning, the off-chain transaction test fails.
[0045] Furthermore, in the account book storage detection,
[0046] The cryptographic hash algorithm detection includes detecting whether the blockchain system adopts the SM3 algorithm;
[0047] If the SM3 algorithm is not used, a warning is output;
[0048] The integrity detection includes detecting whether the data of the block is complete; the block includes a hash value identification block and a connection adjacent block;
[0049] If the data in any block is incomplete, a warning is output;
[0050] The encrypted storage detection includes detecting whether the account book information is encrypted and stored using cryptographic technology;
[0051] If the storage is not encrypted, a warning is output;
[0052] The access mechanism detection includes detecting whether the authorized access to the account data adopts both identity authentication and access control measures;
[0053] If any of the mechanisms are not adopted, a warning is output;
[0054] Use authorized users to access and check whether the access is correct;
[0055] If it cannot be accessed correctly, a warning is output;
[0056] Use unauthorized users to access and check whether the access is correct;
[0057] If the access is correct, a warning is output;
[0058] If any of the tests in the ledger storage test, including the cryptographic hash algorithm test, integrity test, encrypted storage test, and access mechanism test, outputs a warning, the ledger storage test fails.
[0059] Furthermore, in the communication security detection,
[0060] The endpoint communication detection includes simulating the communication between the application end and the node, and detecting whether the cryptographic algorithm and the cryptographic protection protocol are used in the communication;
[0061] If any of the options are not adopted, a warning is output;
[0062] The node communication detection includes simulating the communication between nodes and detecting whether the cryptographic algorithm and cryptographic protocol are used in the communication between nodes;
[0063] If any of the options are not adopted, a warning is output;
[0064] If any of the endpoint communication detection and node communication detection in the communication security detection outputs a warning, the communication security detection fails.
[0065] Furthermore, in the detection of the consensus mechanism,
[0066] The user identity authentication includes identifying whether cryptographic technology is used in the consensus mechanism;
[0067] If not adopted, a warning is output;
[0068] Simulate the consensus mechanism execution process to detect whether the identity of the legitimate consensus user is successfully authenticated;
[0069] If the authentication fails, a warning is output;
[0070] Simulate the consensus mechanism execution process to detect whether the identity of illegal consensus users is successfully identified;
[0071] If the authentication fails, a warning is output;
[0072] The information encryption detection includes simulating the consensus mechanism execution process and detecting whether the sensitive information transmitted during the execution process is encrypted and protected;
[0073] If encryption protection is not performed, a warning is output;
[0074] Simulate the consensus mechanism execution process and detect whether the integrity of sensitive information transmitted during the execution process is verified;
[0075] If integrity check is not performed, a warning is output;
[0076] The security description detection detects whether there is a security description in the consensus mechanism;
[0077] If no safety instructions exist, a warning is output;
[0078] The counter-attack detection includes multiple attack detections; the attack detection includes Sybil attack, DoS attack and double-spending attack;
[0079] If any attack cannot be defended, a warning is output;
[0080] If any of the user identity authentication, information encryption detection, security description detection and anti-attack detection in the consensus mechanism detection outputs a warning, the consensus mechanism detection fails.
[0081] Furthermore, in the smart contract detection,
[0082] The user deployment detection includes deploying smart contracts using unauthorized users;
[0083] If the smart contract is deployed successfully, a warning is output;
[0084] Deploy smart contracts using authorized users;
[0085] If the deployment of the smart contract fails, a warning is output;
[0086] The contract tampering detection includes tampering with the smart contract during the smart contract deployment process;
[0087] If the blockchain system does not detect it, a warning will be output;
[0088] Tampering with smart contracts during the smart contract update process;
[0089] If the blockchain system does not detect it, a warning will be output;
[0090] Detect whether the tampered smart contract code can be successfully deployed;
[0091] If the smart contract is deployed successfully, a warning is output;
[0092] Check whether the smart contract code uses cryptographic protection technology;
[0093] If not adopted, a warning is output;
[0094] If any of the user deployment detection and contract tampering detection in the smart contract detection outputs a warning, the smart contract detection fails.
[0095] Furthermore, in the privacy protection detection,
[0096] The password protection technology detection includes identifying whether the blockchain system adopts password protection technology;
[0097] If not adopted, a warning is output;
[0098] The effective protection detection includes detecting whether the password protection technology is used to effectively protect the privacy information;
[0099] If the private information can be accessed by unauthorized users, it is not effectively protected and a warning is output;
[0100] If private information can only be accessed by authorized users and not by unauthorized users, it can be considered to be effectively protected;
[0101] If any of the tests in the password protection technology and effective protection test in the privacy protection test outputs a warning, the privacy protection test fails.
[0102] The present invention also provides a detection system for a blockchain system, including: an identity management detection module, an on-chain transaction detection module, an off-chain transaction detection module, an account storage detection module, a communication security detection module, a consensus mechanism detection module, a smart contract detection module, and a privacy protection detection module;
[0103] The identity management detection module is used to detect key management, identity authentication and identity authorization when and after the user creates an account to ensure the reliability of identity management;
[0104] The on-chain transaction detection module is used to simulate the creation process and transaction process of on-chain transactions to ensure the compliance of on-chain transaction management;
[0105] The off-chain transaction detection module is used to simulate the off-chain transaction process and use a forged identity to conduct transactions, so as to ensure that no unauthorized users conduct transactions during the transaction process and ensure the compliance of off-chain transaction management;
[0106] The account book storage detection module is used to detect whether the hash value identification block and the data connecting the adjacent blocks are complete, so as to ensure the integrity of the account storage information;
[0107] The communication security detection module is used to detect whether the two communications between the application end and the node, and between the nodes, adopt the cryptographic algorithm and the cryptographic protection protocol to ensure the effectiveness of the communication security;
[0108] The consensus mechanism detection module is used to detect whether sensitive information is encrypted and protected and integrity checked during the execution of the consensus mechanism to ensure the fairness of the consensus mechanism;
[0109] The smart contract detection module is used to detect whether the smart contract can be deployed or tampered with by unauthorized users to ensure the accuracy of the smart contract;
[0110] The privacy protection detection module is used to detect whether the privacy information is protected by password protection technology to ensure the strictness of privacy protection.
[0111] The present invention has the following advantages:
[0112] The present invention detects multiple modules of the blockchain system; currently, conventional cryptographic detection methods detect aspects such as the correctness of cryptographic operations and the compliance of key management, but do not detect aspects such as the blockchain's identity management, on-chain transactions, off-chain transactions, ledger storage, communication security, consensus mechanisms, smart contracts, and privacy protection.
[0113] The blockchain system method provided by the present invention is simple to operate, compact in structure, and reasonably designed, and provides a secure network environment for the information acquisition module. The key is encrypted by symmetric encryption and asymmetric encryption, thereby increasing the security of the key.
[0114] By checking the legitimacy of user identities and simulating legitimate or illegitimate nodes to check the security of ledger data in the blockchain system, we can ensure that sensitive account data will not be leaked.
[0115] By simulating the on-chain and off-chain transaction processes, various situations that may be encountered during the simulation transaction process are ensured to ensure the security and reliability of the transaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0116] Figure 1 A diagram of the steps of the method of the present invention. DETAILED DESCRIPTION
[0117] The present invention is further described below in conjunction with the accompanying drawings, but the protection scope of the present invention is not limited to the following description.
[0118] It should be noted that the directions or positional relationships indicated by "left", "right", etc. are based on the directions or positional relationships shown in the accompanying drawings, or are the directions or positional relationships in which the inventive product is usually placed when in use, or are the directions or positional relationships commonly understood by those skilled in the art. Such terms are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the present invention.
[0119] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features and technical solutions in the embodiments may be combined with each other.
[0120] Embodiment 1
[0121] like Figure 1 As shown, the present invention proposes a detection method for a blockchain system.
[0122] In the blockchain system, identity management detection, on-chain transaction detection, off-chain transaction detection, ledger storage detection, communication security detection, consensus mechanism detection, smart contract detection and privacy protection detection are carried out in the preset order. If any of the detections fails, the blockchain system fails the detection.
[0123] Identity management testing includes: account creation testing, real-name authentication testing, identification and authorization testing;
[0124] On-chain transaction detection includes: transaction creation detection and transaction verification detection;
[0125] Off-chain transaction detection includes: identity authentication mechanism detection and simulated transaction detection;
[0126] Ledger storage detection includes: cryptographic hash algorithm detection, integrity detection, encrypted storage detection, and access mechanism detection;
[0127] Communication security detection includes: endpoint communication detection and node communication detection;
[0128] Consensus mechanism detection includes: user identity authentication, information encryption detection, security description detection and anti-attack detection;
[0129] Smart contract detection includes: user deployment detection and contract tampering detection;
[0130] Privacy protection testing includes: password protection technology testing and effective protection testing.
[0131] The detection method also includes general detection, which includes cryptographic algorithm detection, random number detection, key management detection, certificate management detection and cryptographic component identification detection;
[0132] Cryptographic algorithm detection includes: symmetric cryptographic detection, asymmetric cryptographic detection and cryptographic hash algorithm detection;
[0133] Random number detection includes: random number source generator detection and random number randomness detection;
[0134] Key management detection includes: key type identification detection, ciphertext detection, key characteristic detection, split method detection, key authority detection and update detection;
[0135] Certificate management testing includes certificate validity testing and verification testing;
[0136] If any of the cryptographic algorithm test, random number test, key management test, certificate management test, and cryptographic component identification test in the general test fails, a warning is output.
[0137] S1. When conducting a test, first conduct a general test on the blockchain system;
[0138] S101: Perform cryptographic algorithm detection on the blockchain. Cryptographic algorithm detection can ensure the correct implementation of the cryptographic algorithm;
[0139] Cryptographic algorithm detection includes: symmetric cryptographic detection, asymmetric cryptographic detection and cryptographic hash algorithm detection;
[0140] Symmetric cipher detection: Symmetric cipher refers to the use of the same key in encryption and decryption. Symmetric cipher detection is to detect whether the encryption process has the SM4 algorithm. If not, a warning is output; if it has, the encrypted sample data is substituted for encryption and decryption and MAC calculation; after the calculation is completed, a calculation result is obtained; the result is checked, if the result is correct, the test is passed; if the result is wrong, a warning is output; the encrypted sample data includes: ECB mode, CBC mode, OFB mode, CFB mode, CTR mode;
[0141] Asymmetric cryptographic detection: Asymmetric keys use different keys for encryption and decryption. Generally, a public key and a private key are combined into a key pair. In a key pair, the public key is known to everyone, and the private key is known only to the user. The public key is encrypted through asymmetric encryption. If one of the keys is used to encrypt data, only the corresponding key can be decrypted. In a public key encryption system, the public key is public, and only the private key needs to be kept secret.
[0142] Detect whether the asymmetric encryption has the SM2 algorithm. If not, output a warning; if it has, substitute the second sample data for calculation to obtain the calculation result. If the calculation result is correct, the detection is passed; if the calculation result is wrong, output a warning; the second sample data includes: encryption and decryption sample data and signature verification sample data;
[0143] Password hash algorithm detection: detect whether the password hash algorithm has the SM3 algorithm. If not, a warning is output; if it does, the hash value sample data is substituted for calculation to obtain the result, and the result is tested; if the result is correct, the test is passed; if the result is wrong, a warning is output;
[0144] If any of the above symmetric password detection, asymmetric password detection and cryptographic hash algorithm detection is a warning, that is, the detection fails, a warning is output; if all three tests pass, the random number detection is entered;
[0145] S102: Random number detection includes random number source generator detection and random number randomness detection; randomness detection ensures that the random number generated by the random number source generator is a true random number;
[0146] Random number source generator detection: Identify whether there is a random number source generator in the blockchain system. If so, output pass; if no random number source generator is detected, output a warning; after determining that there is a random number source generator, detect whether the random numbers generated by the random number source generator are random, that is, start randomness detection: first collect a certain number of random numbers, and then use the random number randomness detection tool to detect the randomness and significance of the collected random numbers; when the results of randomness and significance are higher than the preset values, it passes; when the results of randomness and significance levels are not higher than the preset results, output a warning;
[0147] If any of the above random number source generator test and randomness test fails, a warning is output; if both tests pass, the key management test is entered.
[0148] S103: Key management detection includes key type identification detection, ciphertext detection, key characteristic detection, split method detection, key authority detection, update detection and backup detection; key management detection ensures the security of the key life cycle and does not cause key leakage;
[0149] Key type identification detection: detect the key type in the blockchain system to determine whether the key is used. If no key is detected, a warning is output; if a key is detected, the detection passes;
[0150] Ciphertext detection: detects whether the key of the symmetric cipher and the private key in the asymmetric cipher can directly read the plaintext. If the plaintext can be directly read, a warning is output; if it is ciphertext, the detection passes;
[0151] Key characteristic detection: Detect the authenticity, integrity and confidentiality of the key; when cryptographic technology is used, the authenticity of the key is guaranteed; when digital signature or HMAC is used, the integrity of the key is guaranteed; when symmetric encryption or asymmetric encryption is used, the confidentiality of the key is guaranteed; if any of the three characteristics is missing, a warning is output; if the three characteristics are complete, the key passes the test;
[0152] Split method detection: detect whether encryption or knowledge splitting is used in the process of key import or export, and verify the method through code review by staff; if neither is used, a warning is output; if any one is used, the detection passes;
[0153] Key permission detection: unauthorized users use keys to access the blockchain system and tamper with the keys. If the blockchain system accepts access or tampering, a warning will be output; if the blockchain prohibits unauthorized users from accessing, the detection is passed;
[0154] Update detection: detect whether there is an update cycle for the keys in the blockchain system; the keys to be detected include the encryption keys for node communication data and the keys for local storage data; if there is no update cycle, a warning is output; if there is, the test passes;
[0155] Backup detection: detect whether the key backup in the blockchain system is backed up in ciphertext or threshold algorithm; if neither of the two is used, a warning is output; if either is used, the detection passes;
[0156] If any of the key type identification detection, ciphertext detection, key characteristic detection, split method detection, key authority detection, update detection and backup detection fails, a warning will be output;
[0157] If each test passes, the certificate management test will be entered.
[0158] S104: Perform certificate management detection on the blockchain system; the certificate management detection includes certificate validity detection and verification detection;
[0159] Certificate validity detection: First, detect whether the blockchain system uses digital certificates; if not, end the detection and output a warning; if a digital certificate is used, determine whether the current time is within the validity period of the digital certificate; if not, output a warning; if within the validity period, the detection passes;
[0160] Verification: Check whether the certificate chain has passed the verification; the certificate chain is a hierarchical structure composed of a series of digital certificates, which is used to establish a trust path from an entity to a trusted root certificate authority; if the certificate chain cannot pass the verification, a warning is output;
[0161] If any test fails, a warning is output;
[0162] If each test is passed, the password component identification test will be entered;
[0163] S105: Identify and detect the cryptographic components of the blockchain system; if the cryptographic components are identified, return a pass; if the cryptographic components are not identified, output a warning;
[0164] If any of the general tests fails, a warning will be output, and the general test will fail; performing general tests on the blockchain system can improve the security and reliability of the blockchain system.
[0165] S2: Perform identity management detection on the blockchain system;
[0166] S201: Perform account creation detection to ensure that the account creation function can be correctly implemented and protect sensitive account data from being leaked; account creation detection includes support detection, dependency detection and private key detection;
[0167] Support detection: Detect whether the blockchain system supports the user; first detect whether the blockchain system supports the address of the user's transaction. If not, a warning is output; if supported, continue to detect whether the blockchain supports the user's SM2 algorithm asymmetric encryption. If not, a warning is output; if supported, the detection is passed;
[0168] Dependency detection: detect whether the asymmetric password generated by the blockchain system depends on random numbers; if not, a warning is output; if it does, the detection passes;
[0169] Private key detection: detect whether the private key in the asymmetric cipher can directly read the plain text. If it can, a warning is output; if not, the detection passes;
[0170] If any of the support test, dependency test, and private key test fails, a warning is output;
[0171] If each test is passed, the real-name authentication test will begin.
[0172] S202: Real-name authentication detection includes detecting whether the blockchain uses digital certificate technology to identify the legitimacy and validity of the user's identity;
[0173] If digital certificate technology is not used, a warning is output;
[0174] If the legitimacy and validity of the user's identity are not verified, a warning is output;
[0175] If the blockchain system is successfully identified as using digital certificate technology and the legitimacy and validity of the user's identity is successfully identified, the test will pass and enter the identification and authorization test;
[0176] S203: Authentication and authorization detection includes:
[0177] Simulate the transaction process and authenticate the user's identity. The authentication includes authentication of the user's identity and authentication of the node's identity. If the authentication of the user's identity is unsuccessful, a warning is output.
[0178] Simulate the node admission process and perform authorization detection on the node; the authorization includes legal node authorization and illegal node authorization;
[0179] If illegal authorization is performed on an illegal node, a warning is output;
[0180] If any of the identity management tests outputs a warning, the identity management test fails;
[0181] When working, first identify whether the blockchain's identity authentication mechanism adopts an authentication mechanism based on cryptographic technology; if not, output a warning;
[0182] If adopted, the on-chain transaction process is simulated, the user identity is authenticated legally, and whether the logged-in user is legal. If the authentication fails, a warning is output; if the authentication succeeds, the node access process is simulated, the node identity is authenticated legally, and whether the current node identity is legal. If the authentication fails, a warning is output; if the authentication succeeds, while simulating the node access process, the on-chain transaction process is simulated, and the authorization detection of the authorized permission operation is detected by the legal node. If it is not allowed, a warning is output; if it is run, the legal node is replaced with the illegal node for the authorization detection of the authorized permission operation. If it is run, a warning is output;
[0183] Check whether the above operations generate audit logs. If any operation does not generate a log, output a warning. If each operation generates a log, tamper with the audit log of any node to check whether the blockchain system prompts that the audit log has been tampered with. If the blockchain system does not prompt, output a warning.
[0184] The role of identity management detection: By identifying and managing user identities, it can effectively prevent the leakage of key data and hacker attacks, and provide security for the blockchain system.
[0185] S3: Perform on-chain transaction detection on the on-chain transactions in the blockchain system; Perform on-chain transaction detection to ensure the security and reliability of on-chain transactions in the blockchain system.
[0186] The specific steps of step S3 include:
[0187] S301: Transaction creation detection; Transaction creation detection includes signature verification detection, information protection detection, packaging detection, Merkle number detection and nonce value detection;
[0188] Signature verification test: simulates the transaction creation process and uses the public key of the transaction initiator to verify the digital signature in the transaction data. If the verification fails, a warning is output; if the verification succeeds, the test passes;
[0189] Information protection verification: Check whether the sensitive information and private information in the transaction process are encrypted and protected by cryptographic technology. If not, a warning will be output; if so, the test will pass.
[0190] Packaging detection: detect whether valid transactions can be packaged into blocks; if not, a warning is output; if yes, the detection is passed;
[0191] Merkel number detection: detect whether the Merkel number adopts the SM3 algorithm; if not, a warning is output; if so, the test passes;
[0192] Nonce value detection: Check whether the nonce value count is added to the transaction to prevent replay attacks. If not, a warning is output; if added, the test passes;
[0193] If any of the signature verification test, information protection test, packaging test, Merkle number test, and nonce value test in the transaction creation test fails, a warning will be output;
[0194] If each test is passed, it will enter the verification test;
[0195] S302: Verification and verification testing includes: signature record testing, signature verification testing and replay record testing;
[0196] During the test, check whether the transaction record has a digital signature. If not, output a warning. Then check whether the digital signature can pass the verification. If not, output a warning. Check whether the transaction record can resist replay attacks. If not, output a warning.
[0197] If any of the signature record test, signature verification test and replay record test in the verification test fails, a warning is output;
[0198] If each test passes, the off-chain transaction test will begin.
[0199] S4: Perform off-chain transaction detection on off-chain transactions in the blockchain system; off-chain transaction detection ensures the security and reliability of off-chain transactions;
[0200] The specific steps of step S4 include: identity authentication mechanism detection and simulated transaction detection;
[0201] S401: The identity authentication mechanism detection includes: mechanism existence detection, forged identity detection and identity authentication detection;
[0202] Detect whether there is an identity authentication mechanism for off-chain transactions;
[0203] If it does not exist, a warning is output;
[0204] If it exists, it will enter the forged identity detection;
[0205] Fake identity detection is to log in a fake identity on the blockchain system, conduct off-chain transactions with the fake identity, and test whether the identity authentication mechanism can detect the fake identity;
[0206] If the forged identity cannot be identified, a warning is output;
[0207] If the forged identity can be identified, it will enter the identity authentication test;
[0208] The identity authentication detection includes:
[0209] Check whether off-chain transactions use message authentication codes and digital signatures;
[0210] If any of the options are not adopted, a warning is output;
[0211] Check whether the digital signature corresponds to the real identity of the transaction party;
[0212] If either side does not correspond, a warning is output;
[0213] S402: Perform simulated transaction detection, which includes on-chain detection and transaction settlement detection;
[0214] On-chain detection includes simulating on-chain operations in off-chain transactions to detect whether the blockchain can verify the validity of unregistered transactions;
[0215] If the validity of any unregistered transaction is not verified, a warning is output;
[0216] If all unregistered transactions are detected, then the transaction clearing detection will begin;
[0217] Transaction clearing detection includes detecting whether there is a transaction clearing mechanism;
[0218] If it does not exist, a warning is output;
[0219] If it exists, the test passes;
[0220] If any of the on-chain detection and transaction settlement detection in the off-chain transaction detection outputs a warning, the detection fails;
[0221] S5: Perform account storage detection on the account storage area of the blockchain system; account storage detection ensures that the account results in the blockchain system are correct, and the account data will not be read or accessed by unauthorized users, ensuring the security and privacy of account data.
[0222] The specific steps of step S5 include:
[0223] S501: Cryptographic hash algorithm detection includes detecting whether the blockchain system adopts the SM3 algorithm;
[0224] If the SM3 algorithm is not used, a warning is output;
[0225] If adopted, enter the integrity test;
[0226] S502: Integrity detection includes detecting whether the data of the block is complete; the block includes a hash value identifying the block and connecting adjacent blocks;
[0227] If the data in any block is incomplete, a warning is output;
[0228] If complete, enter the encrypted storage detection;
[0229] S503: Perform encryption storage detection to detect whether the account book information is encrypted and stored using cryptographic technology;
[0230] If the storage is not encrypted, a warning is output;
[0231] If it is stored encrypted, it will enter the access mechanism detection;
[0232] S504: Access mechanism detection, detecting whether the authorized access to the account data adopts both identity authentication and access control measures;
[0233] If any of the options are not adopted, a warning is output;
[0234] Use authorized users to access and check whether the access is correct;
[0235] If it cannot be accessed correctly, a warning is output;
[0236] Use unauthorized users to access and check whether the access is correct;
[0237] If the access is correct, a warning is output;
[0238] If the access fails, the communication security test will be started.
[0239] S6: Perform communication security checks on the blockchain system; use cryptographic algorithms and passwords to help ensure the integrity and confidentiality of communication data.
[0240] The specific steps of step S6 include:
[0241] S601: Simulate the communication between the application end and the node to detect whether the cryptographic algorithm and the cryptographic protection protocol are used in the communication data;
[0242] If any of the options are not adopted, a warning is output;
[0243] If both are adopted, the node communication detection is output;
[0244] S602: Simulate communication between nodes to detect whether cryptographic algorithms and cryptographic protocols are used in node communication;
[0245] If any of the items is not adopted, a warning is output and the test ends;
[0246] If any of the endpoint communication detection and node communication detection in the communication security detection outputs a warning, the communication security detection fails.
[0247] S7: Perform consensus mechanism detection on the consensus mechanism of the blockchain system; consensus mechanism detection ensures that the consensus mechanism correctly and effectively realizes the consensus of transactions in the blockchain system;
[0248] The specific steps of step S7 include:
[0249] S701: Perform user identity authentication.
[0250] Identify whether cryptographic techniques are used in the consensus mechanism;
[0251] If not adopted, a warning is output;
[0252] Simulate the consensus mechanism execution process to detect whether the identity of the legitimate consensus user is successfully authenticated;
[0253] If the authentication fails, a warning is output;
[0254] Simulate the consensus mechanism execution process to detect whether the identity of illegal consensus users is successfully identified;
[0255] If the authentication fails, a warning is output;
[0256] S702: Perform information encryption detection,
[0257] Simulate the consensus mechanism execution process and detect whether the sensitive information transmitted during the execution process is encrypted and protected;
[0258] If encryption protection is not performed, a warning is output;
[0259] Simulate the consensus mechanism execution process and detect whether the integrity of sensitive information transmitted during the execution process is verified;
[0260] If integrity check is not performed, a warning is output;
[0261] S703: Perform security description detection to detect whether there is a security description in the consensus mechanism;
[0262] If no safety instructions exist, a warning is output;
[0263] S704: Perform adversarial attack detection to detect whether the consensus mechanism can resist attacks and perform multiple attack detections on the consensus mechanism; attack detection includes Sybil attack, DoS attack and double-spending attack;
[0264] If any attack cannot be defended, a warning is output;
[0265] If any of the user identity authentication, information encryption detection, security description detection, and anti-attack detection in the consensus mechanism detection outputs a warning, the consensus mechanism detection fails;
[0266] If every test in the consensus mechanism test is passed, it will enter the smart contract test.
[0267] S8: Perform smart contract detection on the smart contract of the blockchain system;
[0268] The specific steps of step S8 include:
[0269] S801: Perform user deployment detection,
[0270] Deploy smart contracts using unauthorized users;
[0271] If the smart contract is deployed successfully, a warning is output;
[0272] Deploy smart contracts using authorized users;
[0273] If the deployment of the smart contract fails, a warning is output;
[0274] S802: Detect tampering of smart contracts.
[0275] Tampering with smart contracts during their deployment;
[0276] If the blockchain system does not detect it, a warning will be output;
[0277] Tampering with smart contracts during the smart contract update process;
[0278] If the blockchain system does not detect it, a warning will be output;
[0279] Detect whether the tampered smart contract can be successfully deployed;
[0280] If the smart contract is deployed successfully, a warning is output;
[0281] Check whether the smart contract code uses cryptographic protection technology;
[0282] If not adopted, a warning is output;
[0283] If any of the user deployment detection and contract tampering detection in the smart contract detection outputs a warning, the smart contract detection fails.
[0284] If each test in the smart contract test passes, it will enter the privacy protection test.
[0285] Smart contract detection ensures that the smart contract will not be tampered with during deployment, that the sensitive code of the smart contract will not be accessed by malicious visitors, and that the user who deploys the smart contract has the correct permissions and that malicious smart contracts will not be deployed.
[0286] S9: Conduct privacy protection detection on the privacy protection of the blockchain system;
[0287] The specific steps of step S9 include:
[0288] S901: Identify whether the blockchain system uses password protection technology;
[0289] If not adopted, a warning is output;
[0290] S902: Detect whether the password protection technology is used to effectively protect the privacy information;
[0291] If the private information can be accessed by unauthorized users, it is not effectively protected and a warning is output;
[0292] If private information can only be accessed by authorized users and not by unauthorized users, it can be considered to be effectively protected;
[0293] If any of the tests in the password protection technology and effective protection test in the privacy protection test outputs a warning, the privacy protection test fails.
[0294] If any one of the password protection technology and effective protection tests in the privacy protection test is passed, the output passes the test and ends.
[0295] Privacy protection detection ensures that private data in the blockchain system will not be leaked unexpectedly.
[0296] Embodiment 2
[0297] A detection system for a blockchain system, comprising: an identity management detection module, an on-chain transaction detection module, an off-chain transaction detection module, an account storage detection module, a communication security detection module, a consensus mechanism detection module, a smart contract detection module and a privacy protection detection module;
[0298] The identity management detection module is used to detect key management, identity authentication and identity authorization when and after the user creates an account to ensure the reliability of identity management;
[0299] The on-chain transaction detection module is used to simulate the creation process and transaction process of on-chain transactions to ensure the compliance of on-chain transaction management;
[0300] The off-chain transaction detection module is used to simulate the off-chain transaction process and use a forged identity to conduct transactions, so as to ensure that no unauthorized users conduct transactions during the transaction process and ensure the compliance of off-chain transaction management;
[0301] The account storage detection module is used to detect whether the hash value identification block and the data connecting the adjacent blocks are complete, ensuring the integrity of the account storage information
[0302] The communication security detection module is used to detect whether the two communications between the application end and the node, and between the nodes, adopt the cryptographic algorithm and the cryptographic protection protocol to ensure the effectiveness of the communication security;
[0303] The consensus mechanism detection module is used to detect whether sensitive information is encrypted and protected and integrity checked during the execution of the consensus mechanism to ensure the fairness of the consensus mechanism;
[0304] The smart contract detection module is used to detect whether the smart contract can be deployed or tampered with by unauthorized users to ensure the accuracy of the smart contract;
[0305] The privacy protection detection module is used to detect whether the privacy information is protected by password protection technology to ensure the strictness of privacy protection.
[0306] The above embodiments only express preferred implementation modes, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention.
Claims
1. A detection method for a blockchain system, characterized in that: include: In the blockchain system, identity management detection, on-chain transaction detection, off-chain transaction detection, ledger storage detection, communication security detection, consensus mechanism detection, smart contract detection and privacy protection detection are carried out in the preset order. If any of the detections fails, the blockchain system fails the detection. The identity management test includes: account creation test, real-name authentication test, identification and authorization test; The on-chain transaction detection includes: transaction creation detection and transaction verification detection; The off-chain transaction detection includes: identity authentication mechanism detection and simulated transaction detection; The account book storage detection includes: cryptographic hash algorithm detection, integrity detection, encrypted storage detection, and access mechanism detection; The communication security detection includes: endpoint communication detection and node communication detection; The consensus mechanism detection includes: user identity authentication, information encryption detection, security description detection and anti-attack detection; The smart contract detection includes: user deployment detection and contract tampering detection; The privacy protection detection includes: password protection technology detection and effective protection detection; In the on-chain transaction detection, The transaction creation test includes: signature verification test, information protection test, packaging test, Merkle number test and nonce value test. If any test fails, a warning is output; The transaction verification test includes: Simulate the transaction process on the chain, and perform signature record detection, signature verification detection, and replay record detection on the transaction process; If any test fails, a warning is output; If any of the tests in the transaction creation test and transaction verification test in the on-chain transaction test outputs a warning, the on-chain transaction test fails; In the off-chain transaction detection, The identity authentication mechanism detection includes: mechanism existence detection, forged identity detection and identity authentication detection, wherein: The mechanism existence detection includes detecting whether the identity authentication mechanism is adopted in the blockchain system; if not adopted, a warning is output; The forged identity detection includes using a forged identity to conduct off-chain transactions and detecting whether the identity authentication mechanism is capable of detecting the forged identity; The identity authentication test includes detecting whether the identity authentication mechanism uses a message authentication code and a digital signature for dual authentication protection; the identity authentication test also includes detecting whether the digital signature corresponds to the real identity of the transaction party one by one; If any test fails, a warning is output; The simulated transaction detection includes: on-chain detection and transaction settlement detection; The on-chain detection includes simulating the on-chain operation in the off-chain transaction to detect whether the blockchain can verify the validity of the unregistered transaction; If the validity of any unregistered transaction is not verified, a warning is output; The transaction settlement detection includes detecting whether there is a transaction settlement mechanism; If it does not exist, a warning is output and the detection ends; If any of the authentication mechanism test and simulated transaction test in the off-chain transaction test outputs a warning, the off-chain transaction test fails; In the ledger storage detection, The cryptographic hash algorithm detection includes detecting whether the blockchain system adopts the SM3 algorithm; If the SM3 algorithm is not used, a warning is output; The integrity detection includes detecting whether the data of the block is complete; the block includes a hash value identification block and a connection adjacent block; If the data in any block is incomplete, a warning is output; The encrypted storage detection includes detecting whether the account book information is encrypted and stored using cryptographic technology; If the storage is not encrypted, a warning is output; The access mechanism detection includes detecting whether the authorized access to the account data adopts both identity authentication and access control measures; If any of the mechanisms are not adopted, a warning is output; Use authorized users to access and check whether the access is correct; If it cannot be accessed correctly, a warning is output; Use unauthorized users to access and check whether the access is correct; If the access is correct, a warning is output; If any of the tests in the ledger storage test, including the cryptographic hash algorithm test, integrity test, encrypted storage test, and access mechanism test, outputs a warning, the ledger storage test fails.
2. A detection method for a blockchain system according to claim 1, characterized in that: In the identity management detection, The account creation test includes support test, dependency test and private key test. If any test fails, a warning is output; The real-name authentication test includes: Check whether the blockchain uses digital certificate technology to identify the legitimacy and validity of user identities; If digital certificate technology is not used, a warning is output; If the legitimacy and validity of the user's identity are not verified, a warning is output; The identification and authorization detection includes: Simulate the transaction process and authenticate the user's identity. The authentication includes authentication of the user's identity and authentication of the node's identity. If the authentication of the user's identity is unsuccessful, a warning is output. Simulate the node admission process and perform authorization detection on the node; the authorization includes legal node authorization and illegal node authorization; If illegal authorization is performed on an illegal node, a warning is output; If any of the account creation test, real-name authentication test, and identification and authorization test in the identity management test outputs a warning, the identity management test fails.
3. According to the detection method of a blockchain system according to claim 1, it is characterized by: In the communication security detection, The endpoint communication detection includes simulating the communication between the application end and the node, and detecting whether the cryptographic algorithm and the cryptographic protection protocol are used in the communication; If any of the options are not adopted, a warning is output; The node communication detection includes simulating the communication between nodes and detecting whether the cryptographic algorithm and cryptographic protocol are used in the communication between nodes; If any of the options are not adopted, a warning is output; If any of the endpoint communication detection and node communication detection in the communication security detection outputs a warning, the communication security detection fails.
4. According to the detection method of a blockchain system according to claim 1, it is characterized by: In the consensus mechanism detection, The user identity authentication includes identifying whether cryptographic technology is used in the consensus mechanism; If not adopted, a warning is output; Simulate the consensus mechanism execution process to detect whether the identity of the legitimate consensus user is successfully authenticated; If the authentication fails, a warning is output; Simulate the consensus mechanism execution process to detect whether the identity of illegal consensus users is successfully identified; If the authentication fails, a warning is output; The information encryption detection includes simulating the consensus mechanism execution process and detecting whether the sensitive information transmitted during the execution process is encrypted and protected; If encryption protection is not performed, a warning is output; Simulate the consensus mechanism execution process and detect whether the integrity of sensitive information transmitted during the execution process is verified; If integrity check is not performed, a warning is output; The security description detection detects whether there is a security description in the consensus mechanism; If no safety instructions exist, a warning is output; The counter-attack detection includes multiple attack detections; the attack detection includes Sybil attack, DoS attack and double-spending attack; If any attack cannot be defended, a warning is output; If any of the user identity authentication, information encryption detection, security description detection and anti-attack detection in the consensus mechanism detection outputs a warning, the consensus mechanism detection fails.
5. According to the detection method of a blockchain system according to claim 1, it is characterized by: In the smart contract detection, The user deployment detection includes deploying smart contracts using unauthorized users; If the smart contract is deployed successfully, a warning is output; Deploy smart contracts using authorized users; If the deployment of the smart contract fails, a warning is output; The contract tampering detection includes tampering with the smart contract during the smart contract deployment process; If the blockchain system does not detect it, a warning will be output; Tampering with smart contracts during the smart contract update process; If the blockchain system does not detect it, a warning will be output; Detect whether the tampered smart contract code can be successfully deployed; If the smart contract is deployed successfully, a warning is output; Check whether the smart contract code uses cryptographic protection technology; If not adopted, a warning is output; If any of the user deployment detection and contract tampering detection in the smart contract detection outputs a warning, the smart contract detection fails.
6. According to a detection method of a blockchain system according to claim 1, it is characterized by: In the privacy protection detection, The password protection technology detection includes identifying whether the blockchain system adopts password protection technology; If not adopted, a warning is output; The effective protection detection includes detecting whether the password protection technology is used to effectively protect the privacy information; If the private information can be accessed by unauthorized users, it is not effectively protected and a warning is output; If private information can only be accessed by authorized users and not by unauthorized users, it can be considered to be effectively protected; If any of the tests in the password protection technology and effective protection test in the privacy protection test outputs a warning, the privacy protection test fails.
7. A detection system for a blockchain system, characterized in that: include: Identity management detection module, on-chain transaction detection module, off-chain transaction detection module, ledger storage detection module, communication security detection module, consensus mechanism detection module, smart contract detection module and privacy protection detection module; The identity management detection module is used to detect key management, identity authentication and identity authorization when and after the user creates an account to ensure the reliability of identity management; The on-chain transaction detection module is used to simulate the creation process and transaction process of on-chain transactions to ensure the compliance of on-chain transaction management; The off-chain transaction detection module is used to simulate the off-chain transaction process and use a forged identity to conduct transactions, so as to ensure that no unauthorized users conduct transactions during the transaction process and ensure the compliance of off-chain transaction management; The account book storage detection module is used to detect whether the hash value identification block and the data connecting the adjacent blocks are complete, so as to ensure the integrity of the account storage information; The communication security detection module is used to detect whether the two communications between the application end and the node, and between the nodes, adopt the cryptographic algorithm and the cryptographic protection protocol to ensure the effectiveness of the communication security; The consensus mechanism detection module is used to detect whether sensitive information is encrypted and protected and integrity checked during the execution of the consensus mechanism to ensure the fairness of the consensus mechanism; The smart contract detection module is used to detect whether the smart contract can be deployed or tampered with by unauthorized users to ensure the accuracy of the smart contract; The privacy protection detection module is used to detect whether the private information is protected by password protection technology to ensure the strictness of privacy protection; The on-chain transaction detection module includes: transaction creation detection and transaction verification detection; The transaction creation test includes: signature verification test, information protection test, packaging test, Merkle number test and nonce value test. If any test fails, a warning is output; The transaction verification test includes: Simulate the transaction process on the chain, and perform signature record detection, signature verification detection, and replay record detection on the transaction process; If any test fails, a warning is output; If any of the tests in the transaction creation test and transaction verification test in the on-chain transaction test outputs a warning, the on-chain transaction test fails; The off-chain transaction detection module includes: identity authentication mechanism detection and simulated transaction detection; The identity authentication mechanism detection includes: mechanism existence detection, forged identity detection and identity authentication detection, wherein: The mechanism existence detection includes detecting whether the identity authentication mechanism is adopted in the blockchain system; if not adopted, a warning is output; The forged identity detection includes using a forged identity to conduct off-chain transactions and detecting whether the identity authentication mechanism is capable of detecting the forged identity; The identity authentication test includes detecting whether the identity authentication mechanism uses a message authentication code and a digital signature for dual authentication protection; the identity authentication test also includes detecting whether the digital signature corresponds to the real identity of the transaction party one by one; If any test fails, a warning is output; The simulated transaction detection includes: on-chain detection and transaction settlement detection; The on-chain detection includes simulating the on-chain operation in the off-chain transaction to detect whether the blockchain can verify the validity of the unregistered transaction; If the validity of any unregistered transaction is not verified, a warning is output; The transaction settlement detection includes detecting whether there is a transaction settlement mechanism; If it does not exist, a warning is output and the detection ends; If any of the authentication mechanism test and simulated transaction test in the off-chain transaction test outputs a warning, the off-chain transaction test fails; The account book storage detection module includes: cryptographic hash algorithm detection, integrity detection, encrypted storage detection, and access mechanism detection; The cryptographic hash algorithm detection includes detecting whether the blockchain system adopts the SM3 algorithm; If the SM3 algorithm is not used, a warning is output; The integrity detection includes detecting whether the data of the block is complete; the block includes a hash value identification block and a connection adjacent block; If the data in any block is incomplete, a warning is output; The encrypted storage detection includes detecting whether the account book information is encrypted and stored using cryptographic technology; If the storage is not encrypted, a warning is output; The access mechanism detection includes detecting whether the authorized access to the account data adopts both identity authentication and access control measures; If any of the mechanisms are not adopted, a warning is output; Use authorized users to access and check whether the access is correct; If it cannot be accessed correctly, a warning is output; Use unauthorized users to access and check whether the access is correct; If the access is correct, a warning is output; If any of the tests in the ledger storage test, including the cryptographic hash algorithm test, integrity test, encrypted storage test, and access mechanism test, outputs a warning, the ledger storage test fails.
