A dynamic encryption-based mask consumable authentication system and method
Patent Information
- Application Number
- CN202611187053.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-09
AI Technical Summary
为此,本发明提出一种基于动态加密的面膜耗材认证系统及方法,能够解决美容仪面膜耗材易仿制、易克隆、易盗版的问题,建立不可破解的原厂耗材专属认证体系
[0025]本发明实施例至少实现以下有益效果:本发明通过在面膜NFC芯片中预置与主机相同的AES-128密钥,并执行双向认证,使得盗版芯片因缺少正确的密钥而无法通过认证。本发明的密钥K仅在出厂时预置于主机端的安全存储区和耗材端的OTP密钥区,在设备的整个生命周期中绝不通过NFC空中接口传输。NFC空中接口仅传输密文数据。这一机制从物理层面切断了攻击者通过被动监听获取认证信息的一切途径。每次认证过程中,主机端的真随机数发生器均生成唯一且不可预测的128位随机数R,使每次认证的密文均动态变化,实现一次一密。本发明实现了主机与耗材之间的双向认证,从根本上杜绝了盗版设备配合正品耗材或正品设备配合盗版耗材两种单侧欺骗场景。本发明通过NFC加密芯片内部集成的一次性可编程失效单元,实现了耗材使用后的不可逆永久失效。护理完成后,主机通过加密指令触发芯片内部熔丝熔断,使AES加密内核的供电通路和OTP密钥区的读出通路被永久切断,不可恢复、不可重置、不可通过任何手段绕开。该机制彻底杜绝了耗材的重复使用、交叉使用和翻新销售,从根本上保障了用户的卫生安全,同时有力维护了正品耗材的市场秩序。本发明针对面膜耗材无法联网的刚性约束,设计了离线同源密钥预分发机制,主机端和耗材端在出厂时通过离线烧录方式预置相同的AES密钥K,密钥K在设备的整个生命周期中既不参与空中传输,也不依赖网络在线分发。这一机制使得认证过程完全在离线环境下闭环完成,既解决了无联网场景下的密钥安全分发难题,又避免了联网认证可能引入的网络攻击面,大幅降低了系统的整体安全风险。
Smart Images

