A security protection scheme for HMAC algorithm
By introducing dynamic key generation and masking mechanisms into the HMAC algorithm, using dynamic random numbers and padding values, the shortcomings of the HMAC algorithm in key protection, preventing playback attacks and resisting side channel attacks are solved, and higher security and computing efficiency are achieved.
Patent Information
- Application Number
- CN202411794685.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The HMAC algorithm has shortcomings in key protection, preventing playback attacks and anti-side channel attacks, especially in key leakage, playback attacks and computing overhead.
By introducing dynamic key generation and masking mechanisms, dynamic random numbers and dynamic fill values are used to enhance the security of the HMAC algorithm, prevent key leakage and replay attacks, and improve the ability to resist side channel attacks.
It effectively improves the key protection capability, prevents key leakage and malicious attacks, significantly improves the security of information transmission, is suitable for application scenarios with high security requirements, and optimizes computing efficiency.
Smart Images

Figure CN119766455A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of HMAC technology, and in particular to a HMAC algorithm security protection solution. Background Art
[0002] With the rapid development of information technology, data security issues have become increasingly prominent. Especially in the process of network communication and data transmission, the risk of information being tampered with, forged or leaked is increasing. In order to ensure the integrity, authenticity and confidentiality of data, the key-based message authentication code (HMAC) algorithm is widely used in data protection, identity authentication and secure communication. The HMAC algorithm combines hash functions and keys to effectively prevent data tampering during transmission or storage, and verify the source and integrity of data. Therefore, it has become an important technology in the field of information security.
[0003] The main idea of the HMAC algorithm is to generate a fixed-length digest by performing an XOR operation on the message to be authenticated and the key, and then using a hash function to calculate the result. During the authentication process, the receiver will calculate the digest according to the same algorithm and compare it with the digest provided by the sender to determine whether the message has been tampered with. The advantage of the HMAC algorithm is that it can use any hash function, and the introduction of the key enhances the anti-attack capability, effectively preventing common attack methods such as collision attacks, replay attacks, and tampering attacks.
[0004] Although the HMAC algorithm has achieved remarkable success in data security and integrity protection, it still faces some challenges and limitations in practical applications, especially in key protection and prevention of various complex attacks. The following are the main defects in the existing technology:
[0005] The security of the HMAC algorithm relies on the confidentiality of the key. The leakage of the key will lead to the complete failure of the algorithm. However, in many application scenarios, the key is vulnerable to theft by attackers during transmission or storage. For example, during network communication, if the transmission channel is not encrypted or the key is not properly managed, attackers can steal the key by sniffing the network or through side channel attacks. Once the key is leaked, the attacker can forge messages, tamper with data, or even bypass authentication, causing serious security risks.
[0006] The standard implementation of the HMAC algorithm does not directly prevent replay attacks. In some cases, an attacker can intercept a legitimate message and resend it to the recipient at a later time. Since there is no effective timestamp, random number or other mechanism to distinguish the timeliness of the message, the recipient cannot confirm whether it is the original message, which may lead to duplicate processing of data or unnecessary operations. Especially in time-sensitive fields such as financial transactions and electronic payments, replay attacks may cause huge economic losses.
[0007] The calculation process of the HMAC algorithm may be threatened by side channel attacks. Side channel attacks refer to obtaining encrypted information by monitoring the physical behavior of encryption devices (such as electromagnetic leakage, power consumption analysis, etc.). In traditional hardware implementations, attackers can analyze keys or other sensitive data through this physical information. When the HMAC algorithm is used in an embedded system, if effective side channel protection measures are not taken, it may lead to key leakage, thereby destroying the security of the algorithm.
[0008] In most cases, the HMAC algorithm uses standard hash functions (such as the SHA series). Although these hash functions have been proven to be highly resistant to collisions in most applications, the risk of collision attacks still exists as computing power increases. In particular, the security of the HMAC algorithm may be threatened when there are potential weaknesses in the hash function itself. In addition, the choice of hash function needs to be adjusted according to the actual application scenario, and in some cases it may not be able to adapt to specific security requirements.
[0009] In some resource-constrained environments (such as embedded devices, IoT devices, etc.), the calculation process of the HMAC algorithm may bring high computational overhead. Especially in scenarios where frequent authentication and data verification are required, the computational complexity of HMAC may have an adverse effect on the performance and energy efficiency of the device. In addition, as the amount of data increases, the computational overhead of HMAC will also increase, causing the system response time to increase and affecting the user experience. Therefore, how to provide a HMAC algorithm security protection solution is an urgent problem that technicians in this field need to solve. Summary of the invention
[0010] One purpose of the present invention is to propose a HMAC algorithm security protection scheme. The present invention makes full use of the key protection mechanism, dynamic random number generation and mask processing technology of the HMAC algorithm, and describes in detail how to enhance the security of the HMAC algorithm in the message authentication process.
[0011] An HMAC algorithm security protection solution according to an embodiment of the present invention includes the following steps:
[0012] S1. During the authentication process, the sender pre-processes the message to be authenticated, divides the message into blocks, and performs an XOR operation on each message block with the key to generate a pre-processed message block;
[0013] S2, process the key, generate a dynamic key according to the rules of the HMAC algorithm, and combine the internal padding value and the external padding value;
[0014] S3, through the HMAC algorithm, using the dynamic key, internal filling value and external filling value, complete the calculation of the internal hash value and the external hash value to generate a message authentication code;
[0015] S4. The receiver pre-processes the message and generates the expected message digest based on the HMAC algorithm, and verifies whether the generated message authentication code is consistent with the authentication code provided by the sender. If they are consistent, the authentication is successful;
[0016] S5. Mask the key through a dynamic random number mechanism to prevent replay attacks and side channel attacks, and return the generated message authentication code and random number parameters to the recipient for verification.
[0017] Optionally, the S1 includes the following steps:
[0018] S11, receiving a message M to be authenticated, and converting the message M into binary form;
[0019] S12, add a 1 bit at the end of the message M, and then add several 0 bits until the message length reaches an integer multiple of the one-way hash function block length b;
[0020] S13, appending the total length information of the original message M to the last group after padding, the length information occupies the last 64 bits and is stored in big-endian format;
[0021] S14, divide the padded message M into several blocks according to the block length b to form message blocks x 1 ,x 2 ,...,x n ;
[0022] S15, if the length of the padded message is less than a packet length b, then add an all-zero block as a placeholder packet;
[0023] S16, each message block x i The bit-by-bit XOR operation with the key k generates the processed message block S i =x i ⊕k, where S i is the first input packet of the hash function;
[0024] S17, the processed message block S 1 ,S 2 ,...,S n Combine in order to generate the preprocessed message S;
[0025] S18. Provide the pre-processed message S to subsequent dynamic key generation and hash calculation steps.
[0026] Optionally, S2 includes the following steps:
[0027] S21, process the key k. If the key length is less than the packet length b, fill the end with zeros until its length is equal to b. If the key length is greater than b, calculate the key through a one-way hash function to generate a hash value k', and use k' as the new key.
[0028] S22. Generate a first random number R using a cryptographically secure pseudo-random number generator, where the length of the random number R is equal to the packet length b and is highly unpredictable;
[0029] S23, combining the key k with the random number R to generate a dynamic key k + , the calculation formula is k + = k ⊕ R;
[0030] S24, constructing an internal padding value ipad and an external padding value opad, which are cyclic sequences of fixed values 0x36 and 0x5C respectively, and the lengths of both are equal to the packet length b;
[0031] S25, the dynamic random number R adjusts the generation rules of ipad and opad, and adds a dynamic offset to the fill value in each group;
[0032] S26, the dynamic key k + Combined with the adjusted ipad and opad, an input group for hash calculation is generated.
[0033] Optionally, S3 includes the following steps:
[0034] S31, the dynamic key k + Combined with the internal fill value ipad, this generates the first input group:
[0035] S i =k + ⊕ iPad;
[0036] S32, group the pre-processed messages into groups x 1 ,x 2 ,...,x n Combine in order the first input group S i After that, the one-way hash function is input to generate the internal hash value H i ;
[0037] S33, the dynamic key k + Combined with the external padding value opad, this generates the second input grouping:
[0038] S o =k + ⊕opad;
[0039] S34, the internal hash value H iGroup with the second input S o After combination, the one-way hash function is input to generate the final message authentication code HMAC(M).
[0040] Optionally, S4 includes the following steps:
[0041] S41, the receiver receives the message M', the random number parameters R, R 1 , and the sender's authentication code HMAC(M);
[0042] S42, pre-process the message M' in accordance with the sender to generate a packet x 1 ,x 2 ,...,x n ;
[0043] S43, based on the shared key k and the received random number R, generate a dynamic key k + , and adjust the padding values ipad and opad;
[0044] S44, combined with dynamic key k + And the adjusted padding value to generate the authentication code HMAC(M'), the calculation formula is:
[0045] HMAC(M') = h[(k + ⊕opad)||h[(k + ⊕ipad)||M']];
[0046] Wherein, h represents a one-way hash function;
[0047] S45. Compare the generated authentication code HMAC(M') with the authentication code HMAC(M) of the sender. If they are consistent, the authentication is successful.
[0048] Optionally, S5 includes the following steps:
[0049] S51, generate a first random number R and a second random number R 1 , dynamically mask the key k,
[0050] S52. Calculate the intermediate variable A. The formula is:
[0051] A=[(k + ⊕R 1 )-R 1 ]⊕k + ⊕[(k + ⊕(R⊕R 1 ))-(R⊕R 1 )];
[0052] S53, calculating the key k=A+R when unmasking;
[0053] S54. In the hash calculation, the intermediate variable A adjusts the dynamic key k + and fill values ipad,opad;
[0054] S55, the generated message authentication code and random number parameters R, R 1 Returns the recipient for dynamic verification of authentication.
[0055] The beneficial effects of the present invention are:
[0056] The present invention proposes a HMAC algorithm security protection scheme, which avoids the vulnerabilities of the traditional HMAC algorithm in key leakage and replay attack by introducing dynamic key generation and masking mechanism. By using random numbers to mask the key during the authentication process, the key protection capability is effectively improved, and key leakage and malicious attacks are prevented. Especially in application scenarios with high security requirements, the security of information transmission is significantly improved.
[0057] The present invention ensures the uniqueness of each authentication process through a dynamic random number mechanism and dynamic fill value generation. By combining the dynamic adjustment of random numbers and fill values, it not only solves the problem that the traditional HMAC algorithm cannot prevent replay attacks, but also improves the ability to resist side channel attacks. This solution effectively prevents attackers from leaking keys by replaying legitimate messages or through side channel attacks, thereby improving the overall security of the system.
[0058] The present invention adopts an adjustable dynamic random number mechanism, so that the HMAC algorithm can adapt to different application scenarios. By dynamically generating keys and padding values, it can adapt to security requirements in various environments, especially in resource-constrained embedded devices and Internet of Things environments, and can provide efficient message authentication protection while maintaining low computational overhead.
[0059] The present invention improves the ability to resist collision attacks by dynamically adjusting the internal calculation steps of the HMAC algorithm, avoiding the impact of the potential weaknesses of the hash function on the security of HMAC. The flexibility of the algorithm enables it to select different hash functions according to specific scenarios, further expanding its application prospects in finance, communications and fields with high security requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0061] Figure 1 A flowchart of a HMAC algorithm security protection solution proposed by the present invention;
[0062] Figure 2It is a flow chart of the internal hash calculation and external hash calculation process of the HMAC algorithm in the present invention. DETAILED DESCRIPTION
[0063] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0064] refer to Figure 1-2 , a HMAC algorithm security protection scheme includes the following steps:
[0065] S1. During the authentication process, the sender pre-processes the message to be authenticated, divides the message into blocks, and performs an XOR operation on each message block with the key to generate a pre-processed message block;
[0066] S2, process the key, generate a dynamic key according to the rules of the HMAC algorithm, and combine the internal padding value and the external padding value;
[0067] S3, through the HMAC algorithm, using the dynamic key, internal filling value and external filling value, complete the calculation of the internal hash value and the external hash value to generate a message authentication code;
[0068] S4. The receiver pre-processes the message and generates the expected message digest based on the HMAC algorithm, and verifies whether the generated message authentication code is consistent with the authentication code provided by the sender. If they are consistent, the authentication is successful;
[0069] S5. Mask the key through a dynamic random number mechanism to prevent replay attacks and side channel attacks, and return the generated message authentication code and random number parameters to the recipient for verification.
[0070] In this implementation, S1 includes the following steps:
[0071] S11, receiving a message M to be authenticated, and converting the message M into binary form;
[0072] S12, add a 1 bit at the end of the message M, and then add several 0 bits until the message length reaches an integer multiple of the one-way hash function block length b;
[0073] S13, appending the total length information of the original message M to the last group after padding, the length information occupies the last 64 bits and is stored in big-endian format;
[0074] S14, divide the padded message M into several blocks according to the block length b to form message blocks x 1 ,x 2 ,...,x n ;
[0075] S15, if the length of the padded message is less than a packet length b, then add an all-zero block as a placeholder packet;
[0076] S16, each message block x i The bit-by-bit XOR operation with the key k generates the processed message block S i =x i ⊕k, where S i is the first input packet of the hash function;
[0077] S17, the processed message block S 1 ,S 2 ,...,S n Combine in order to generate the preprocessed message S;
[0078] S18. Provide the pre-processed message S to subsequent dynamic key generation and hash calculation steps.
[0079] In this implementation, S2 includes the following steps:
[0080] S21, process the key k. If the key length is less than the packet length b, fill the end with zeros until its length is equal to b. If the key length is greater than b, calculate the key through a one-way hash function to generate a hash value k', and use k' as the new key.
[0081] S22. Generate a first random number R using a cryptographically secure pseudo-random number generator, where the length of the random number R is equal to the packet length b and is highly unpredictable;
[0082] S23, combining the key k with the random number R to generate a dynamic key k + , the calculation formula is k + = k ⊕ R;
[0083] S24, constructing an internal padding value ipad and an external padding value opad, which are cyclic sequences of fixed values 0x36 and 0x5C respectively, and the lengths of both are equal to the packet length b;
[0084] S25, the dynamic random number R adjusts the generation rules of ipad and opad, and adds a dynamic offset to the fill value in each group;
[0085] S26, the dynamic key k + Combined with the adjusted ipad and opad, an input group for hash calculation is generated.
[0086] In this implementation, S3 includes the following steps:
[0087] S31, the dynamic key k +Combined with the internal fill value ipad, this generates the first input group:
[0088] S i =k + ⊕ iPad;
[0089] S32, group the pre-processed messages into groups x 1 ,x 2 ,...,x n Combine in order the first input group S i After that, the one-way hash function is input to generate the internal hash value H i ;
[0090] S33, the dynamic key k + Combined with the external padding value opad, this generates the second input grouping:
[0091] S o =k + ⊕opad;
[0092] S34, the internal hash value H i Group with the second input S o After combination, the one-way hash function is input to generate the final message authentication code HMAC(M).
[0093] In this implementation, S4 includes the following steps:
[0094] S41, the receiver receives the message M', the random number parameters R, R 1 , and the sender's authentication code HMAC(M);
[0095] S42, pre-process the message M' in accordance with the sender to generate a packet x 1 ,x 2 ,...,x n ;
[0096] S43, based on the shared key k and the received random number R, generate a dynamic key k + , and adjust the padding values ipad and opad;
[0097] S44, combined with dynamic key k + And the adjusted padding value to generate the authentication code HMAC(M'), the calculation formula is:
[0098] HMAC(M') = h[(k + ⊕opad)||h[(k + ⊕ipad)||M']];
[0099] Wherein, h represents a one-way hash function;
[0100] S45. Compare the generated authentication code HMAC(M') with the authentication code HMAC(M) of the sender. If they are consistent, the authentication is successful.
[0101] In this implementation, S5 includes the following steps:
[0102] S51, generate a first random number R and a second random number R 1 , dynamically mask the key k,
[0103] S52. Calculate the intermediate variable A. The formula is:
[0104] A=[(k + ⊕R 1 )-R 1 ]⊕k + ⊕[(k + ⊕(R⊕R 1 ))-(R⊕R 1 )];
[0105] S53, calculating the key k=A+R when unmasking;
[0106] S54. In the hash calculation, the intermediate variable A adjusts the dynamic key k + and fill values ipad,opad;
[0107] S55, the generated message authentication code and random number parameters R, R 1 Returns the recipient for dynamic verification of authentication.
[0108] Embodiment 1:
[0109] In a smart home system, multiple devices (such as smart door locks, smart cameras, thermostats, etc.) need to communicate with each other and share sensitive data, such as control signals, surveillance videos, and temperature and humidity data. Each device needs to verify the identity of other devices through an authentication mechanism and ensure the integrity and confidentiality of data during transmission.
[0110] In this scenario, the existing HMAC algorithm has the following problems: Key leakage: Communication between devices often uses fixed keys for authentication. Once the key is stolen by an attacker, the attacker can forge messages. Replay attack: Smart devices cannot identify whether a message is replayed. Attackers can intercept legitimate messages and resend them, causing repeated execution of control instructions. Side channel attack: In some devices, the calculation of the HMAC algorithm may be used by attackers to infer the key through side channel information such as power consumption or electromagnetic radiation.
[0111] In order to address these problems, the security protection method based on the HMAC algorithm proposed in the present invention ensures that the key will not be directly exposed during each authentication process by dynamically generating keys, introducing dynamic random numbers, and using masks in the calculation process, and effectively prevents replay attacks and side channel attacks.
[0112] Assume that in a smart home system, a user controls the smart door lock at home through a smartphone. The communication between the smartphone and the door lock device needs to ensure data integrity and identity authentication. In this embodiment, we divide the authentication process of the system into the following steps:
[0113] Device registration and key generation: Each smart device (such as smart door locks, thermostats) generates a pair of public and private keys when it is first registered, and registers securely with the cloud server through an encrypted channel. During the registration process, the key k generated by the device is processed according to the rules of the HMAC algorithm: if the key length is less than the packet length b, it is padded with zeros at the end, otherwise the key is hashed through a one-way hash function to generate a new key. In this way, it is ensured that the key of each device is unique and secure when it joins the system.
[0114] Message authentication process: During device communication, the smartphone sends a control command (such as a door opening command) to the smart door lock. The command is encrypted and contains a random number, and an authentication code is generated through the HMAC algorithm to ensure that the command has not been tampered with. When calculating the authentication code, the key is XORed with the first random number to obtain a dynamic key, which is then combined with the internal fill value and the external fill value to calculate the final message authentication code.
[0115] Preventing replay attacks: To prevent attackers from attacking the system by replaying legitimate messages, the sender includes a new random number each time it sends a message. When the receiver verifies the message, it checks the validity of the random number and ensures that each message is unique in time. Through this mechanism, the system can detect and prevent replay attacks in real time.
[0116] Resistance to side channel attacks: Due to the limited computing resources of the device, the smart door lock may be threatened by side channel attacks. The present invention effectively avoids the risk of directly exposing the key by introducing the random number RRR and the dynamic key generation mechanism in the calculation process. In addition, the hardware protection measures used in embedded devices, such as power balancing technology, further improve the ability to resist side channel attacks.
[0117] Table 1 Test data
[0118]
[0119] Through the test data of this embodiment, we can see that the security protection method based on the HMAC algorithm of the present invention has significant advantages in preventing key leakage, replay attacks and side channel attacks, while optimizing computing efficiency and reducing energy consumption, and is particularly suitable for application scenarios of the Internet of Things and low-power devices. These improvements not only improve the security of the system, but also enhance the applicability and user experience of the device.
[0120] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A HMAC algorithm security protection solution, characterized in that: The steps include: S1. During the authentication process, the sender pre-processes the message to be authenticated, divides the message into blocks, and performs an XOR operation on each message block with the key to generate a pre-processed message block; S2, process the key, generate a dynamic key according to the rules of the HMAC algorithm, and combine the internal padding value and the external padding value; S3, through the HMAC algorithm, using the dynamic key, internal filling value and external filling value, complete the calculation of the internal hash value and the external hash value to generate a message authentication code; S4. The receiver pre-processes the message and generates the expected message digest based on the HMAC algorithm, and verifies whether the generated message authentication code is consistent with the authentication code provided by the sender. If they are consistent, the authentication is successful. S5. Mask the key through a dynamic random number mechanism to prevent replay attacks and side channel attacks, and return the generated message authentication code and random number parameters to the recipient for verification.
2. According to claim 1, a HMAC algorithm security protection scheme is characterized in that: The S1 comprises the following steps: S11, receiving a message M to be authenticated, and converting the message M into binary form; S12, add a 1 bit at the end of the message M, and then add several 0 bits until the message length reaches an integer multiple of the one-way hash function block length b; S13, appending the total length information of the original message M to the last group after padding, the length information occupies the last 64 bits and is stored in big-endian format; S14, divide the padded message M into several blocks according to the block length b, forming message blocks x1, x2, ..., x n ; S15, if the length of the padded message is less than a packet length b, then add an all-zero block as a placeholder packet; S16, each message block x i The bit-by-bit XOR operation with the key k generates the processed message block S i =x i ⊕k, where S i is the first input packet of the hash function; S17, the processed message blocks S1, S2, ..., S n Combine in order to generate the preprocessed message S; S18. Provide the pre-processed message S to subsequent dynamic key generation and hash calculation steps.
3. According to claim 1, a HMAC algorithm security protection scheme is characterized in that: The S2 comprises the following steps: S21, process the key k. If the key length is less than the packet length b, fill the end with zeros until its length is equal to b. If the key length is greater than b, calculate the key through a one-way hash function to generate a hash value k', and use k' as the new key. S22. Generate a first random number R by using a cryptographically secure pseudo-random number generator, where the length of the random number R is equal to the packet length b and is highly unpredictable; S23, combining the key k with the random number R to generate a dynamic key k + , and its calculation formula is S24, constructing an internal padding value ipad and an external padding value opad, which are cyclic sequences of fixed values 0x36 and 0x5C respectively, and the lengths of both are equal to the packet length b; S25, the dynamic random number R adjusts the generation rules of ipad and opad, and adds a dynamic offset to the fill value in each group; S26, the dynamic key k + Combined with the adjusted ipad and opad, an input group for hash calculation is generated.
4. The HMAC algorithm security protection scheme according to claim 1, characterized in that: The S3 comprises the following steps: S31, the dynamic key k + Combined with the internal fill value ipad, this generates the first input group: S32, group the pre-processed messages into x1, x2, ..., x n Combine in order the first input group S i After that, the one-way hash function is input to generate the internal hash value H i ; S33, the dynamic key k + Combined with the external padding value opad, this generates the second input grouping: S34, the internal hash value H i Group with the second input S o After combination, the one-way hash function is input to generate the final message authentication code HMAC(M).
5. The HMAC algorithm security protection scheme according to claim 1, characterized in that: The S4 comprises the following steps: S41, the receiver receives the message M', the random number parameters R, R1, and the sender's authentication code HMAC(M); S42, pre-process the message M' in accordance with the sender to generate packets x1, x2, ..., x n ; S43, based on the shared key k and the received random number R, generate a dynamic key k + , and adjust the padding values ipad and opad; S44, combined with dynamic key k + And the adjusted padding value to generate the authentication code HMAC(M'), the calculation formula is: Wherein, h represents a one-way hash function; S45. Compare the generated authentication code HMAC(M') with the authentication code HMAC(M) of the sender. If they are consistent, the authentication is successful.
6. A HMAC algorithm security protection solution according to claim 1, characterized in that: The S5 comprises the following steps: S51, generate a first random number R and a second random number R1, and perform dynamic mask processing on the key k, S52. Calculate the intermediate variable A. The formula is: S53, calculating the key k=A+R when unmasking; S54. In the hash calculation, the intermediate variable A adjusts the dynamic key k + and fill values ipad,opad; S55. Return the generated message authentication code and random number parameters R and R1 to the recipient for dynamic verification of authentication.