In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
1. FIDO and U2F
FIDO (Fast IDentity Online Alliance) is a standards-based, interoperable authentication ecosystem.
U2F (Universal 2nd Factor) is a stronger authentication protocol proposed by FIDO Alliance using standard public key cryptography.
U2F adds a layer of second factor (2nd Factor) protection based on the commonly used user name / password authentication, which is supported by physical hardware.
2. Principle of U2F protocol
The official website of FIDO introduces the application principle of U2F with two pictures, which divides the application process into two stages:
The registration phase, as shown in figure 1:
The process in figure 1 of is as follows:
The client prompts the user to select available U2F devices that comply with the online service policy. The user uses the buttons on the U2F device to unlock the U2F device. U2F devices create a new public / private key pair unique to local devices, online services, and user accounts. The client sends the public key to the online service and associates it with the user's account, and the private key is stored in the U2F device.
authentication phase, as shown in figure 2:
The process in figure 2 of is as follows: the online service requires the user to log in using the U2F device that was previously registered. The user uses the buttons on the U2F device to unlock the U2F device. The device uses the user's account ID provided by the server to select the correct key and sign the challenge value issued by the server. The U2F device sends the signed challenge back to the server, which uses the stored public key for authentication, and the server allows the user to log in after successful authentication.
The principle of U2F is very simple: the user needs to use the user name / password and the client device (physical device) to complete the registration and login authentication of the online service website; during the registration of the user with the online service, the user's client device will create a new key pair. The device retains the private key and registers the public key with the online service; during the login authentication period, the client proves the ownership of the private key to the service by signing the challenge value, so as to complete the identity authentication. In fact, this is no different from our daily use of online banking login when we need to insert USB Key, perhaps the only technical difference is that the browser uses a specific plug-in to identify the bank's USB Key, while for U2F devices, the browser has a built-in identification interface. 3. Message format of U2F protocol
The U2F protocol supports two operations: registration and authentication, which can be divided into three phases, as shown in figure 3.
in figure 3, Relying Party (RP for short) is the online service site described in section 2. FIDO Client is the client, and the process of the three phases is as follows:
Setup: at this stage, the client requests a challenge value from the online service site, and the client uses this challenge value to generate a request message that is sent to the U2F device. Processing: at this stage, the U2F device does some cryptographic operations on the request message and creates a response message. Verification: at this stage, the client sends the response message of the U2F device to the server for verification, and the server processes the response message and verifies its correctness. For a correct registration response, the server registers a public key for the user; for a correct authentication response, the server believes that the user has a correct private key to pass authentication.
FIDO provides the HID protocol for message communication between browsers and U2F devices (using USB interface). For details of the protocol, please see the corresponding definition document.
next let's take a look at the data frame format between the browser and the U2F device. 3.1. Registration request message
The enrollment request message is shown in figure 4:
The fields in the message have the following meanings:
Challenge parameter [32 bytes]: uses the SHA-256 algorithm to get a 32-bit summary of a Client Data consisting of challenge values (a JSON string generated by the client, as described later). Application parameter [32 bytes]: for applications that use UTF-8 encoding, ID (application identity) uses the SHA-256 algorithm to get a 32-bit summary. 3.2. Registration response message
The registration response message is shown in figure 5:
The fields in the message have the following meanings:
Reserved byte [1 byte]: fixed value 0x05. User public key [65 bytes]: 65 bytes of public key. Key handle length byte [1 byte]: key handle is used to locate the private key, where 1 byte is used to represent the length. Key handle [length specified in previous field]: the value of key handle. Attestation certificate [variable length]: use a certificate in X.509 DER format (somewhat similar to the vendor-provided root certificate), where the public key is used to verify the subsequent signature. Signature [variable length, 71-73 bytes]: uses the signature value of the ECDSA algorithm and encodes it in ANSI X9.62 format. The original text of the signature is: a byte request for 0x00 the challenge parameter in the application parameter request the value of the key handle mentioned above is the user public key3.3 mentioned above. Authentication request message
The authentication request message is shown in figure 6:
The fields in the message have the following meanings:
Control byte (P1): values can be three values: 0x07 ("check-only"), 0x03 ("enforce-user-presence-and-sign"), 0x08 ("dont-enforce-user-presence-and-sign") challenge parameter [32 bytes]: a 32-bit summary is obtained using the SHA-256 algorithm for the Client Data consisting of challenge values (a JSON string generated by the client, as described later). Application parameter [32 bytes]: for applications that use UTF-8 encoding, ID (application identity) uses the SHA-256 algorithm to get a 32-bit summary. Key handle length byte [1 byte]: 1 byte represents the length of the key handle. Key handle [length specified in previous field]: the value of key handle. 3.4. Authentication response message
The authentication response message is shown in figure 7:
The fields in the message have the following meanings:
User presence byte [1 byte]: 0 indicates that the user does not exist, and 1 indicates that the user exists. Counter [4 bytes]: U2F device authentication count, big byte order. Signature: uses the signature value of the ECDSA algorithm and encodes it in ANSI X9.62 format. The original text of the signature is: application parameter [32 bytes]: application parameter in the authentication request. User presence byte [1 byte]: the user presence byte mentioned above. Counter: the counter mentioned above. Challenge parameter [32 bytes]: the challenge parameter value in the authentication request. 3.5. Clientdata
The construction of challenge parameter in the previous request / response message of uses clientdata,clientdata as a JSON object string, whose object structure ClientData is defined as follows:
Dictionary ClientData {DOMString typ;DOMString challenge;DOMString origin; (DOMString or JwkKey) cid_pubkey;}
The meanings of the attributes in the ClientData structure are as follows:
Typ: use the value 'navigator.id.finishEnrollment', authentication' navigator.id.getAssertion' when registering. Challenge: a string that uses websafe-base64 encoding (often referred to as urlbase64 encoding, see RFC4648 Chapter 5), provided by online service sites. Origin: website logo. Cid_pubkey: optional parameter. 4 references
1. Https://fidoalliance.org/how-fido-works/
2. Https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/FIDO-U2F-COMPLETE-v1.2-ps-20170411.pdf
3. Http://www.ietf.org/rfc/rfc4648.txt
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.