Figure CN122885891A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of encryption authentication, and in particular to a mask consumable authentication system and method based on dynamic encryption. Background Technology
[0002] Currently, consumables such as face masks and conductive gels used in home and commercial beauty devices generally adopt identification methods such as NFC read-only UID, simple card number comparison, and no encryption verification. There is no high-strength security authentication system between the device and the consumables, which presents the following prominent technical and commercial problems:
[0003] 1. Consumables are extremely easy to counterfeit and clone: They only read the fixed UID of the NFC chip and have no encryption algorithm protection. Counterfeit chips can easily copy the UID to bypass device authentication.
[0004] 2. Consumables can be reused and abused: There is no usage status marking or irreversible failure mechanism, and the face mask can still be reused multiple times after use, so hygiene and safety cannot be guaranteed;
[0005] 3. Communication data is easily eavesdropped on and cracked: Authentication data is transmitted in plaintext, and users or third parties can capture communication data packets and reverse engineer the authentication logic;
[0006] 4. Lack of two-way identity verification: The device only identifies consumables in one direction and cannot verify the legality, originality, or validity of the consumables;
[0007] 5. Damage to core business interests: The proliferation of pirated consumables has resulted in a significant loss of revenue for original consumables manufacturers, damaging both brand reputation and product safety.
[0008] Most beauty devices on the market use a consumable identification solution that combines NFC UID reading with local whitelist comparison. The implementation involves the device reading the fixed UID of the mask's NFC chip; comparing it with a list of valid UIDs stored internally; if they match, operation is allowed; otherwise, operation is disabled. The shortcomings of this existing solution include:
[0009] 1. UID can be easily copied: The UID of a regular NFC bare chip can be cloned, and counterfeit consumables can easily pass authentication. The root cause is the lack of encryption algorithms and two-way verification.
[0010] 2. Plaintext transmission is easily cracked: UIDs are transmitted in plaintext, which can be captured, sniffed, and reverse engineered. The root cause is that they are transmitted without encryption or ciphertext.
[0011] 3. No dynamic anti-replay mechanism: The authentication data is exactly the same every time, and the device can be deceived by replaying the communication data. The root cause is the lack of random numbers and dynamic encryption.
[0012] 4. Lack of single-use control: The masks can still be reused after use, which is due to the lack of expiration marking and irreversible locking mechanism;
[0013] 5. Keyless security system: No encryption, no decryption, no two-way verification, extremely low security level, and cannot form a technical barrier. Summary of the Invention
[0014] This invention aims to solve at least one of the technical problems existing in the prior art. To this end, this invention proposes a mask consumable authentication system and method based on dynamic encryption, which can solve the problems of easy counterfeiting, cloning, and piracy of beauty device mask consumables, and establish an unbreakable original manufacturer consumable exclusive authentication system.
[0015] One embodiment of the present invention provides a mask consumable authentication system based on dynamic encryption, comprising: a host terminal and a consumable terminal, wherein the host terminal and the consumable terminal are connected via NFC near-field wireless communication; the host terminal includes: a main control unit, an NFC read / write module, an AES encryption unit, a true random number generator, and a secure storage area, wherein the secure storage area is pre-loaded with an AES key K; the consumable terminal includes: an NFC encryption chip, wherein the NFC encryption chip has an OTP key area, an AES encryption core, and a one-time programmable invalidation unit, wherein the OTP key area is pre-loaded with a key K that is connected to the host terminal. The same AES key K is used; the host and the consumable terminal perform the following two-way authentication process: the host generates a 128-bit random number R using the true random number generator, performs AES-128 encryption on the random number R using the key K through the AES encryption unit to obtain a first ciphertext C1, and sends the first ciphertext C1 to the consumable terminal through the NFC read / write module; the consumable terminal performs AES-128 decryption on the received first ciphertext C1 using the key K through the AES encryption kernel to obtain the random number R. The random number R is encrypted using the key K using AES-128 to generate a second ciphertext C2, which is then returned to the host via NFC. The host then uses the AES encryption unit and the key K to decrypt the received second ciphertext C2 using AES-128 to obtain a decryption result R′. The random number R is compared with the decryption result R′; if they match, authentication is successful and the function is unlocked; otherwise, authentication fails and the function is locked. Upon confirmation of completed care, the host generates a failure control command F, which is transmitted via the AES encryption unit. The failure control command F is encrypted using the key K using AES-128 to obtain a third ciphertext C3, which is then sent to the consumable device via NFC. The consumable device uses the AES encryption kernel to decrypt the third ciphertext C3 using the key K to obtain the failure control command F. Based on the failure control command F, the one-time programmable failure unit is triggered to perform an irreversible hardware fuse, permanently disabling the NFC encryption chip. The key K is pre-installed on both the host device and the consumable device and does not participate in NFC over-the-air transmission.
[0016] According to some embodiments of the present invention, the key K is pre-installed in the Flash security isolation partition on the host side and the OTP non-erasable key area on the consumable side by offline burning at the factory; the key K is only used as an internal calculation parameter of the encryption engine, is not mapped to the system bus, does not participate in data interaction, and cannot be read or modified through any external interface.
[0017] According to some embodiments of the present invention, the host compares the random number R with the decryption result R′ by a bit-by-bit hard comparison performed by a hardware comparison circuit, without going through the CPU software relay.
[0018] According to some embodiments of the present invention, the AES encryption is the AES-128 algorithm, the key K and the random number R are both 128 bits in length, and the single authentication response time is less than 50ms.
[0019] According to some embodiments of the present invention, during the two-way authentication process, the host terminal is further configured to: dynamically select at least two authentication factors from a plurality of preset authentication factors to form an authentication factor combination, wherein the plurality of authentication factors include: a time factor T, a consumable usage count N, and a host identity factor H; generate challenge data according to the authentication factor combination, encrypt the challenge data using the key K, and generate the first ciphertext C1; after receiving and decrypting the first ciphertext C1, the consumable terminal verifies whether each factor in the authentication factor combination is consistent with the corresponding factor stored locally, and if they are all consistent, generates a response ciphertext C2 and returns it.
[0020] According to some embodiments of the present invention, the method of dynamically selecting authentication factor combinations by the host is as follows: based on the current number of authentications or time period, different combinations are selected from the plurality of authentication factors according to a preset polling strategy; the factor combination selected for each authentication differs from the factor combination selected for the previous authentication by at least one factor; the host embeds the identification information of the selected factor combination into the first ciphertext C1, and the consumable terminal determines the factor to be verified for this authentication based on the identification information.
[0021] According to some embodiments of the present invention, the host terminal and the consumable terminal are further pre-configured with a root key Kr, which is stored in the OTP area and never participates in over-the-air transmission; before each authentication, the host terminal derives a session key Ks based on the root key Kr, the random number R, and the current timestamp; the host terminal and the consumable terminal use the session key Ks to perform encryption and decryption operations in place of the key K; the session key Ks is only valid within the current authentication cycle and becomes invalid after the authentication ends.
[0022] According to some embodiments of the present invention, the NFC encryption chip of the consumable terminal also stores encrypted physiotherapy parameter configuration data; after successful authentication, the host terminal is further configured to: send a parameter read request to the consumable terminal; receive the encrypted physiotherapy parameter configuration data returned by the consumable terminal, decrypt the encrypted physiotherapy parameter configuration data using the key K to obtain the physiotherapy parameter configuration; control the physiotherapy function module of the host terminal to perform corresponding nursing operations according to the physiotherapy parameter configuration; if decryption is not possible or the decrypted physiotherapy parameter configuration does not conform to the preset format, the function is locked and a consumable abnormality is indicated; the consumable terminal is also configured to: in response to the parameter read request, return the encrypted physiotherapy parameter configuration data to the host terminal via NFC.
[0023] According to some embodiments of the present invention, the physiotherapy parameter configuration data, together with the random number R or the unique identifier of the consumable terminal, are used as plaintext, encrypted using the key K using AES-128, and then stored in the data storage area of the NFC encryption chip. When the host terminal decrypts the physiotherapy parameter configuration data, it simultaneously verifies whether the random number R or the unique identifier of the consumable terminal is consistent with that used in this authentication process. If they are inconsistent, the parameter data is deemed invalid. Different models or batches of the consumable terminal store different physiotherapy parameter configuration data. The host terminal automatically identifies the model or batch of the consumable terminal based on the decrypted physiotherapy parameter configuration data and performs nursing operations according to the corresponding physiotherapy plan.
[0024] Another embodiment of the present invention provides a method for authenticating facial mask consumables based on dynamic encryption, comprising the following steps: S1, a key presetting step, wherein the same AES key K is preset on both the host end and the consumable end, and the key K does not participate in NFC over-the-air transmission; S2, a random challenge generation step, wherein the host end generates a 128-bit random number R, and uses the key K to encrypt the random number R using AES-128 to obtain a first ciphertext C1, and sends it to the consumable end via NFC; S3, a consumable decryption response step, wherein the consumable end uses the key K to decrypt the received first ciphertext C1 using AES-128 to obtain the random number R, and uses the key K to encrypt the random number R using AES-128 to obtain a second ciphertext C2, and returns it to the host end via NFC; 4. Host verification step: The host uses the key K to decrypt the received second ciphertext C2 using AES-128, obtaining the decryption result R′. The random number R is compared with the decryption result R′. If they match, the authentication is successful and the function permission is unlocked; if they do not match, the authentication fails and the function is locked. S5. Failure locking step: After confirming the completion of care, the host generates a failure control command F, uses the key K to encrypt the failure control command F using AES-128, obtaining the third ciphertext C3, and sends it to the consumable terminal via NFC. The consumable terminal uses the key K to decrypt the third ciphertext C3 using AES-128, obtaining the failure control command F, and executes a one-time programmable hardware fuse according to the failure control command F, permanently disabling the consumable terminal.
[0025] The embodiments of this invention achieve at least the following beneficial effects: By pre-setting the same AES-128 key as the host in the NFC chip of the mask and performing two-way authentication, this invention prevents counterfeit chips from passing authentication due to the lack of a correct key. The key K of this invention is only pre-set in the secure storage area on the host and the OTP key area on the consumable at the factory, and is never transmitted through the NFC air interface throughout the device's entire lifecycle. The NFC air interface only transmits encrypted data. This mechanism physically cuts off all avenues for attackers to obtain authentication information through passive eavesdropping. During each authentication process, the true random number generator on the host generates a unique and unpredictable 128-bit random number R, ensuring that the encrypted data changes dynamically with each authentication, achieving one-time key exchange. This invention achieves two-way authentication between the host and the consumable, fundamentally eliminating the two one-sided deception scenarios of counterfeit devices using genuine consumables or genuine devices using counterfeit consumables. This invention achieves irreversible permanent failure of the consumable after use through a one-time programmable failure unit integrated within the NFC encryption chip. After the treatment is completed, the host computer triggers an internal fuse in the chip via an encryption command, permanently severing the power supply path of the AES encryption core and the read path of the OTP key area. This severance is irreversible, unresettable, and cannot be bypassed by any means. This mechanism completely eliminates the reuse, cross-use, and refurbishment of consumables, fundamentally ensuring user hygiene and safety while effectively maintaining the market order of genuine consumables. Addressing the rigid constraint that facial mask consumables cannot connect to the internet, this invention designs an offline, same-source key pre-distribution mechanism. The host and consumable terminals are pre-programmed with the same AES key K at the factory via offline burning. Key K neither participates in over-the-air transmission nor relies on online network distribution throughout the device's lifecycle. This mechanism ensures that the authentication process is completed entirely in a closed loop offline, solving the key security distribution problem in offline scenarios and avoiding the network attack surface that network authentication might introduce, significantly reducing the overall security risk of the system.
[0026] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0027] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0028] Figure 1 This is a schematic block diagram of the system modules according to an embodiment of the present invention;
[0029] Figure 2 This is a schematic diagram of the host end, consumable end, and AES-128 dynamic encryption authentication closed-loop process in an embodiment of the present invention.
[0030] Figure label:
[0031] The components include: host unit 100, consumable unit 200, main control unit 110, NFC read / write module 120, AES encryption unit 130, true random number generator 140, secure storage area 150, NFC encryption chip 210, OTP key area 211, AES encryption kernel 212, and one-time programmable failure unit 213. Detailed Implementation
[0032] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0033] In the description of this invention, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0034] Example 1: As Figure 1 As shown, the mask consumable authentication system based on dynamic encryption provided by the present invention includes a host terminal 100 and a consumable terminal 200.
[0035] The host unit 100 is the main unit of the beauty device, which is equipped with a main control unit 110, an NFC read / write module 120, an AES encryption unit 130, a true random number generator 140, and a secure storage area 150.
[0036] The main control unit 110 uses an STM32 series microcontroller (MCU) to control the coordinated operation of various system modules. The NFC read / write module 120 uses an NFC reader / writer chip compliant with the ISO / IEC 14443-A standard, operating at a frequency of 13.56MHz, for near-field wireless communication with the consumable terminal 200. The AES encryption unit 130 is a hardware encryption accelerator integrated within the MCU, supporting AES-128 encryption and decryption operations. The true random number generator 140 is a hardware TRNG integrated within the MCU, generating true random numbers based on circuit thermal noise or oscillator jitter. The secure storage area 150 is a secure, isolated partition of the MCU's internal Flash memory.
[0037] The consumable end 200 is a disposable facial mask consumable, which internally encapsulates an NFC encryption chip 210. The NFC encryption chip 210 uses an NFC Forum Type 2 tag chip that supports AES-128 encryption, and its internal components include an OTP key area 211, an AES encryption core 212, and a one-time programmable failure unit 213.
[0038] The OTP key area 211 is a one-time programmable memory used to program and store the AES key K at the factory. Once programmed, it cannot be erased, modified, or read through an external interface. The AES encryption core 212 is an integrated hardware AES-128 encryption / decryption engine. The key is directly mapped to the AES core and has no external output port. The one-time programmable failure unit 213 is an internal electronic fuse array that can perform an irreversible fuse-breaking operation upon receiving a failure command.
[0039] The host device 100 and the consumable device 200 are connected via NFC near-field wireless communication, which follows the ISO / IEC 14443-A protocol. The NFC air interface only transmits encrypted data and does not transmit the key K.
[0040] The core inventive premise of this invention is:
[0041] 1. Offline same-source key pre-distribution mechanism: Before leaving the factory, the host and the mask chip are programmed offline to solidify the 128-bit AES master key K into the host Flash security isolation area and the mask NFC chip OTP key area respectively; the key is only used as an internal calculation parameter of the hardware encryption engine, does not map to the system bus, does not participate in data interaction, is unreadable externally, and cannot be tampered with.
[0042] 2. True random dynamic challenge mechanism: In each authentication cycle, the host hardware TRNG generates a unique and unpredictable 128-bit random number R to achieve one-time password and resist replay, timing and side-channel attacks at the underlying level.
[0043] 3. Closed-loop local encryption and decryption on the device side: All AES encryption and decryption are completed independently within the host hardware encryption accelerator and the security core of the mask chip; the air interface only transmits ciphertext blocks, with no plaintext, no key, and no leakage of intermediate computation values.
[0044] 4. OTP hardware-level one-time lock-up mechanism: After the consumable is used, the encrypted command triggers the one-time programmable unit of the mask chip to melt, and the function is permanently disabled, with no possibility of software rollback, cracking, or reuse.
[0045] The complete authentication process in this embodiment includes the following steps:
[0046] Step 1: Factory Offline Key Reservation (Underlying Security Foundation • Innovative Point: Zero Key Transmission):
[0047] On the host side: the 128-bit AES key K is burned into the Flash secure isolation partition and protected by hardware read / write; the program can only call it indirectly through the encryption engine interface and cannot directly access the original key text;
[0048] On the chip side of the mask: the same 128-bit AES key K is burned into the OTP non-erasable key area; after the chip is powered on, the key is directly mapped to the AES core, and there is no external output port.
[0049] Step 2: Host power-on initialization (hardware driver layer • key isolation loading):
[0050] 1. The host MCU starts up and completes the initialization of the system clock and peripheral bus;
[0051] 2. Driver initialization of NFC RF module, hardware AES128 encryption accelerator, and TRNG true random number generator;
[0052] 3. The program implicitly loads the security key K into the encryption engine register through the encryption engine interface; the key does not enter RAM and does not participate in data operations;
[0053] 4. Self-test complete, NFC enters RF field listening standby mode.
[0054] Significance at the program level: The key is completely isolated from the application, realizing a security architecture where "the program calls the key but cannot perceive the key".
[0055] Step 3: Mask application and activation (passive wake-up • encrypted link establishment):
[0056] 1. When the mask is placed near the NFC sensing area, the radio frequency field energy enables passive power-on and wake-up;
[0057] 2. The mask chip initializes the AES kernel and implicitly loads key K from the OTP area;
[0058] 3. The host and the mask complete the ISO14443 low-level handshake and establish a pure encrypted transmission channel.
[0059] Program-level significance: No key exchange, no plaintext handshake, and inherently secure isolation of the link.
[0060] Step 4: The host generates a random challenge and sends it with hardware encryption (dynamic challenge, one-time password):
[0061] 1. The host triggers the hardware TRNG to generate a 128-bit one-time random number R, which is stored in the CPU temporary stack and cleared immediately upon completion of authentication;
[0062] 2. Hardware AES accelerator performs encryption operations:
[0063] C1 = AES128_Encrypt(K, R);
[0064] 3. The entire operation is completed within the hardware kernel; K and R are not exposed externally.
[0065] 4. The host only sends the encrypted text C1 to the mask chip.
[0066] Significance at the program level: It abandons static verification with fixed serial numbers / keys and uses dynamic random challenges to achieve underlying anti-copying and anti-replay measures.
[0067] Step 5: Mask chip decryption verification + encrypted response (two-way mutual authentication • secure end-side computation):
[0068] 1. The mask receiver C1 directly sends the data to the built-in AES core;
[0069] 2. Hardware decryption operation:
[0070] R=AES128_Decrypt(K,C1);
[0071] 3. The chip internally performs format, length, and validity checks; if these checks pass, the host is confirmed to be legitimate.
[0072] 4. Based on the same R, hardware encryption is used to generate ciphertext for responses:
[0073] C2 = AES128_Encrypt(K, R);
[0074] 5. The mask only sends the encrypted C2 data back to the host.
[0075] Program-level significance: Two-way mutual authentication; pirated chips lack the K key, making them impossible to decrypt and generate a legitimate C2.
[0076] Step 6: Host decryption comparison + access control (hardware-level comparison • authentication closed loop):
[0077] 1. The host receives C2 and sends it to the hardware AES accelerator for decryption:
[0078] R′=AES128_Decrypt(K,C2);
[0079] 2. The hardware comparison circuit performs a bit-by-bit hard comparison of R and R′ without going through the CPU software intermediary;
[0080] 3. Logical judgment:
[0081] If R=R′: Authentication successful, set the valid flag, and unlock physiotherapy function permissions;
[0082] If R≠R′: Authentication fails, immediately disable NFC, lock function, and issue an alarm.
[0083] Significance at the program level: Hardware comparison prevents software tampering and timing attacks, forming a complete security loop.
[0084] Step 7: End of nursing care + encryption deactivation command + OTP hardware lock (underlying implementation for disposable consumables):
[0085] 1. Nursing complete, the host generates chip failure control command F;
[0086] 2. Hardware AES encryption invalidation command:
[0087] C3 = AES128_Encrypt(K, F);
[0088] 3. The host computer sends encrypted message C3 to the face mask;
[0089] 4. Mask decryption command:
[0090] F = AES128_Decrypt(K, C3);
[0091] 5. Triggering OTP one-time programming permanently disables the status register and AES key unit;
[0092] 6. Once locked, the chip cannot encrypt or decrypt, cannot respond to authentication, and is permanently disabled at the physical level.
[0093] Program-level significance: Encrypted instructions + hardware fuse lock, making it impossible to crack, refurbish, or reuse.
[0094] This invention is not a simple combination of the AES algorithm and NFC communication, but rather an innovative design based on an embedded hardware security architecture, featuring offline same-source key distribution, true random dynamic challenge, bidirectional hardware encryption and decryption, independent end-side computation, over-the-air zero-plaintext / zero-key transmission, and OTP hardware lock-in for a complete authentication protocol.
[0095] At the program level, it implements a four-fold security design of key isolation, computation isolation, transmission isolation, and permission isolation, which completely solves the pain points of traditional solutions such as key leakage, easy forgery, easy reuse, and easy cracking, and has outstanding non-obviousness and industrial applicability.
[0096] Example 2: The mask consumable certification scenario targeted by this invention has the following special constraints that differ from general certification scenarios. These constraints directly affect the design of the technical solution of this invention:
[0097] (i) Passive Power Supply Constraint. The NFC encryption chip 210 in the mask consumable relies entirely on the radio frequency field energy emitted by the NFC read / write module 120 of the host 100 for passive power-on wake-up. The chip has no internal battery or other power source. This constraint requires extremely low power consumption; AES encryption and decryption operations must be completed at microwatt levels. This invention minimizes power consumption by integrating a dedicated hardware AES encryption core 212 within the NFC encryption chip 210 instead of using software for encryption operations. This ensures stable operation of the chip under standard NFC reader field strength (1.5A / m to 7.5A / m) and a communication distance of at least 3cm.
[0098] (II) Ultra-low Cost Constraint. As a disposable consumable, the material cost of a single NFC encryption chip for facial masks must be kept extremely low. This constraint excludes the possibility of using high-cost security chips (such as financial-grade security chips, high-end NFC chips supporting asymmetric encryption, etc.). This invention selects a cost-optimized NFC Forum Type 2 tag chip, using symmetric encryption (AES-128) instead of asymmetric encryption to reduce chip area and cost, while further reducing chip manufacturing costs by replacing the erasable memory with an OTP key area.
[0099] (III) No Network Constraints. The facial mask consumables cannot connect to the internet before or during use, and therefore cannot exchange keys or authenticate with the cloud server online. This constraint requires the authentication process to be completed entirely offline, and the key must be pre-deployed at the factory. This invention employs an "offline same-source key pre-distribution" mechanism—at the factory, the same AES key K is written into the secure storage area 150 of the host terminal 100 and the OTP key area 211 of the consumable terminal 200 respectively via offline burning—key K never participates in over-the-air transmission throughout its entire lifecycle, and does not rely on the network for key distribution.
[0100] (iv) Single-use constraint. Facial mask consumables must be permanently disabled after use and cannot be reused to ensure hygiene and safety. This constraint requires a hardware-level, irreversible failure mechanism, rather than a software-level "mark as used"—the latter can be bypassed by resetting or rewriting stored data. This invention integrates a one-time programmable failure unit 213 (electronic fuse array) into the NFC encryption chip 210. After use, an encryption command triggers the fuse to blow, permanently disabling the chip's AES encryption core 212 and OTP key area 211, physically preventing the chip from being reset or reused.
[0101] Example 3: During the manufacturing stage of the facial mask consumables, a key presetting operation is performed.
[0102] Host-side key programming: During the production of the beauty device's motherboard, a dedicated programmer programs the 128-bit AES key K into the Flash security isolation partition 150 of the main control unit 110. After programming, hardware read and write protection is enabled—read operations on the key storage area are hardware-disabled; any attempt to read this area via the system bus or debug interface (such as JTAG / SWD) will be intercepted by the hardware and trigger a system reset. Key K is only used as an internal calculation parameter of the AES encryption unit 130; the program cannot directly access the key text, and the key does not enter RAM or participate in data calculations.
[0103] Consumable-side key programming: During the wafer testing or module packaging stage of the NFC encryption chip 210, the same 128-bit AES key K is programmed into the OTP key area 211 through a dedicated programming interface provided by the chip manufacturer. The OTP key area 211 is fused after programming, and the key data is permanently locked—it cannot be erased, modified, or read through any external interface (including the NFC air interface and chip test interface). After the chip is powered on, key K is directly mapped to the key register of the AES encryption core 212, without being transmitted through the system bus.
[0104] Key consistency verification: During the factory quality inspection, the key fingerprints (the hash value of the key, not the original key text) of the host and consumables are read separately by dedicated testing equipment. If they match, the consumables are released for shipment.
[0105] Example 4: The following is combined with Figure 2 This describes the authentication process in an embodiment of the present invention.
[0106] Step 1: Power on and initialize the host:
[0107] When the user powers on the beauty device, the main control unit 110 starts up and initializes the system clock and peripheral bus. The driver initializes the NFC read / write module 120, the AES encryption unit 130, and the true random number generator 140. The main control unit 110 implicitly loads the key K from the secure storage area 150 into the key register of the AES encryption unit 130 through the encryption engine interface—the key K does not enter RAM or pass through the CPU register. After self-testing, the NFC read / write module 120 enters the radio frequency field listening standby state and continuously transmits a 13.56MHz carrier signal.
[0108] Step Two: Applying the Mask for Activation:
[0109] After applying the disposable facial mask 200 to the face, the user brings the beauty device main unit close to the area where the NFC encryption chip 210 is located on the mask. The NFC encryption chip 210 enters the radio frequency field of the NFC read / write module 120 (distance ≤ 5cm), and is passively powered on and woken up by the radio frequency field energy. The internal power-on reset circuit of the chip completes initialization, and implicitly loads key K from the OTP key area 211 to the key register of the AES encryption core 212. The main unit 100 and the consumable unit 200 complete the low-level handshake according to the ISO / IEC 14443-A protocol to establish an NFC communication link.
[0110] Step 3: The host generates a random challenge and sends it in encryption:
[0111] The main control unit 110 triggers the true random number generator 140 to generate a 128-bit one-time random number R. The true random number generator 140 generates an unpredictable random bit sequence based on the chip's internal thermal noise or oscillator jitter, ensuring that each generated R is truly random, non-repeatable, and unpredictable. The random number R is temporarily stored in the CPU stack and is immediately cleared after authentication.
[0112] The main control unit 110 calls the AES encryption unit 130 to perform AES-128 encryption on the random number R using the key K:
[0113] C1 = AES128_Encrypt(K, R);
[0114] The entire encryption operation is completed within the hardware circuit of the AES encryption unit 130—neither the key K nor the random number R is exposed externally, and the intermediate values during the encryption process (round key, S-box output, column mixing result, etc.) all flow within the hardware register and are not output to the system bus.
[0115] After encryption is complete, the main control unit 110 sends the first ciphertext C1 to the consumable terminal 200 via the NFC read / write module 120. The NFC air interface only transmits the ciphertext C1, and does not transmit the key K or the plaintext of the random number R.
[0116] Step 4: Decrypt and verify the consumable chip and encrypt the response:
[0117] The NFC encryption chip 210 receives the first ciphertext C1 via the NFC antenna and sends C1 directly to the AES encryption core 212. The AES encryption core 212 uses the preset key K in the OTP key area 211 to perform AES-128 decryption on C1:
[0118] R = AES128_Decrypt(K, C1);
[0119] The entire decryption process is completed within the hardware circuitry of the AES encryption core 212; the key K and intermediate operation values are not output externally. After decryption, the chip's internal logic performs a format verification on the decrypted R—checking whether R's length is 128 bits and whether it conforms to a preset data format (such as verification of fixed values for specific bytes). If the verification passes, it confirms that the host device 100 is a legitimate device (possessing the correct key K).
[0120] Subsequently, the AES encryption kernel 212 performs AES-128 encryption operations based on the same random number R and key K to generate the response ciphertext:
[0121] C2 = AES128_Encrypt(K, R);
[0122] The NFC encryption chip 210 returns the second ciphertext C2 to the host 100 via NFC.
[0123] Step 5: Host decryption, comparison, and authorization:
[0124] The host device 100 receives the second ciphertext C2 via the NFC reader / writer module 120 and sends C2 to the AES encryption unit 130. The AES encryption unit 130 performs AES-128 decryption on C2 using the key K:
[0125] R′= AES128_Decrypt(K, C2);
[0126] After decryption, the hardware comparison circuit on the host side 100 performs a bit-by-bit hard comparison between the decryption result R′ and the original random number R generated in step three. This comparison process is executed directly by the hardware logic circuit without going through the CPU software relay—the CPU only receives the "pass / fail" flag of the comparison result and cannot interfere with the comparison process, thus eliminating the possibility of software tampering and timing attacks.
[0127] The logical judgment is as follows:
[0128] If R = R′ (all 128 bits match), authentication is successful. The main control unit 110 sets the valid flag, unlocks the physiotherapy function permissions through the security enable control unit, and the beauty device enters normal working mode.
[0129] If R ≠ R′ (any bit mismatch), authentication fails. The main control unit 110 immediately shuts down the NFC read / write module 120, locks all function outputs, and issues an alarm prompt via the display screen or indicator lights.
[0130] Step Six: Nursing Implementation:
[0131] After successful authentication, the user uses the beauty device for facial care. During the treatment, the host device 100 continuously monitors the NFC communication link status. If the consumable device 200 is detected to be moved out of the radio frequency field (communication interruption), the function output is immediately paused. After the consumable device 200 is back in place, the complete authentication process of steps three to five is re-executed (instead of simply restoring the output) to prevent the user from replacing the consumable device with a counterfeit one after successful authentication.
[0132] Step Seven: End of Nursing Care and Failure Locking:
[0133] After the nursing care is completed, the main control unit 110 generates a failure control instruction F. F is a 128-bit fixed format instruction data, which includes an opcode (indicating "execute OTP circuit breaker") and a verification field.
[0134] The main control unit 110 calls the AES encryption unit 130 to perform AES-128 encryption on the failure control command F with key K, and obtains the third ciphertext:
[0135] C3 = AES128_Encrypt(K, F);
[0136] The host terminal 100 sends the third ciphertext C3 to the consumable terminal 200 via the NFC read / write module 120.
[0137] The NFC encryption chip 210 receives C3 and performs AES-128 decryption using key K through the AES encryption core 212:
[0138] F = AES128_Decrypt(K, C3);
[0139] After the chip's internal logic parses the opcode in F and confirms it as a valid failure instruction, it triggers the one-time programmable failure unit 213 to execute the OTP fuse operation. The specific mechanism of the OTP fuse is as follows: a specific fuse in the chip's internal electronic fuse array (associated with the enable signal of the AES encryption core 212 and the read-out enable signal of the OTP key area 211) is burned out by a large current. After the fuse is broken:
[0140] The power supply to the AES encryption core 212 was permanently cut off, and the chip could no longer perform any encryption or decryption operations.
[0141] The read path of OTP key area 211 is permanently cut off, and although the key data physically exists, it cannot be read or used.
[0142] The "valid" flag in the chip status register is permanently set to "invalid".
[0143] Once locked, the NFC encryption chip 210 can no longer respond to any authentication requests—even if it is powered on again and re-entered into the radio frequency field, the chip cannot complete initialization, cannot perform encryption or decryption, and cannot return any valid response. The consumable end 200 is permanently disabled at the physical level, and cannot be recovered or reset.
[0144] Example 5: This invention implements a four-fold security design at both the program and hardware levels: key isolation, computation isolation, transmission isolation, and access control isolation, as detailed below:
[0145] (a) Key isolation:
[0146] Key K is stored on the host side 100 in a Flash security isolation partition 150. This partition is configured via the MCU's Memory Protection Unit (MPU) to be "readable only by the encryption engine, not by the CPU, and inaccessible by the debug interface." Any attempt to read this area via a software pointer or debugger will trigger a hardware exception and reset the system. Key K is also stored on the consumable side 200 in the OTP key area 211. This area is configured during chip manufacturing so that the key is directly mapped to the AES core and has no external data path—the chip's I2C / SPI and other digital interfaces cannot address the storage units in the OTP key area 211.
[0147] (ii) Operational isolation:
[0148] All AES encryption and decryption operations are performed within the hardware encryption engine (the AES encryption unit 130 on the host side and the AES encryption core 212 on the consumable side). The encryption engine is an independent hardware state machine with its own register file and operation unit. The key K, random number R, and intermediate encryption values (round key, S-box output, etc.) all flow within the encryption engine, without passing through the CPU, the system bus, or entering RAM. The CPU can only send "start encryption" and "start decryption" commands to the encryption engine and read the final encryption / decryption results; it cannot obtain any intermediate values during the operation.
[0149] (iii) Transmission isolation:
[0150] The NFC air interface only transmits encrypted data (C1, C2, C3). The plaintext of the key K, the random number R, and the invalidation command F are never transmitted through the NFC air interface. Even if an attacker uses specialized equipment (such as an RF signal analyzer or NFC sniffer) to completely capture all NFC communication data packets within the communication range, they can only obtain the encrypted data C1, C2, and C3, and cannot extract any useful information from them—because without the key K, the encrypted data cannot be decrypted.
[0151] (iv) Access Control Segregation:
[0152] The authentication result is determined by a hardware comparison circuit, with the CPU only receiving the final "pass / fail" flag. Unlocking function permissions is performed independently by the security enable control unit—a hardware logic circuit independent of the main control unit 110. Upon receiving a pass signal from the hardware comparison circuit, this unit directly enables the power supply and signal path of the physiotherapy function module via hardware pins. The CPU cannot bypass the authentication result to directly unlock the function, thus preventing software-level permission bypass attacks.
[0153] Example 6: Based on the basic scheme, the present invention also provides an example of multi-factor dynamic combination authentication. In this example, in addition to the pre-set AES key K, the host terminal 100 and the consumable terminal 200 also store relevant data required for multi-factor authentication.
[0154] Authentication factor definition:
[0155] Time factor T: The host device 100 has a built-in real-time clock (RTC) that generates a current timestamp or time window number (e.g., a time window number with a granularity of 30 seconds) during each authentication. The NFC encryption chip 210 of the consumable device 200 has a pre-stored valid time window range (e.g., valid for 30 days after manufacturing).
[0156] Consumable usage count N: The NFC encryption chip 210 has an internal programmable counter that records the number of authentications performed or the number of care uses. The counter increments after each successful authentication. The counter is stored in the chip's data storage area and is protected against tampering.
[0157] Host Identity Factor H: Each beauty device host has a unique device identifier (such as the unique ID of the MCU or a separately burned serial number). The consumable terminal 200 records H and binds it during the initial authentication—after binding, the consumable can only be used on hosts with the same H and cannot be authenticated on other hosts.
[0158] Dynamic combined authentication process:
[0159] Step 1: The host terminal 100 dynamically selects at least two factors from the time factor T, consumable usage count N, and host identity factor H to form an authentication factor combination based on the current authentication count or time period, according to a preset polling strategy. For example, the polling strategy might be: "T+N" for the first authentication, "T+H" for the second, "N+H" for the third, "T+N+H" for the fourth, and "T+N" for the fifth, and so on. Each authentication's selected factor combination must differ from the previous one by at least one factor.
[0160] Step 2: The host terminal 100 generates challenge data D based on the selected authentication factor combination. For example, if "T+N" is selected, then D = T || N (the concatenation of timestamp and count). The host terminal 100 embeds the identification information of the selected factor combination (such as a 2-bit binary code: 00 for T+N, 01 for T+H, 10 for N+H, and 11 for T+N+H) into the header of the challenge data D.
[0161] Step 3: The host terminal 100 uses key K to perform AES-128 encryption on the challenge data D to obtain the first ciphertext C1 and sends it to the consumable terminal 200.
[0162] Step four: The consumable terminal decrypts C1 to obtain D, parses the factor combination identifier in the header, determines the factors that need to be verified in this authentication, and then verifies one by one whether each factor is consistent with the corresponding data stored locally—verifying whether the time factor T is within the valid window, verifying whether the consumable usage count N has not exceeded the preset upper limit, and verifying whether the host identity factor H is consistent with the H initially bound. After all factors are verified successfully, the ciphertext response C2 is generated and returned.
[0163] Step 5: Decrypt and compare C2 on the host side 100, the process is the same as step 5 of embodiment 4.
[0164] The multi-factor dynamic combination authentication in this embodiment makes it impossible for attackers to predict which factors will be used in this authentication, nor can they deduce the authentication logic from a single intercepted communication data. Even if an attacker obtains the complete plaintext-ciphertext pair of an authentication (e.g., through a side-channel attack), they cannot replay the attack at other times or on other devices because the combination of authentication factors and the specific factor values change dynamically with time / number of times.
[0165] Example 7: The present invention also provides an example of a hierarchical key system.
[0166] Key hierarchy:
[0167] Level 1: Root Key Kr. The 128-bit root key Kr is stored in the deepest layer of the Flash security isolation partition 150 on the host side 100 (requiring additional physical fuse protection) and in the OTP key area 211 on the consumable side 200. Kr never participates in any encryption or decryption operations; it is only used to derive lower-level keys.
[0168] Level 2: Session Key Ks. Before each authentication, the host 100 generates the session key Ks using the root key Kr, the current random number R, and the current timestamp T, through a key derivation function (KDF).
[0169] Ks = KDF(Kr, R || T);
[0170] KDF uses standard algorithms such as HMAC-SHA256 or AES-CMAC. The derivation process is completed within the hardware secure area of the AES encryption unit 130. After Ks is generated, it is directly stored in the key register of the encryption engine without going through the CPU or entering RAM.
[0171] After receiving the first ciphertext C1, the consumable terminal 200 derives Ks in the same way—the consumable terminal 200 needs to extract a random number R (after decryption) from C1 and combine it with the local time (or time information synchronized from the host) to calculate Ks.
[0172] Authentication process adjustments:
[0173] In steps one and two, the host terminal 100 and the consumable terminal 200 respectively derive session keys Ks, instead of directly using the root key Kr.
[0174] In step three, host 100 uses the session key Ks (instead of Kr) to encrypt the random number R, generating the first ciphertext C1.
[0175] In step four, the consumable terminal 200 decrypts C1 using the session key Ks (instead of Kr) and uses Ks to generate the response ciphertext C2.
[0176] In step five, host 100 uses the session key Ks (instead of Kr) to decrypt and compare C2.
[0177] In this embodiment, the session key Ks used for each authentication is different—even if the Ks of a certain authentication is obtained by an attacker through a side-channel attack, it only affects that authentication and cannot be used for other authentication batches, nor can the root key Kr be derived in reverse. The hierarchical key system reduces the risk of key exposure from permanent to one-time, significantly improving the long-term security of the system.
[0178] Example 8: The present invention also provides an example of dynamically binding authentication results with physiotherapy parameters.
[0179] Parameter presets:
[0180] When the facial mask consumables leave the factory, in addition to the pre-installed AES key K, the physiotherapy parameter configuration data corresponding to the batch / model of facial mask is also encrypted and stored in the data storage area of the NFC encryption chip 210.
[0181] Physiotherapy parameter configuration data includes, but is not limited to, the following parameters:
[0182] Output current intensity value or current intensity level (e.g., 1 to 10 levels);
[0183] Output waveform type (e.g., sine wave, square wave, pulse wave) and frequency parameters (e.g., 1kHz to 1MHz);
[0184] Heating temperature setpoint or temperature profile (e.g., 38℃~45℃);
[0185] Duration of a single care session (e.g., 5 minutes, 10 minutes, 15 minutes);
[0186] Ultrasonic output power and frequency (e.g., 1W to 5W, 1MHz to 3MHz);
[0187] Infrared light wavelength and irradiation intensity (e.g., 630nm~850nm).
[0188] Different models or batches of consumables store different physiotherapy parameter configuration data at end 200—for example, anti-aging masks correspond to infrared physiotherapy parameters + microcurrent parameters, and moisturizing masks correspond to ultrasonic parameters + constant temperature parameters.
[0189] Parameter encryption storage format:
[0190] The physiotherapy parameter configuration data P and the unique identifier UID (or the random number R for this authentication) of the consumable terminal 200 are used together as a plaintext block and then stored after being encrypted with AES-128 using key K:
[0191] Encrypted_P = AES128_Encrypt(K, P || UID);
[0192] The encrypted data is stored in the data storage area (M1 area) of the NFC encryption chip 210. The key K is not written to the independent storage area of the NFC chip, but is only stored in the OTP key area.
[0193] Post-authentication parameter reading process:
[0194] Steps 1 to 5: Perform the basic two-way authentication process described in Example 4.
[0195] Step 6 (after successful authentication): Host terminal 100 sends a parameter read request to consumable terminal 200.
[0196] Step 7: Consumable terminal 200 returns the encrypted physiotherapy parameter configuration data Encrypted_P to host terminal 100 via NFC.
[0197] Step 8: Host 100 uses key K to perform AES-128 decryption on Encrypted_P to obtain P || UID. Host 100 verifies whether the UID matches the unique identifier of the consumable identified during this authentication process—if they do not match, the parameter data is deemed invalid (it may have been tampered with or moved), the function is locked, and a consumable error is indicated.
[0198] Step Nine: After successful UID verification, the host terminal 100 parses the physiotherapy parameter configuration P and automatically configures the physiotherapy function modules based on the parameter values in P—setting the output current intensity, waveform frequency, heating temperature, nursing duration, etc. The host terminal 100 then executes the corresponding nursing operations according to the configuration.
[0199] In this embodiment, even if counterfeit consumables crack the authentication process (by obtaining the key K or bypassing the authentication process), they cannot provide the correct treatment parameter configuration—because the parameters of consumables from different batches / models are different, and counterfeiters cannot predict the parameter data of genuine consumables. Different masks have different treatment parameter configurations, and the beauty device automatically switches the treatment mode when the user changes masks, eliminating the need for manual settings and improving the user experience. The treatment parameters are encrypted and stored by binding to the consumable's UID. Even if an attacker reads the encrypted parameters from a genuine consumable, they cannot transfer them to other consumables (UID mismatch).
[0200] The following two specific application scenarios illustrate the complete working process of this invention.
[0201] Scenario 1: First use of a genuine face mask:
[0202] The user removes a genuine face mask from the packaging and applies it to their face. The user then brings the beauty device close to the NFC chip area on the mask (approximately 3cm). The device's NFC reader / writer module detects the mask chip, and both parties complete an ISO 14443-A handshake. The device generates a random number challenge, performs AES-128 encryption, and sends it. The mask chip decrypts the challenge, passes verification, and returns an encrypted response. The device decrypts the response and compares it successfully. Authentication is successful, and the device's display shows "Genuine face mask recognized," unlocking the treatment function. The user performs a 15-minute facial treatment. After the treatment, the device sends an encryption deactivation command, causing the mask chip's OTP to melt. Once the mask is removed from the device, the chip is permanently disabled and cannot be re-authenticated. The user discards the used mask.
[0203] Scenario 2: Attempting to use a counterfeit face mask:
[0204] A user purchased a counterfeit face mask from an unofficial channel and applied it to their face before bringing it close to the beauty device's main unit. The device initiated an authentication challenge, but the counterfeit mask's chip lacked the correct AES key K—it might have no key, an incorrect key, or no AES encryption kernel at all. The counterfeit chip could not decrypt the first ciphertext C1 and could not generate the correct response ciphertext C2. Upon receiving C2, the main unit failed to decrypt and compare it, immediately locking the function, and displaying the message "Unrecognized, please use genuine consumables." The beauty device did not output any therapeutic energy, and the counterfeit face mask became unusable.
[0205] Scenario 3: Testing an already used genuine face mask Figure 2 First use:
[0206] A user attempted to reapply a used, genuine face mask to the beauty device. The mask chip powered on and initialized upon approaching the radio frequency field, but the OTP failure unit had been blown, permanently cutting off the power supply to the AES encryption core. The chip could not complete the initialization of the AES encryption core and could not perform any encryption or decryption operations. After the host initiated an authentication challenge, the chip could not return any valid response (or returned an incorrect response). Host authentication failed, and the function was locked. The used face mask cannot be reused, physically eliminating the hygiene and safety risks associated with reuse.
[0207] The effectiveness of the above technical solution was verified through prototype testing in this embodiment of the invention. Specific test data are as follows:
[0208] (a) Certification response time:
[0209] Under standard test conditions of NFC communication distance of 3cm and field strength of 3A / m, the single two-way authentication process (from the host sending the challenge to the host completing the comparison) meets the design specification of less than 50ms single authentication response time.
[0210] (ii) Power consumption specifications:
[0211] The NFC encryption chip 210 consumes approximately 2.1mW at its peak when performing AES-128 decryption, approximately 1.9mW at its peak when performing encryption, and approximately 0.3mW in standby (listening) mode. These power consumption parameters ensure stable operation of the chip under standard NFC reader field strength (1.5A / m~7.5A / m), with a communication distance of no less than 3cm.
[0212] (III) Verification of protection against replay attacks:
[0213] The entire communication data (including C1 and C2) of 10 authentication processes was recorded using an NFC signal capture device. When the recorded C1 data was replayed to the genuine facial mask chip, the returned C2 differed from the recorded C2 (because R is different each time, and therefore C2 is also different), causing the host to fail to decrypt and compare. When the complete recorded C1-C2 communication pair was replayed to the host (simulating legitimate communication), the host identified that the random number R in C1 did not match the currently generated random number (the host generates a new R each time), resulting in a failed comparison. The above tests verified the anti-replay attack capability of this invention.
[0214] (iv) OTP failure verification:
[0215] Ten mask chips that had undergone treatment and had their OTP fuses blown were re-powered for testing. All ten chips failed to complete AES encryption core initialization, could not perform any encryption or decryption operations, and could not respond to any authentication requests. Microscopic examination of the internal circuitry of three of the chips confirmed that the electronic fuse array had physically blown.
[0216] (v) Unreadable key verification:
[0217] Attempts to read the contents of the host-side Flash security isolation partition 150 via the MCU debug interface (JTAG) were all intercepted by the hardware, triggering a system reset. Attempts to read the contents of the consumable's OTP key area 211 via the NFC air interface resulted in an "access denied" error code, indicating the key data was unreadable.
[0218] Although specific embodiments are described herein, those skilled in the art will recognize that many other modifications or alternative embodiments are also within the scope of this disclosure. For example, any of the functions and / or processing capabilities described in connection with a particular device or component can be performed by any other device or component. Furthermore, while various exemplary embodiments and architectures have been described according to embodiments of this disclosure, those skilled in the art will recognize that many other modifications to the exemplary embodiments and architectures described herein are also within the scope of this disclosure.
[0219] The foregoing description, with reference to block diagrams and flowcharts of systems, methods, systems, and / or computer program products according to exemplary embodiments, has described certain aspects of this disclosure. It should be understood that one or more blocks in the block diagrams and flowcharts, as well as combinations of blocks in the block diagrams and flowcharts, can be implemented by executing computer-executable program instructions, respectively. Similarly, according to some embodiments, some blocks in the block diagrams and flowcharts may not need to be executed in the order shown, or may not all need to be executed. Furthermore, additional components and / or operations beyond those shown in the blocks in the block diagrams and flowcharts may exist in some embodiments.
[0220] Therefore, blocks in block diagrams and flowcharts support combinations of means for performing a specified function, combinations of elements or steps for performing a specified function, and program instruction means for performing a specified function. It should also be understood that each block in a block diagram and flowchart, and combinations of blocks in block diagrams and flowcharts, can be implemented by a dedicated hardware computer system or a combination of dedicated hardware and computer instructions that performs a specific function, element, or step.
[0221] The program modules, applications, etc., described herein may include one or more software components, including, for example, software objects, methods, data structures, etc. Each such software component may include computer-executable instructions that, in response to execution, cause at least a portion of the functionality described herein (e.g., one or more operations of the exemplary methods described herein) to be performed.
[0222] Software components can be coded using any of a variety of programming languages. An exemplary programming language could be a low-level programming language, such as assembly language associated with a specific hardware architecture and / or operating system platform. Software components including assembly language instructions may need to be converted into executable machine code by an assembler before being executed by the hardware architecture and / or platform. Another exemplary programming language could be a higher-level programming language that is portable across multiple architectures. Software components including higher-level programming languages may need to be converted into an intermediate representation by an interpreter or compiler before execution. Other examples of programming languages include, but are not limited to, macro languages, shell or command languages, job control languages, scripting languages, database query or search languages, or report writing languages. In one or more exemplary embodiments, a software component containing instructions from one of the above-described programming language examples can be executed directly by the operating system or other software components without first being converted into another form.
[0223] Software components can be stored as files or other data storage structures. Software components of similar type or related function can be stored together in a specific directory, folder, or library. Software components can be static (e.g., pre-defined or fixed) or dynamic (e.g., created or modified at runtime).
[0224] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. A mask consumable authentication system based on dynamic encryption, characterized in that, include: The host device and the consumable device are connected via NFC near-field wireless communication. The host unit includes: a main control unit, an NFC read / write module, an AES encryption unit, a true random number generator, and a secure storage area, wherein the secure storage area is pre-loaded with an AES key K; The consumable terminal includes: an NFC encryption chip, which has an OTP key area, an AES encryption core and a one-time programmable failure unit, and the OTP key area is pre-loaded with the same AES key K as the host terminal; The host and the consumable device perform the following two-way authentication process: The host terminal generates a 128-bit random number R through the true random number generator, performs AES-128 encryption on the random number R using the key K through the AES encryption unit to obtain the first ciphertext C1, and sends the first ciphertext C1 to the consumable terminal through the NFC read / write module. The consumable terminal uses the AES encryption kernel and the key K to perform AES-128 decryption on the received first ciphertext C1 to obtain the random number R, and then uses the key K to perform AES-128 encryption on the random number R to generate the second ciphertext C2, and returns it to the host terminal via NFC. The host uses the AES encryption unit and the key K to perform AES-128 decryption on the received second ciphertext C2 to obtain the decryption result R′. The random number R is compared with the decryption result R′. If they match, the authentication is successful and the function permission is unlocked. If they do not match, the authentication fails and the function is locked. After confirming the completion of care, the host generates a failure control command F. The AES encryption unit uses the key K to perform AES-128 encryption on the failure control command F to obtain a third ciphertext C3, which is then sent to the consumable terminal via NFC. The consumable terminal uses the AES encryption kernel to perform AES-128 decryption on the third ciphertext C3 using the key K to obtain the failure control command F. Based on the failure control command F, the one-time programmable failure unit is triggered to perform an irreversible hardware fuse, permanently disabling the NFC encryption chip. The key K is pre-placed on the host and the consumable and does not participate in NFC over-the-air transmission.
2. The mask consumable authentication system based on dynamic encryption according to claim 1, characterized in that, The key K is pre-installed at the factory via offline programming in the Flash security isolation partition on the host and the OTP non-erasable key area on the consumable side; the key K is only used as an internal calculation parameter of the encryption engine, is not mapped to the system bus, does not participate in data interaction, and cannot be read or modified through any external interface.
3. The mask consumable authentication system based on dynamic encryption according to claim 1, characterized in that, The host compares the random number R with the decryption result R′ using a bit-by-bit hard comparison performed by a hardware comparison circuit, without going through the CPU software.
4. The mask consumable authentication system based on dynamic encryption according to claim 1, characterized in that, The AES encryption is the AES-128 algorithm, the key K and the random number R are both 128 bits in length, and the single authentication response time is less than 50ms.
5. The mask consumable authentication system based on dynamic encryption according to claim 1, characterized in that, During the two-way authentication process, the host terminal is also used for: At least two authentication factors are dynamically selected from a plurality of preset authentication factors to form an authentication factor combination. The plurality of authentication factors include: time factor T, consumable usage count N, and host identity factor H. Challenge data is generated based on the authentication factor combination, and the challenge data is encrypted using the key K to generate the first ciphertext C1; After receiving and decrypting the first ciphertext C1, the consumable terminal verifies whether each factor in the authentication factor combination is consistent with the corresponding factor stored locally. If they are all consistent, it generates and returns the response ciphertext C2.
6. The mask consumable authentication system based on dynamic encryption according to claim 5, characterized in that, The method for dynamically selecting authentication factor combinations on the host side is as follows: Based on the current number of authentications or the time period, different combinations are selected from the multiple authentication factors according to a preset polling strategy; Each certification must select a factor combination that differs from the previous certification factor combination by at least one factor. The host device embeds the identification information of the selected factor combination into the first ciphertext C1, and the consumable device determines the factors to be verified for this authentication based on the identification information.
7. The mask consumable authentication system based on dynamic encryption according to claim 1, characterized in that: The host and the consumable are also pre-configured with a root key Kr, which is stored in the OTP area and never participates in over-the-air transmission. Before each authentication, the host terminal generates a session key Ks based on the root key Kr, the random number R, and the current timestamp; The host and the consumable terminal use the session key Ks instead of the key K to perform encryption and decryption operations; The session key Ks is only valid during this authentication cycle and expires after the authentication ends.
8. The mask consumable authentication system based on dynamic encryption according to claim 1, characterized in that, The NFC encryption chip at the consumable end also stores encrypted physiotherapy parameter configuration data; After successful authentication, the host terminal is also used for: Send a parameter read request to the consumable terminal; The device receives encrypted physiotherapy parameter configuration data returned by the consumable terminal, and decrypts the encrypted physiotherapy parameter configuration data using the key K to obtain the physiotherapy parameter configuration. Based on the configured physiotherapy parameters, the physiotherapy function module on the host terminal is controlled to perform corresponding nursing operations. If the decryption fails or the decrypted physiotherapy parameters do not conform to the preset format, the function will be locked and a consumable error message will be displayed. The consumable terminal is also configured to: in response to the parameter reading request, return the encrypted physiotherapy parameter configuration data to the host terminal via NFC.
9. The mask consumable authentication system based on dynamic encryption according to claim 8, characterized in that: The physiotherapy parameter configuration data, together with the random number R or the unique identifier of the consumable terminal, are used as plaintext, encrypted with the key K using AES-128, and then stored in the data storage area of the NFC encryption chip. When the host device decrypts the physiotherapy parameter configuration data, it simultaneously verifies whether the random number R or the unique identifier of the consumable device is consistent with the one used in this authentication process. If they are inconsistent, the parameter data is deemed invalid. Different models or batches of the consumables store different physiotherapy parameter configuration data. The host terminal automatically identifies the model or batch of the consumables based on the decrypted physiotherapy parameter configuration data and performs nursing operations according to the corresponding physiotherapy plan.
10. A method for authenticating facial mask consumables based on dynamic encryption, used in the system as described in any one of claims 1 to 9, characterized in that, Includes the following steps: S1. Key presetting step: Preset the same AES key K on the host and consumable end respectively. The key K does not participate in NFC over-the-air transmission. S2, Random Challenge Generation Step: The host generates a 128-bit random number R, encrypts the random number R with AES-128 using the key K to obtain the first ciphertext C1, and sends it to the consumable terminal via NFC. S3. Consumable decryption response step: The consumable terminal uses the key K to decrypt the received first ciphertext C1 using AES-128 to obtain the random number R, uses the key K to encrypt the random number R using AES-128 to obtain the second ciphertext C2, and returns it to the host terminal via NFC. S4. Host verification step: The host uses the key K to decrypt the received second ciphertext C2 using AES-128 to obtain the decryption result R′. The random number R is compared with the decryption result R′. If they match, the authentication is successful and the function permission is unlocked. If they do not match, the authentication fails and the function is locked. S5, Failure Locking Step: After confirming the completion of care, the host terminal generates a failure control command F, encrypts the failure control command F using the key K using AES-128, obtains a third ciphertext C3, and sends it to the consumable terminal via NFC; the consumable terminal uses the key K to decrypt the third ciphertext C3 using AES-128, obtains the failure control command F, and executes a one-time programmable hardware fuse according to the failure control command F, causing the consumable terminal to permanently fail.