Distributed identity authentication method based on blockchain smart contract
By employing a distributed identity verification method based on blockchain smart contracts, and utilizing dynamic EEG features and differential privacy technology, the problems of easy forgery and privacy leakage of static biometric features are solved, achieving highly reliable and privacy-protected identity verification, which is applicable to scenarios such as finance, government affairs, and healthcare.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DIANDIDI INTERNET TECHNOLOGY GROUP (XIONGAN) CO LTD
- Filing Date
- 2026-03-12
- Publication Date
- 2026-06-12
AI Technical Summary
Existing authentication methods based on static biometrics are vulnerable to forgery attacks, and traditional on-chain verification logic struggles to achieve dynamic ownership of high-dimensional nonlinear features while protecting the privacy of the original features. This makes it difficult to reconcile the robustness of authentication with the dimensions of privacy protection.
Dynamic EEG feature vectors are acquired using a portable EEG acquisition device, and perturbation feature data is generated by combining it with a differential privacy perturbation module. Zero-knowledge proof credentials are then constructed and verified non-interactively within a blockchain smart contract to ensure the legitimacy of the identity.
It achieves highly reliable liveness detection capabilities, enhances the protection of user neural privacy, and constructs a decentralized, fraud-resistant, revocable, and privacy-protected identity verification paradigm, suitable for application scenarios with high security requirements such as finance, government affairs, and healthcare.
Smart Images

Figure CN122204431A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of blockchain and identity verification technology, specifically relating to a distributed identity verification method based on blockchain smart contracts. Background Technology
[0002] With the continuous improvement of informatization, identity verification technology has become an important research subject for ensuring cyberspace security and data privacy. Traditional centralized identity authentication architectures are gradually evolving towards decentralization and distribution, aiming to eliminate single points of failure and enhance user autonomy. Against this backdrop, biometric technology, with its unique physiological characteristics and convenience, is widely used in various high-security verification scenarios, achieving accurate permission determination by extracting and comparing inherent physical or behavioral characteristics of the human body.
[0003] Brain-computer interface-based electroencephalogram (EEG) verification technology, as an emerging biometric identification method, utilizes the electrophysiological signals generated by the human body under specific states of consciousness or external stimuli for identity verification. This technology typically involves the acquisition, preprocessing, and feature vector extraction of EEG signals. Leveraging the immutability of blockchain and the automated execution capabilities of smart contracts, it constructs a decentralized identity management system, thereby providing more robust logical support for access control of sensitive data.
[0004] Current verification methods based on static biometrics face serious challenges in liveness detection, are vulnerable to deception attacks using high-definition images, 3D models, or deepfake techniques, and pose a permanent identity security risk once biometric information is leaked. EEG data contains highly sensitive personal health and emotional privacy information, and existing transmission and storage mechanisms lack effective desensitization methods for the raw data, leading to serious privacy leak risks during verification. Traditional on-chain verification logic often requires direct hard matching of data features, making it difficult to achieve dynamic ownership of high-dimensional nonlinear features while protecting the privacy of the original features. This results in an irreconcilable problem between robustness of identity verification and privacy protection. Summary of the Invention
[0005] The purpose of this invention is to provide a distributed authentication method based on blockchain smart contracts, thereby solving the problems mentioned in the background art.
[0006] To achieve the above objectives, this invention provides a distributed authentication method based on blockchain smart contracts, comprising the following steps: Step 1: Acquire the electroencephalogram (EEG) signals generated by the user under preset external stimuli using a portable EEG acquisition device, and filter and denoise the EEG signals to extract dynamic EEG feature vectors with identity discrimination. Step 2: Input the dynamic EEG feature vector into the differential privacy perturbation module. Under the premise of satisfying the preset privacy budget constraint, inject random noise into the dynamic EEG feature vector to generate perturbation feature data with privacy protection processing. Step 3: Based on the perturbation feature data and combined with the user's locally stored private key information, construct a zero-knowledge proof credential to prove the legitimacy of the user's identity. The zero-knowledge proof credential can verify whether the user has an EEG response pattern that matches the registered identity without exposing the original EEG features and private key content. Step four: Submit the zero-knowledge proof credential to a smart contract deployed in the blockchain network. The smart contract performs non-interactive verification of the zero-knowledge proof credential according to preset verification logic and returns a judgment instruction for identity authentication pass or fail based on the verification result.
[0007] Preferably, the process of acquiring the electroencephalographic signals includes: Multiple dry electrode sensors are simultaneously acquired by multiple channels of electroencephalogram (EEG) signals by configuring multiple dry electrode sensors in the frontal lobe, parietal lobe and occipital lobe of the user’s head. The dry electrode sensors are fixed to the surface of the user’s scalp by an elastic headband, and the electrode material is silver or silver chloride composite material. The system presents users with a visual odd sphere paradigm stimulus sequence consisting of alternating high-frequency standard stimuli and low-frequency target stimuli in a predetermined ratio. The standard stimuli and the target stimuli are distinguished on the display terminal by different geometric shapes or colors, so as to induce users to generate event-related potential components with identity recognition characteristics. The portable EEG acquisition device records the multi-channel EEG signals in real time at a preset sampling frequency, and converts the analog electrical signals into digital signals with preset precision through an internally integrated analog-to-digital converter module.
[0008] Preferably, the process of filtering and denoising the electroencephalogram (EEG) signal includes: using a bandpass filter to perform frequency screening on the original digital signal, wherein the low cutoff frequency of the bandpass filter is set to 0.5 Hz and the high cutoff frequency is set to 30 Hz, thereby filtering out baseline drift and high-frequency electromagnetic noise. The independent component analysis algorithm is used to perform blind source separation on multi-channel signals, decompose the original observation signal into several statistically independent components, identify and remove independent components with specific waveform characteristics, remove eye movement interference, electromyography interference and power frequency interference, and use inverse transform to reconstruct pure electroencephalographic signals. The reconstructed signal is smoothed by a sliding window averaging method, wherein the length and step size of the sliding window are preset according to the signal sampling rate.
[0009] Preferably, the extraction process of the dynamic EEG feature vector includes: Multidimensional physiological feature parameters are extracted from the denoised event-related potential components. These physiological feature parameters include the peak voltage of the peak, the latency from the moment of stimulus presentation to the appearance of the peak, the peak width of the waveform curve on the time axis, and the power spectral density distribution within the frequency band. The extracted physiological feature parameters are combined to construct a high-dimensional feature vector with individual uniqueness.
[0010] Preferably, the process of generating the perturbation feature data includes: The privacy budget parameter is dynamically set according to the security level of the application scenario, and the value of the privacy budget parameter is reduced when the security level is increased. The sensitivity of the dynamic EEG feature vector in the global range is calculated, and the scale parameter of the random noise is determined based on the proportional relationship between the sensitivity and the privacy budget parameter. The scale parameter is directly proportional to the sensitivity and inversely proportional to the privacy budget parameter. Random values that follow a Laplace distribution or a normal distribution are generated, and these random values are summed to each dimension of the original dynamic EEG feature vector, so that the generated perturbation feature data retains the statistical distribution characteristics of the original data and erases precise individual waveform details.
[0011] Preferably, the construction process of the zero-knowledge proof credential includes: The user equipment runs a non-interactive zero-knowledge proof generation algorithm in a local trusted execution environment. The input parameters of the non-interactive zero-knowledge proof generation algorithm include the perturbation feature data, the user's private key stored in the hardware-level security chip, and the public reference string generated during the registration phase. The non-interactive zero-knowledge proof generation algorithm maps the perturbation feature data to the coefficients of a polynomial equation, and uses the user's private key to perform a signature operation on the solution of the polynomial equation, and outputs a proof string composed of numerical values over a finite field through algebraic transformation. The proof string constitutes logically consistent evidence of the proposition that the user possesses a private key that conforms to the EEG response pattern, and the content of the proof string cannot be reversed to obtain the original EEG feature information or private key bit information.
[0012] Preferably, the process of smart contracts performing non-interactive verification includes: The smart contract retrieves the public key and public parameters of the corresponding user stored on the blockchain, parses the received zero-knowledge proof certificate, and extracts the proof string. The on-chain pre-built verification function is invoked, and the proof string is subjected to elliptic curve-based dot addition and dot multiplication operations in combination with the public key and public parameters to verify whether it meets the predefined logical constraints. The logical constraints are set based on the statistical boundary conditions of the legitimate identity EEG response patterns determined during the registration phase. If the verification result satisfies all the logical constraints, the identity authentication is deemed successful, and the verification record and timestamp are stored in the blockchain ledger in encrypted form.
[0013] Preferably, the method further includes an identity registration phase, which includes: Initial EEG characteristics of users are collected in a trusted environment, and differential privacy perturbation processing is performed to generate initial perturbation feature data; Based on the initial perturbation feature data, a public-private key pair is generated using an asymmetric encryption algorithm. The public key, along with the public parameters of the zero-knowledge proof, is uploaded to the blockchain, and the private key is stored in the user's local hardware-level security chip. A timestamp binding mechanism is introduced, which combines the user's identity identifier, the public key, and the millisecond-level timestamp of the registration time, and generates a globally unique registration fingerprint through a hash algorithm and writes it into the blockchain.
[0014] Preferably, the method also supports a multi-factor fusion verification mode and recursive proof logic, specifically including: collecting the user's gait features, iris features or geographic location environmental context information as auxiliary verification factors, and performing differential privacy processing on the auxiliary verification factors respectively; Each of the dynamic EEG feature vectors and each of the auxiliary verification factors is used to generate a corresponding proof fragment. Multiple proof fragments are then aggregated into a fixed-length comprehensive proof string using a recursive proof combination technique. The smart contract dynamically adjusts the weight coefficients of the dynamic EEG feature vector and each of the auxiliary verification factors in the final determination based on the current security environment, and performs multi-level identity verification based on the comprehensive proof string.
[0015] Preferably, the method further includes a hardware self-test and compensation mechanism, specifically including: The portable EEG acquisition device monitors the contact impedance value of the dry electrode sensor in real time. When the contact impedance value exceeds the preset impedance threshold, it automatically increases the gain of the preamplifier and turns on the notch filter. Increasing the number of presentations of the visual oddball paradigm stimulus sequence improves the signal-to-noise ratio by increasing the number of trial superpositions and averagings. When constructing the zero-knowledge proof credential, the operating environment characteristics of the mobile terminal are obtained as a salt value and mixed into the hash operation, so that the proof strings generated by the same user on different devices have spatial correlation differences.
[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention solves the technical defects of traditional static biometrics, which are easily forged and irreversible, by introducing dynamic EEG features induced by specific external stimuli as the core biometric identifier, and achieves highly reliable liveness detection capability. 2. By deeply integrating the differential privacy mechanism into the signal processing front end, the leakage path of raw sensitive EEG data is blocked at the source, thereby enhancing the protection of users' neural privacy. 3. By adopting an on-chain verification architecture that combines zero-knowledge proofs and smart contracts, the identity verification process does not need to expose any original features or private key information, which not only ensures the accuracy of verification, but also achieves end-to-end privacy and security. 4. The overall solution constructs a new identity verification paradigm that is decentralized, fraud-resistant, revocable, and strongly privacy-protected, and is suitable for critical application scenarios with high security and compliance requirements, such as finance, government affairs, and healthcare. Attached Figure Description
[0017] Figure 1 The flowchart is based on the present invention; Figure 2 This is a schematic diagram of data flow according to the present invention; Figure 3 A flowchart illustrating how privacy-preserving perturbation feature data is generated based on the interaction between the dynamic EEG feature vector and the privacy budget parameters and random noise set in the differential privacy perturbation module, according to the present invention. Figure 4 The flowchart below illustrates the process of extracting logical consistency evidence based on the perturbation feature data and the user's locally stored private key information to construct a zero-knowledge proof credential for performing non-interactive verification on a blockchain network, according to the present invention. Figure 5 This is a flowchart illustrating the logical process of identity registration and the generation of initial perturbation feature data and public / private key pairs based on a hardware-level security chip and timestamp binding mechanism according to the present invention. Detailed Implementation
[0018] Example 1: Please refer to the appendix Figure 1 To be continued Figure 5 The distributed authentication method based on blockchain smart contracts is described in detail below, including its implementation process and technical specifications: In the distributed authentication method, step 1 involves acquiring the electroencephalogram (EEG) signals generated by the user under preset external stimuli through a portable EEG acquisition device, and filtering and denoising the EEG signals to extract dynamic EEG feature vectors with identity distinguishability.
[0019] The portable EEG acquisition device is configured as a lightweight wearable device, integrating signal conditioning circuitry, an analog-to-digital conversion module, and a central processing unit. The portable EEG acquisition device is equipped with multiple dry electrode sensors, no fewer than eight in number, distributed in key brain regions of the user's head, including the frontal lobe, parietal lobe, and occipital lobe, for simultaneously acquiring multi-channel EEG signals.
[0020] In actual operation, the dry electrode sensor is fixed to the user's scalp surface by an elastic headband. Its electrode material is a silver or silver chloride composite material with high conductivity to ensure that a low contact resistance is maintained without the need to apply conductive paste. The contact resistance value is controlled below 50 kiloohms.
[0021] During the signal acquisition phase, the preset external stimuli include a visual odd-sphere paradigm stimulus sequence. This sequence consists of alternating high-frequency standard stimuli and low-frequency target stimuli presented in a predetermined ratio. The presentation probability of the high-frequency standard stimulus is set to 0.8, while the presentation probability of the low-frequency target stimulus is set to 0.2. These two types of stimuli are distinguished on the display terminal by different geometric shapes or colors; for example, the standard stimulus is a blue circular image, and the target stimulus is a red square image.
[0022] The presentation duration of each stimulus is precisely controlled to 100 milliseconds, and the time interval between two adjacent stimuli is set to a random value between 300 and 500 milliseconds to prevent users from making rhythmic predictions. When the user gazes at the screen and mentally counts low-frequency target stimuli, their cerebral cortex generates event-related potential components, namely P300 potentials. The portable EEG acquisition device records multi-channel EEG signals in real time at a sampling frequency of 500 Hz and converts analog electrical signals into 24-bit precision digital signals.
[0023] In the process of filtering and denoising the electroencephalogram (EEG) signals, a bandpass filter is used to screen the original signals by frequency. The low cutoff frequency of the bandpass filter is set to 0.5 Hz and the high cutoff frequency is set to 30 Hz, thereby preserving the effective frequency bands in the EEG signals while filtering out ultra-low frequency baseline drift caused by breathing and electromagnetic noise generated by high-frequency electronic devices.
[0024] The system invokes an independent component analysis (ICA) algorithm, which decomposes the original observed signal into several statistically independent components by performing blind source separation on the multi-channel signal. By identifying and removing independent components with specific waveform characteristics, it achieves precise removal of eye-tracking interference, electromyographic interference, and power frequency interference.
[0025] Eye-tracking interference exhibits amplitude deviation in the frontal lobe channel, while power line interference shows a significant energy peak at 50 Hz. By automatically detecting and zeroing the weights of these components using an algorithm, and then performing an inverse transform reconstruction, a pure EEG signal can be obtained. Finally, the signal is smoothed using a sliding window averaging method, with the sliding window length set to 200 milliseconds and the step size set to 20 milliseconds, thereby improving the signal-to-noise ratio.
[0026] In the feature extraction stage, the system extracts a dynamic EEG feature vector with identity-discriminating characteristics from the denoised P300 components. This feature vector includes the peak voltage of the P300 peak, the latency from stimulus presentation to peak occurrence, the peak width of the waveform curve on the time axis, and the power spectral density distribution within the frequency band. These parameters collectively constitute a high-dimensional feature vector, which is unique to each individual due to physiological differences in brain structure and neural conduction velocity.
[0027] In the method, step 2 involves inputting the dynamic EEG feature vector into a differential privacy perturbation module. Under the premise of satisfying a preset privacy budget constraint, random noise is injected into the dynamic EEG feature vector to generate privacy-protected perturbation feature data. The differential privacy perturbation module runs in the secure execution environment of the user terminal. By introducing uncertainty, it prevents external parties from inferring the original biometric details from the observed perturbation feature data.
[0028] The privacy budget parameter is a preset numerical threshold that represents a balance between the strength of privacy protection and data availability. This threshold is dynamically adjusted according to the security level of the application scenario. In high-security scenarios such as financial payments, the privacy budget parameter is set to a smaller value to enhance the interference strength of random noise; in ordinary identity verification scenarios, the privacy budget parameter can be appropriately increased.
[0029] The injected random noise follows a Laplace distribution. The scaling parameter of the Laplace distribution is directly proportional to the sensitivity of the dynamic EEG feature vector and inversely proportional to the privacy budget parameter. Specifically, the scaling parameter is equal to the maximum change of the feature vector globally divided by the privacy budget parameter. During perturbation, the system independently generates random values conforming to the Laplace distribution for each dimension of the feature vector, and then sums these random values to the original feature values. This process ensures that while maintaining the accuracy of identity verification within a preset range, it prevents any third party from reconstructing the original EEG features from the perturbated data. The generated perturbed feature data retains the statistical distribution characteristics of the original data, but erases precise individual waveform details, thus achieving privacy desensitization at the source.
[0030] In the method, step 3 involves constructing a zero-knowledge proof credential to prove the legitimacy of the user's identity based on the perturbation feature data and the user's locally stored private key information. The zero-knowledge proof credential can verify whether a user possesses an EEG response pattern matching their registered identity without exposing the original EEG features and private key content.
[0031] The process of constructing zero-knowledge proof credentials specifically includes: the user equipment running a zero-knowledge proof generation algorithm locally. This zero-knowledge proof generation algorithm uses a non-interactive zero-knowledge proof protocol. The algorithm's input parameters include perturbation feature data, the user's private key, and a public reference string generated during the registration phase. The user's private key is securely stored in a hardware-level security chip on the user's local machine, which is capable of resisting physical attacks and side-channel attacks.
[0032] In generating the proof, the algorithm first maps the perturbation feature data to the coefficients of a polynomial equation and then uses the private key to perform a signature operation on a specific solution of that polynomial equation. Subsequently, through complex algebraic transformations, the algorithm outputs a mathematically verifiable but irreversibly deducible proof string.
[0033] The proof string contains only logical consistency evidence regarding the proposition that "the user possesses a private key that conforms to the EEG response pattern." This proof string consists of a series of values located over a finite field, and its structure conforms to the three properties of zero-knowledge proofs: completeness, reliability, and zero-knowledge nature.
[0034] After receiving the proof string, the verifier performs a calculation using a predefined verification function. If the result is true, it is sufficient to confirm the user's legitimate identity. Throughout the process, the verifier cannot obtain the specific values of the perturbation feature data, nor can it know any bit information about the private key.
[0035] In the method, step 4 involves submitting the zero-knowledge proof credential to a smart contract deployed in a blockchain network. The smart contract performs non-interactive verification of the zero-knowledge proof credential according to preset verification logic and returns a judgment instruction for identity authentication pass or fail based on the verification result.
[0036] The blockchain network adopts a consortium blockchain architecture, with multiple authoritative institutions jointly maintaining node consensus. This architecture ensures the transparency and immutability of the identity verification logic. The smart contract embeds a set of verification rules consistent with the registration phase. This set of verification rules defines the statistical boundary conditions of the EEG response patterns corresponding to legitimate identities, such as the Euclidean distance threshold or cosine similarity requirement of feature vectors in the projection space.
[0037] Upon receiving a zero-knowledge proof submitted by a user, the smart contract automatically triggers a pre-built verification function on the blockchain. This function parses the proof string and performs verification operations based on the corresponding user's public key and public parameters stored on the blockchain. The verification process involves numerous point addition and multiplication operations on elliptic curves, and all operational logic adheres to mathematical rules defined in plain text, without involving any externally undefined parameters.
[0038] If the verification result meets all preset logical constraints, the smart contract determines that the identity authentication is successful and sends an authorization instruction to the external application system, simultaneously triggering subsequent business logic, such as asset transfer, access control opening, or data access authorization. If the verification fails, a rejection decision is returned, and the abnormal attempt is recorded. All identity verification records are permanently stored on the blockchain in encrypted form for future auditing and traceability.
[0039] In this embodiment, the method further includes an identity registration phase. The identity registration phase is completed in a trusted environment when the user first uses the system. The user first completes initial EEG feature acquisition under monitoring. The acquisition process also follows the visual stimulation paradigm in step 1. The acquired raw EEG features are processed using differential privacy perturbation to generate initial perturbation feature data. Based on this initial perturbation feature data, the system generates a public-private key pair using an asymmetric encryption algorithm. The public key, along with the public parameters of the zero-knowledge proof, is uploaded to the blockchain for notarization, while the private key is encrypted and stored in the user's local trusted execution environment.
[0040] During the identity registration phase, the user's local trusted execution environment is implemented using a hardware-level security chip. This hardware-level security chip has an independent processor, storage unit, and true random number generator. After the private key is generated inside the chip, its read access is restricted to a small range, ensuring that the private key does not leave the security boundary throughout its entire lifecycle. A timestamp binding mechanism is introduced during the registration process. The system combines the user's unique identity identifier, public key information, hash value of the initial perturbation feature, and a timestamp accurate to milliseconds of the current registration time, and generates a globally unique registration fingerprint using a hash algorithm. This registration fingerprint is then written into the genesis state of the blockchain. This mechanism effectively prevents replay attacks, meaning that attackers cannot intercept old verification data to impersonate the user.
[0041] This invention supports a multi-factor fusion verification mode. In addition to basic EEG verification, users can selectively enable auxiliary verification factors. These auxiliary verification factors include the user's gait characteristics, iris scan information, or geographic location context information.
[0042] The system collects users' gait acceleration curves using the accelerometer built into their smartphones. These auxiliary factors also undergo independent differential privacy processing, injecting specific Laplace noise. Subsequently, the perturbation data from multiple factors is integrated into a unified zero-knowledge proof protocol. Submitted to a smart contract through an independent zero-knowledge proof channel, this forms a multi-layered, multi-dimensional identity verification system. This integrated model enhances the system's resistance to deception; even if a certain biometric factor is obtained through extreme means, an attacker cannot pass verification without meeting the multi-dimensional feature matching requirements.
[0043] In a specific application example, suppose this system is used for high-security financial transfer verification. After the user initiates a transfer request, the wearable portable EEG acquisition device is immediately activated. The device connects to the mobile terminal via Bluetooth Low Energy. The mobile screen begins to display visual oddball paradigm stimulation. The user completes the gaze task within approximately 30 seconds. The processing chip inside the device performs signal filtering and noise reduction in real time. Subsequently, the encryption module of the mobile terminal dynamically adjusts the privacy budget based on the current transfer amount. If the transfer amount exceeds a preset large threshold, the privacy budget is reduced, thereby increasing the difficulty of proof under noise perturbation. The perturbed feature vector is combined with the private key stored in the mobile phone's secure chip to generate a 256-byte zero-knowledge proof string.
[0044] The zero-knowledge proof string is encapsulated in a blockchain transaction request and sent to the gateway node of the consortium blockchain. Upon receiving the request, the consensus node on the consortium blockchain invokes the authentication smart contract. The contract retrieves the user's public key and registration fingerprint pre-registered on the chain. The verification function completes the logical check within 500 milliseconds. If the verification passes, the contract automatically executes the transfer logic and packages the transfer result, verification timestamp, and participating node numbers into a new block, linking it to the end of the blockchain. The entire process does not require storing any of the user's original physiological data on the chain, achieving a high level of privacy protection.
[0045] Example 2: Based on the distributed authentication method based on blockchain smart contracts described in Example 1, this example provides an alternative solution for optimizing the performance of mobile devices, aiming to reduce the computational load of user terminals while ensuring authentication strength.
[0046] In Embodiment 2, the signal preprocessing in step 1 is simplified. The portable EEG acquisition device employs a more efficient downsampling strategy. The signal with an original sampling rate of 1000 Hz is first downsampled to 250 Hz. In the filtering stage, the computationally complex independent component analysis algorithm is abandoned, and instead an adaptive denoising method based on discrete wavelet transform is adopted.
[0047] The system decomposes EEG signals into wavelet coefficients at multiple scales. By setting a threshold function, it automatically identifies and suppresses high-frequency detail coefficients representing noise and low-frequency approximation coefficients representing baseline drift. Subsequently, the effective P300 components are recovered using a wavelet reconstruction algorithm. This method reduces the processor's floating-point computation load and extends the battery life of wearable devices.
[0048] In step 2, the differential privacy perturbation module uses Gaussian noise instead of Laplace noise. The injection of Gaussian noise involves calculating the L2 norm sensitivity of the original feature vector. The privacy budget parameter is split into two components: the probability of privacy leakage and the strength of privacy protection. The random noise generated by the system follows a normal distribution with a mean of 0, and the variance is precisely calculated based on the sensitivity and privacy budget. Compared to the Laplace distribution, the Gaussian distribution provides better data utility when processing multidimensional, highly correlated EEG features; that is, at the same level of privacy protection, the verification pass rate is higher, and the robustness of the system is enhanced.
[0049] In step 3, the construction of the zero-knowledge proof credential employs a recursive proof combination technique. When a user performs multi-factor verification, the system no longer generates a massive single proof, but instead generates small-scale proof fragments for each factor. Using recursive call logic, these small proofs are aggregated into a fixed-length comprehensive proof. This improvement reduces the proof generation time from several seconds to hundreds of milliseconds, enhancing the user experience.
[0050] In step 4, the smart contract's verification logic is designed for asynchronous processing. Upon receiving the proof credential, the blockchain network first returns a "processing" status receipt, and then consensus nodes perform complex, non-interactive verification in the background. Once verification is complete, the result is pushed to the user terminal via the blockchain's event listening mechanism. This design avoids prolonged user interface lag during network congestion.
[0051] This embodiment introduces a biometric revocation and update mechanism during the identity registration phase. If a user's physiological health condition changes (e.g., long-term medication affecting EEG waveforms), they can initiate a biometric update request. The user must re-collect EEG characteristics in a two-factor authentication environment, using their original private key and a physiological status certificate signed by a trusted medical institution. The smart contract verifies the validity of the update request, overwrites the old public key and biometric fingerprint, and generates a new timestamp binding. This mechanism solves the traditional problem of irrevocable biometrics, giving the system a longer lifespan and higher adaptability.
[0052] Example 3: This example further details the redundancy design and exception handling mechanism of the distributed authentication method based on blockchain smart contracts under extreme environments.
[0053] In step 1, if the portable EEG acquisition device detects poor contact quality of the dry electrode sensor, the system will automatically trigger a compensation mechanism. The impedance monitoring circuit inside the device provides real-time feedback on the electrode impedance value. When the impedance value exceeds a preset threshold of 60 kiloohms, the acquisition unit will automatically increase the gain of the preamplifier and activate an additional notch filter to eliminate induced noise. The number of presentations of the visual stimulus sequence will automatically increase, using more trials to average and offset the decrease in signal-to-noise ratio caused by poor contact.
[0054] In step 2, to address potential side-channel attacks, the differential privacy perturbation module introduces a masking technique. During noise injection operations, the processor generates a series of intermediate mask values, ensuring that the actual feature data always participates in the calculation in a masked state. This prevents attackers from deducing the original EEG vector values even if they monitor changes in chip power consumption or electromagnetic radiation.
[0055] In step 3, when constructing the zero-knowledge proof credential, the system adds an environmental integrity check. The generation algorithm automatically obtains the current mobile terminal's operating environment characteristics, such as the kernel version number, geographic coordinates, and unique identifiers of nearby base stations. These environmental characteristics are mixed into the hash operation as salt. This means that zero-knowledge proofs generated by the same user in different locations and on different devices, even if based on the same EEG characteristics, will ultimately produce completely different proof strings. This spatial correlation increases the difficulty for attackers to conduct remote simulation attacks.
[0056] In step 4, to address potential partitioning failures in the blockchain network, the smart contract features a local state pre-synchronization function. In application scenarios with unstable network connections, user devices can perform partial verification with the nearest edge computing node. Edge nodes store a subset of the global ledger, enabling preliminary identity verification without connecting to the main chain. Once the network connection is restored, the edge nodes then upload the verification logs in batches to the main chain for final confirmation and permanent storage.
[0057] This embodiment also describes in detail the internal instruction flow of the hardware-level security chip. Upon authentication, the central processing unit (CPU) sends a verification instruction containing a random challenge value to the security chip. The security chip retrieves the private key from an isolated memory space and, with the assistance of a hardware accelerator, completes the critical algebraic operations for zero-knowledge proof. Throughout the process, the physical memory address where the private key resides is completely invisible to the external operating system. After the operation is complete, the chip only returns the final proof result and immediately erases the intermediate computation cache, thereby achieving the highest level of hardware security.
[0058] Example 4: This example describes the extended application of the present invention in a multi-user collaborative authentication scenario.
[0059] In certain highly sensitive operations, multiple authorized personnel are required to be present and authenticate their identities simultaneously. The method is logically extended in steps 3 and 4. Each authorized personnel wears an EEG acquisition device and generates their own zero-knowledge proof credential following the procedures in steps 1 to 3. During the submission phase, the system employs threshold signatures and multiple zero-knowledge proof techniques.
[0060] Smart contracts incorporate threshold logic, such as requiring at least 3 out of 5 authorized parties to verify the operation before it can be permitted. After collecting multiple proofs, the smart contract executes a parallel verification algorithm. The verification process for each proof is independent and confidential. Only when all verification functions meeting the threshold return true will the smart contract generate a aggregated authorization token.
[0061] In this model, each person's EEG characteristics remain rigorously protected by differential privacy. Even if one person's data is intercepted during transmission, an attacker cannot obtain any information about other participants through a single data point. Furthermore, due to the immediacy of EEG characteristics, all participants must receive external stimulation within the same timeframe, thus eliminating the possibility of pre-recorded characteristics or time-segmented impersonation.
[0062] Regarding the visual stimulation in step 1, this embodiment uses an augmented reality device as the stimulus presentation terminal. Through augmented reality glasses, the system can overlay virtual visual stimulus targets onto the real environment. This approach enhances user engagement and focus, thereby inducing stronger and more stable P300 waveform signals and further reducing the bit error rate of feature extraction.
[0063] Example 5: This example details the implementation of the distributed authentication method based on blockchain smart contracts in a cross-chain environment.
[0064] With the increase in decentralized applications, users may need to verify their identities across different blockchain networks. This invention achieves this functionality by introducing a cross-chain relay protocol in step 4.
[0065] During the registration phase, a user's public key and identity identifier are stored on a dedicated identity public blockchain. When a user initiates a verification request on a target blockchain, the smart contract on the target blockchain sends a query request to the identity public blockchain via a cross-chain relay. The verification nodes on the identity public blockchain perform non-interactive verification locally based on the zero-knowledge proof credentials submitted by the user and return the verification result to the target blockchain in the form of a cryptographic proof.
[0066] To ensure the security of cross-chain transmission, a short-lived digital signature is attached to the verification result. This digital signature is generated by a consensus node group of the identity public chain through multi-party computation. The target chain's contract only needs to verify the validity of this digital signature to confirm the user's identity. This architecture achieves "one-time registration, multi-chain mutual recognition," and throughout the entire cross-chain communication process, the user's original EEG characteristics and privacy data remain locally within the user's initial registration environment, with no sensitive information flowing across chains.
[0067] This embodiment also defines in detail the weight allocation strategy in multi-factor fusion verification. The smart contract dynamically adjusts the weight coefficients of EEG features, behavioral features, and environmental features in the final judgment based on the current security environment. For example, when a user logs in using their frequently used IP address, the verification weight of EEG features can be appropriately reduced; while in abnormal login attempts from other locations, the system automatically elevates EEG verification to the highest-weighted mandatory option and increases the number of visual stimulus loops to improve judgment accuracy. All these weight adjustment logics are automatically executed by the preset smart contract code without any human intervention, ensuring the objectivity and fairness of the verification process.
[0068] Example 6: This example focuses on adaptive calibration mechanisms for individual differences in EEG signal processing.
[0069] Considering the differences in scalp thickness, neuronal firing intensity, and sensitivity to visual stimuli among different individuals, this invention adds adaptive gain control and template matching steps in step 1.
[0070] During the initialization phase, the system guides the user through a brief benchmark test. By recording the user's background EEG noise level at rest, the system automatically adjusts the preamplifier's amplification factor to ensure the signal amplitude is within the optimal linear operating range of the analog-to-digital converter. The system then analyzes the P300 waveform from the benchmark test and uses clustering algorithms from machine learning to generate personalized feature templates for the user.
[0071] In the subsequent verification step 1, the extracted dynamic EEG feature vector is first compared with the personalized feature template. By calculating the Mahalanobis distance between the feature vector and the template, the system can initially eliminate abnormal data packets caused by electrode loosening or environmental interference. Only when the Mahalanobis distance is within a preset reasonable range will the feature vector be sent to step 2 for differential privacy perturbation. This preprocessing mechanism filters out invalid samples and improves the success rate of subsequent zero-knowledge proof generation.
[0072] In the privacy processing step 2, the system also calculates a customized privacy budget for each user based on the signal sensitivity extracted from the benchmark test. For users with significant signal characteristics, the scale of the Laplace noise can be appropriately increased to provide stronger privacy protection without affecting the final verification accuracy; for users with weak signals, the noise intensity is fine-tuned to ensure the verification pass rate.
[0073] Example 7: This example describes the application of the present invention in the scenario of medical data privacy protection.
[0074] In remote medical monitoring systems, medical staff or research institutions need to access patients' sensitive electroencephalogram (EEG) data for diagnosis. The method provided by this invention allows for "authorized access without revealing identity."
[0075] When healthcare professionals initiate a data access request, the patient confirms their identity using a portable EEG acquisition device. After steps 1 through 4 are completed, the smart contract verifies the patient's identity and authorization. Subsequently, the smart contract does not directly send the raw data but triggers a homomorphic encryption module. This module performs statistical analysis on the patient's differentially privacy-processed EEG data stored in the cloud under encrypted conditions and returns the analysis results to the healthcare professionals.
[0076] In this process, zero-knowledge proofs ensure that only the patient can initiate this data processing flow, while the combination of differential privacy and homomorphic encryption ensures that medical staff can only see statistically significant results and cannot access the patient's original neural fingerprint. This solution perfectly resolves the conflict between the development and utilization of medical big data and the protection of patient privacy.
[0077] In this embodiment, the blockchain ledger records detailed logs of each data access, including the visitor's identity, access time, authorized scope, and a summary of the returned results. These logs are linked using a chameleon hash function to ensure the integrity of the records, while also supporting controlled traceability by regulators using a unique trapdoor key under extreme legal compliance requirements.
[0078] Example 8: This example further explores the hardware redundancy and self-test design of the portable EEG acquisition device.
[0079] During the implementation of step 1, the acquisition device integrates a dual-backup acquisition circuit. When the main channel detects signal saturation or a continuous zero level, the logic controller automatically switches to the backup channel and sends a reminder signal to the user terminal, requesting a check of the electrode wearing position.
[0080] The device's internal digital signal processing unit incorporates a field-programmable gate array (FPGA)-based acceleration module. This module is specifically responsible for performing the higher-order filter operations in step 1 and the Laplace random number generation in step 2. Compared to general-purpose microcontrollers, the FPGA acceleration module can perform large-scale parallel computations with lower power consumption, ensuring real-time authentication.
[0081] In step 3, to address potential proof generation failures, the user terminal retains a short-term recovery mechanism based on secure multi-party computation. If the local proof generation algorithm is interrupted due to a temporary hardware failure, the terminal can send fragmented and encrypted perturbation feature data to two mutually uncommunicating trusted computing nodes. These two nodes will then assist in constructing the proof, and neither node can obtain the complete feature information independently.
[0082] This highly redundant design ensures that the system can still operate stably in complex real-world environments, providing uninterrupted authentication services.
[0083] Example 9: This example describes the application of the present invention in IoT device access control.
[0084] In smart homes or industrial IoT applications, numerous devices require frequent identity verification. This invention achieves low-latency access control by deploying smart contracts on lightweight blockchain nodes at the edge.
[0085] When a user unlocks a smart door lock or operates a precision machine tool via EEG verification, the verification process in step 4 is completed at an edge node within the local area network. Because non-interactive zero-knowledge proofs are used, only one data exchange is required between the user terminal and the edge node. The verification result is directly sent to the device controller via an encrypted channel.
[0086] To prevent physical device swapping, each IoT device integrates a streamlined version of zero-knowledge verification logic. When a device receives an authorization command, it verifies whether the command is accompanied by a successful verification credential signed by a smart contract. This two-way verification mechanism ensures end-to-end security from people to devices and from devices to the cloud.
[0087] In step 1, considering the usage habits of IoT users, visual stimuli can be integrated into the watch face of a smartwatch or the display panel of a smart home device. The system supports seamless switching between multiple stimulation modes, such as switching from visual stimulation to tactile vibration stimulation, thereby meeting the usage needs of visually impaired individuals or those working in special environments.
[0088] Example 10: This example details the scalability design of the system, particularly the mechanism for algorithm updates.
[0089] Considering the continuous evolution of cryptographic algorithms and neuroscience feature extraction techniques, this invention reserves a version upgrade interface in the smart contract.
[0090] The zero-knowledge proof algorithms and verification rule sets used in steps 3 and 4 exist as modular plug-ins. When a more efficient algorithm emerges, the system can deploy the new algorithm logic plug-in on the blockchain through the DAO (Decentralized Autonomous Organization) voting mechanism.
[0091] The old version of the credentials remains valid during the transition period, but the system will guide users to automatically complete the algorithm migration during their next authentication. This ability to smoothly upgrade ensures that the system can withstand potential computing power threats such as future quantum computing, maintaining long-term security.
[0092] In step 2, the allocation logic of the privacy budget parameters can also be optimized in real time through on-chain parameter configuration. For example, based on the frequency of spoofing attacks recently detected across the entire network, the system automatically lowers the overall privacy budget threshold to enhance global defense strength. This dynamic security strategy based on group awareness enables the authentication system to evolve.
[0093] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0094] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A distributed authentication method based on blockchain smart contracts, characterized in that, Includes the following steps: Step 1: Acquire the electroencephalogram (EEG) signals generated by the user under preset external stimuli using a portable EEG acquisition device, and filter and denoise the EEG signals to extract dynamic EEG feature vectors with identity discrimination. Step 2: Input the dynamic EEG feature vector into the differential privacy perturbation module. Under the premise of satisfying the preset privacy budget constraint, inject random noise into the dynamic EEG feature vector to generate perturbation feature data with privacy protection processing. Step 3: Based on the perturbation feature data and combined with the user's locally stored private key information, construct a zero-knowledge proof credential to prove the legitimacy of the user's identity. The zero-knowledge proof credential can verify whether the user has an EEG response pattern that matches the registered identity without exposing the original EEG features and private key content. Step four: Submit the zero-knowledge proof credential to a smart contract deployed in the blockchain network. The smart contract performs non-interactive verification of the zero-knowledge proof credential according to preset verification logic and returns a judgment instruction for identity authentication pass or fail based on the verification result.
2. The distributed authentication method based on blockchain smart contracts according to claim 1, characterized in that, The process of acquiring the electroencephalographic signals includes: Multiple dry electrode sensors are simultaneously acquired by multiple channels of electroencephalogram (EEG) signals by configuring multiple dry electrode sensors in the frontal lobe, parietal lobe and occipital lobe of the user’s head. The dry electrode sensors are fixed to the surface of the user’s scalp by an elastic headband, and the electrode material is silver or silver chloride composite material. The system presents users with a visual odd sphere paradigm stimulus sequence consisting of alternating high-frequency standard stimuli and low-frequency target stimuli in a predetermined ratio. The standard stimuli and the target stimuli are distinguished on the display terminal by different geometric shapes or colors, so as to induce users to generate event-related potential components with identity recognition characteristics. The portable EEG acquisition device records the multi-channel EEG signals in real time at a preset sampling frequency, and converts the analog electrical signals into digital signals with preset precision through an internally integrated analog-to-digital converter module.
3. The distributed authentication method based on blockchain smart contracts according to claim 2, characterized in that, The process of filtering and denoising the electroencephalogram (EEG) signals includes: using a bandpass filter to filter the original digital signals by frequency selection, wherein the low cutoff frequency of the bandpass filter is set to 0.5 Hz and the high cutoff frequency is set to 30 Hz, thereby filtering out baseline drift and high-frequency electromagnetic noise. The independent component analysis algorithm is used to perform blind source separation on multi-channel signals, decompose the original observation signal into several statistically independent components, identify and remove independent components with specific waveform characteristics, remove eye movement interference, electromyography interference and power frequency interference, and use inverse transform to reconstruct pure electroencephalographic signals. The reconstructed signal is smoothed by a sliding window averaging method, wherein the length and step size of the sliding window are preset according to the signal sampling rate.
4. The distributed authentication method based on blockchain smart contracts according to claim 3, characterized in that, The extraction process of the dynamic EEG feature vector includes: Multidimensional physiological feature parameters are extracted from the denoised event-related potential components. These physiological feature parameters include the peak voltage of the peak, the latency from the moment of stimulus presentation to the appearance of the peak, the peak width of the waveform curve on the time axis, and the power spectral density distribution within the frequency band. The extracted physiological feature parameters are combined to construct a high-dimensional feature vector with individual uniqueness.
5. The distributed authentication method based on blockchain smart contracts according to claim 4, characterized in that, The process of generating the disturbance feature data includes: The privacy budget parameter is dynamically set according to the security level of the application scenario, and the value of the privacy budget parameter is reduced when the security level is increased. The sensitivity of the dynamic EEG feature vector in the global range is calculated, and the scale parameter of the random noise is determined based on the proportional relationship between the sensitivity and the privacy budget parameter. The scale parameter is directly proportional to the sensitivity and inversely proportional to the privacy budget parameter. Random values that follow a Laplace distribution or a normal distribution are generated, and these random values are summed to each dimension of the original dynamic EEG feature vector, so that the generated perturbation feature data retains the statistical distribution characteristics of the original data and erases precise individual waveform details.
6. The distributed authentication method based on blockchain smart contracts according to claim 5, characterized in that, The construction process of the zero-knowledge proof credential includes: The user equipment runs a non-interactive zero-knowledge proof generation algorithm in a local trusted execution environment. The input parameters of the non-interactive zero-knowledge proof generation algorithm include the perturbation feature data, the user's private key stored in the hardware-level security chip, and the public reference string generated during the registration phase. The non-interactive zero-knowledge proof generation algorithm maps the perturbation feature data to the coefficients of a polynomial equation, and uses the user's private key to perform a signature operation on the solution of the polynomial equation, and outputs a proof string composed of numerical values over a finite field through algebraic transformation. The proof string constitutes logically consistent evidence of the proposition that the user possesses a private key that conforms to the EEG response pattern, and the content of the proof string cannot be reversed to obtain the original EEG feature information or private key bit information.
7. The distributed authentication method based on blockchain smart contracts according to claim 6, characterized in that, The process of a smart contract performing non-interactive verification includes: The smart contract retrieves the public key and public parameters of the corresponding user stored on the blockchain, parses the received zero-knowledge proof certificate, and extracts the proof string. The on-chain pre-built verification function is invoked, and the proof string is subjected to elliptic curve-based dot addition and dot multiplication operations in combination with the public key and public parameters to verify whether it meets the predefined logical constraints. The logical constraints are set based on the statistical boundary conditions of the legitimate identity EEG response patterns determined during the registration phase. If the verification result satisfies all the logical constraints, the identity authentication is deemed successful, and the verification record and timestamp are stored in the blockchain ledger in encrypted form.
8. The distributed authentication method based on blockchain smart contracts according to claim 7, characterized in that, The method further includes an identity registration phase, which includes: Initial EEG characteristics of users are collected in a trusted environment, and differential privacy perturbation processing is performed to generate initial perturbation feature data; Based on the initial perturbation feature data, a public-private key pair is generated using an asymmetric encryption algorithm. The public key, along with the public parameters of the zero-knowledge proof, is uploaded to the blockchain, and the private key is stored in the user's local hardware-level security chip. A timestamp binding mechanism is introduced, which combines the user's identity identifier, the public key, and the millisecond-level timestamp of the registration time, and generates a globally unique registration fingerprint through a hash algorithm and writes it into the blockchain.
9. The distributed authentication method based on blockchain smart contracts according to claim 8, characterized in that, The method also supports a multi-factor fusion verification mode and recursive proof logic, specifically including: collecting the user's gait features, iris features or geographic location environmental context information as auxiliary verification factors, and performing differential privacy processing on the auxiliary verification factors respectively; Each of the dynamic EEG feature vectors and each of the auxiliary verification factors is used to generate a corresponding proof fragment. Multiple proof fragments are then aggregated into a fixed-length comprehensive proof string using a recursive proof combination technique. The smart contract dynamically adjusts the weight coefficients of the dynamic EEG feature vector and each of the auxiliary verification factors in the final determination based on the current security environment, and performs multi-level identity verification based on the comprehensive proof string.
10. The distributed authentication method based on blockchain smart contracts according to claim 9, characterized in that, The method also includes a hardware self-test and compensation mechanism, specifically including: The portable EEG acquisition device monitors the contact impedance value of the dry electrode sensor in real time. When the contact impedance value exceeds the preset impedance threshold, it automatically increases the gain of the preamplifier and turns on the notch filter. Increasing the number of presentations of the visual oddball paradigm stimulus sequence improves the signal-to-noise ratio by increasing the number of trial superpositions and averagings. When constructing the zero-knowledge proof credential, the operating environment characteristics of the mobile terminal are obtained as a salt value and mixed into the hash operation, so that the proof strings generated by the same user on different devices have spatial correlation differences.