An authentication method and device based on an Android system and Ethernet 802.1x

By configuring Ethernet-related support and adding authentication interfaces in the Android system, the lack of Ethernet 802.1x authentication in the Android system was resolved, enabling secure authentication and a user-friendly interface for wired networks, thus improving security and user experience.

CN116015933BActive Publication Date: 2026-05-29SHANGHAI SUMI TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI SUMI TECH CO LTD
Filing Date
2022-12-30
Publication Date
2026-05-29

Smart Images

  • Figure CN116015933B_ABST
    Figure CN116015933B_ABST
Patent Text Reader

Abstract

The application discloses an authentication method and device for Ethernet 802.1x based on an Android system, wherein the authentication method comprises the following steps: configuring a network security module of the Android system of a terminal device as a wired interface suitable for Ethernet, configuring a socket communication mode, then adding an interface for Ethernet 802.1x authentication interaction in a hardware layer, a framework layer and an application layer of the Android system, adding an interface call for starting a wired network security service in the framework layer of the Android system, and adding an interface call for establishing an Ethernet monitoring thread and an interface call for establishing a socket connection, and triggering corresponding 802.1x authentication operation when detecting that the terminal device accesses a wired network. Only the terminal device authenticated by an 802.1x authentication server can be connected to the Ethernet, thereby improving the security of network use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Ethernet security, and in particular to an Ethernet 802.1x authentication method and apparatus based on the Android system. Background Technology

[0002] The Android system's Ethernet framework supports basic Ethernet access and networking functions, but it does not have interfaces related to 802.1x authentication, therefore it does not support Ethernet 802.1x authentication.

[0003] 802.1x uses the physical characteristics of switched LAN infrastructure to authenticate devices connected to a specific port on the LAN. The authentication process verifies the legitimacy of the user's identity. If authentication fails, port access will be blocked; if authentication succeeds, the user is authorized to access network resources, and billing management is implemented for the user's access to network resources.

[0004] The existing Android system lacks 802.1x authentication functionality, allowing access to the external network simply by connecting to a wired network, which poses a security risk. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a method and apparatus for Ethernet 802.1x authentication based on the Android system. This solves the security authentication problem of Android system terminal devices when accessing wired networks using 802.1x. Specifically, the technical solution of this invention is as follows:

[0006] In a first aspect, the present invention discloses an Ethernet 802.1x authentication method based on the Android system, comprising:

[0007] Configure Ethernet-related support in the network security module of the Android system on the terminal device. The relevant support includes configuring the network security module as a wired interface suitable for Ethernet and configuring socket communication mode.

[0008] Interfaces for Ethernet 802.1x authentication interaction have been added to the hardware layer, framework layer, and application layer of the Android system.

[0009] Add a new interface call to start wired network security service in the framework layer of the Android system; and create interface calls for Ethernet monitoring thread and socket connection establishment.

[0010] When the terminal device is detected to be connected to a wired network, the corresponding 802.1x authentication operation is triggered.

[0011] In some implementations, configuring Ethernet-related support in the network security module of the Android system further includes:

[0012] Configure Ethernet service parameters and service registration in the network security module.

[0013] In some implementations, triggering the corresponding 802.1 authentication operation when the terminal device is detected to be connected to a wired network specifically includes:

[0014] Detect the network port status of the terminal device;

[0015] When the network port status is physically connected but the communication link is not open, the wired network security process is started, and a new Ethernet monitoring thread is created. The monitoring thread communicates with the network configuration service process via a socket.

[0016] When the network interface is in the state of obtaining an IP address, a scan command is sent to the network security module via a socket.

[0017] The system detects whether the network security module has detected an 802.1x authentication server.

[0018] When an 802.1x authentication server is detected, perform 802.1x authentication with the authentication server.

[0019] In some implementations, after the terminal device performs authentication interaction with the server, the process further includes:

[0020] The network security module transmits the authentication result to the Ethernet monitoring thread via a socket.

[0021] The Ethernet monitoring thread transmits the authentication result to the application layer of the Android system;

[0022] The application layer of the Android system updates the authentication result to the Ethernet 802.1x menu.

[0023] In some implementations, the interface for Ethernet 802.1x authentication interaction includes a wired network security module service start interface, a service termination interface, a socket connection interface, a socket disconnect interface, a message receiving interface, and a command sending interface.

[0024] Secondly, the present invention also discloses a device for Ethernet 802.1x authentication based on the Android system, comprising:

[0025] A configuration module is used to configure Ethernet-related support in the network security module of the Android system of the terminal device; the related support includes configuring the network security module as a wired interface suitable for Ethernet and configuring socket communication mode.

[0026] A new interface module has been added to provide interfaces for Ethernet 802.1x authentication interaction at the hardware, framework, and application layers of the Android system.

[0027] A new interface call module is added to add interface calls for starting wired network security services, creating a new Ethernet monitoring thread, and establishing a socket connection in the Ethernet connection status processing of the framework layer of the Android system.

[0028] The authentication module is used to perform 802.1x authentication interaction with the 802.1x authentication server when the terminal device discovers the 802.1x authentication server.

[0029] In some implementations, the configuration module is also used to configure service parameters and service registration for Ethernet in the network security module.

[0030] Preferably, the authentication module includes:

[0031] The detection submodule is used to detect the network port status of the terminal device;

[0032] The first execution submodule is used to start the wired network security process and create a new Ethernet monitoring thread when the network port status is physically connected but the communication link is not open. The monitoring thread is connected to the network security module process through a socket.

[0033] The second execution submodule is used to send a scanning command to the network security module via a socket when the network interface is in the state of obtaining an IP address.

[0034] The scanning submodule is used to detect whether the network security module has detected an 802.1x authentication server;

[0035] The authentication interaction submodule is used to perform 802.1x authentication interaction with the authentication server when an 802.1x authentication server is detected.

[0036] In some embodiments, the device for Ethernet 802.1x authentication based on the Android system further includes:

[0037] The authentication result transmission module is used to transmit the authentication result to the application layer through the Ethernet monitoring thread after the network security module transmits the authentication result to the Ethernet monitoring thread; so that the application layer can update the Ethernet 802.1x menu with the authentication result.

[0038] In some implementations, the newly added interface module is specifically used to add a wired network security module service start interface, service termination interface, socket connection interface, socket disconnection interface, message receiving interface, and command sending interface.

[0039] Compared with the prior art, the present invention has at least one of the following beneficial effects:

[0040] 1. In the native Ethernet framework of the Android system, wired interfaces and socket communication methods suitable for Ethernet are configured. Furthermore, interfaces for Ethernet 802.1x authentication interaction are added at the hardware layer, framework layer, and application layer. This enables terminal devices to verify the user's identity based on the 802.1x protocol authentication method when accessing Ethernet via wired means. Only terminal devices authenticated by the authentication server can establish Ethernet connections, thereby improving the security of terminal devices using the network.

[0041] 2. It triggers corresponding Ethernet 802.1x authentication operations based on different network port statuses, eliminating the need for manual user intervention and offering a user-friendly interface. Furthermore, it displays the authentication results and reasons for unsuccessful Ethernet connections on the user interface, enabling users to quickly identify the cause of the network connection failure, aiding in troubleshooting and improving the user experience. Attached Figure Description

[0042] The preferred embodiments will now be described in a clear and easy-to-understand manner, in conjunction with the accompanying drawings, to further explain the above-mentioned characteristics, technical features, advantages, and implementation methods of the present invention.

[0043] Figure 1 This is a flowchart of an embodiment of an Ethernet 802.1x authentication method based on the Android system according to the present invention;

[0044] Figure 2 This is a flowchart of another embodiment of the Ethernet 802.1x authentication method based on the Android system according to the present invention;

[0045] Figure 3 This is a block diagram of an embodiment of an Ethernet 802.1x authentication device based on the Android system according to the present invention;

[0046] Figure 4 This is a block diagram of another embodiment of an Ethernet 802.1x authentication device based on the Android system according to the present invention.

[0047] Explanation of icon numbers:

[0048] 10--Configuration module; 20--Add interface module; 30--Add interface call module; 40--Authentication module; 41--Detection submodule; 42--First execution submodule; 43--Second execution submodule; 44--Scanning submodule; 45--Authentication interaction submodule; 50--Authentication result transmission module. Detailed Implementation

[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without any creative effort.

[0050] To keep the drawings concise, each figure only schematically shows the parts relevant to the invention, and these do not represent the actual structure of the product. Furthermore, to facilitate understanding, in some figures, only one of components with the same structure or function is schematically depicted, or only one is labeled. In this document, "one" not only means "only one," but can also mean "more than one."

[0051] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0052] In this document, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0053] Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0054] Example 1

[0055] In one embodiment, refer to the appendix to the specification. Figure 1 The present invention provides an Ethernet 802.1x authentication method based on the Android system, comprising:

[0056] S101 configures Ethernet-related support in the network security module of the Android system of the terminal device. The related support includes configuring the network security module as a wired interface suitable for Ethernet and configuring socket communication mode.

[0057] Specifically, the network security module of the Android system can be wpa_supplicant. wpa_supplicant was originally an open-source project, modified by Google and added to the Android mobile platform. It primarily supports WEP, WPA / WPA2, and WAPI wireless protocols and encryption authentication. Its actual operation involves interacting with the driver via sockets to report data to the user. The user can send commands to wpa_supplicant via sockets to invoke the driver to operate the chip. In this embodiment, wpa_supplicant is configured as a wired interface suitable for Ethernet. Furthermore, a socket communication method is configured. This communication method allows for customizable data transmission, small data volume, short transmission time, and high performance.

[0058] Preferably, the network security module of the Android system is configured with Ethernet support. In addition to configuring the network security module as a wired interface suitable for Ethernet and configuring socket communication, it also includes configuring Ethernet service parameters and service registration.

[0059] The S102 adds interfaces for Ethernet 802.1x authentication interaction in the hardware layer, framework layer, and application layer of the Android system.

[0060] Specifically, the Android system has five layers, from top to bottom: the application layer, the framework layer, the system runtime library layer, the hardware layer, and the Linux kernel layer. Adding new interfaces to the Android system requires layer-by-layer encapsulation and packaging according to corresponding rules. This differs from other smaller systems that allow developers more freedom in adding interfaces, thus making Android development more challenging. In this embodiment, the terminal device's Android system adds wired network security module service start interface, service termination interface, socket connection interface, socket disconnection interface, message receiving interface, and command sending interface to the hardware layer, framework layer, and application layer, respectively. These interfaces conform to the Android system's operating rules and are used for Ethernet 802.1x authentication interaction.

[0061] S103 adds a new interface call to start wired network security service in the framework layer of the Android system; and creates a new interface call for Ethernet monitoring thread and an interface call to establish socket connection.

[0062] S104 When the terminal device is detected to be connected to a wired network, the corresponding 802.1x authentication operation is triggered.

[0063] Specifically, when a user needs internet access, they open an 802.1x client program, enter their registered username and password, and initiate a connection request. At this point, the client program sends an authentication request message to the switch, starting an authentication process. Upon receiving the authentication request frame, the switch sends a request frame asking the user's client program to submit the entered username. The client program responds to the switch's request, sending the username information to the switch via a data frame. The switch encapsulates the data frame from the client and sends it to the authentication server for processing. After receiving the username information forwarded by the switch, the authentication server compares it with the username table in its database, finds the corresponding password, encrypts it with a randomly generated encryption key, and simultaneously transmits this encryption key to the switch, which then forwards it to the client program.

[0064] After receiving the encryption key from the switch, the client program encrypts the password portion using this key and transmits it to the authentication server via the switch. The authentication server compares the received encrypted password with its own encrypted password. If they match, the user is considered legitimate, an authentication success message is sent, and the server instructs the switch to open the port, allowing the user's traffic to access the network through the port. Otherwise, an authentication failure message is sent, and the switch port remains closed, allowing only authentication information data to pass through while disallowing traffic data.

[0065] This embodiment configures a wired interface and socket communication method suitable for Ethernet within the native Ethernet framework of the Android system. Furthermore, it adds interfaces for Ethernet 802.1x authentication interaction at the hardware layer, framework layer, and application layer. This enables terminal devices to verify the user's identity based on the 802.1x protocol authentication method when accessing Ethernet via wired connection. Only terminal devices authenticated by the authentication server can establish Ethernet connections, thereby improving the security of network usage for terminal devices.

[0066] Example 2

[0067] Another embodiment of the present invention based on the Ethernet 802.1x authentication method of the Android system, such as... Figure 2 As shown, it includes the following steps:

[0068] S201 configures Ethernet-related support in the network security module of the Android system of the terminal device. The related support includes configuring the network security module as a wired interface suitable for Ethernet and configuring socket communication mode.

[0069] S202 adds interfaces for Ethernet 802.1x authentication interaction in the hardware layer, framework layer and application layer of the Android system;

[0070] S203 adds a new interface call to start wired network security service in the framework layer of the Android system; and creates a new interface call for Ethernet monitoring thread and an interface call to establish socket connection.

[0071] S204 detects the network port status of the terminal device;

[0072] S205 When the network port status is physically connected but the communication link is not open, start the wired network security process and create a new Ethernet monitoring thread. The monitoring thread communicates with the network configuration service process through a socket.

[0073] S206 When the network interface is in the state of obtaining an IP address, a scan command is sent to the network security module via a socket;

[0074] S207 detects whether the network security module has scanned an 802.1x authentication server. If no 802.1x authentication server is detected, proceed to step S209; otherwise, proceed to step S208.

[0075] S208 performs 802.1x authentication with the authentication server;

[0076] S209 updates the results to the Ethernet 802.1x menu.

[0077] Specifically, a thread for monitoring the Ethernet, a call thread, and a service startup thread are added to the Android system's framework layer. This thread constantly monitors the Ethernet port status and takes different actions based on the port's state. For example, when a user plugs their device into the Ethernet cable, the monitored port status shows a physical connection being established but the link not yet operational. Therefore, a wired network security process, specifically the `wired wpa_supplicant` service process, is started, and a new Ethernet monitoring thread is created. This monitoring thread establishes a socket communication connection with the network security service process. When the device's Ethernet port status is "obtaining an IP address," a scan command is sent to the `wired wpa_supplicant` service process via the socket. The `wired wpa_supplicant` service process then checks if an 802.1x authentication server is detected. If the authentication server is found, the user enters a username and password on the device to authenticate. If the username and password are valid, authentication is successful, allowing the connection to the Ethernet network, and the device's interface will display "Connected." Authentication fails when the entered username and password are invalid, and the terminal device's interface displays "Incorrect username or password". If the authentication server is not found after scanning, the interface displays "No available network found". Similarly, if the network cable is disconnected, the terminal device's interface will display "Connection lost".

[0078] This embodiment triggers corresponding Ethernet 802.1x authentication operations based on different network port statuses, eliminating the need for manual user intervention and offering a user-friendly experience. Furthermore, it displays the authentication results and reasons for unsuccessful Ethernet connections on the user interface, allowing users to quickly identify the cause of the network connection failure, aiding in troubleshooting and improving the user experience.

[0079] Example 3

[0080] Based on the same technical concept, this invention also discloses an Ethernet 802.1x authentication device based on the Android system. This device can perform Ethernet 802.1x authentication using any of the above-mentioned methods and embodiments of Ethernet 802.1x authentication based on the Android system. Specifically, one embodiment of the Ethernet 802.1x authentication device based on the Android system in this application is as follows: Figure 3 As shown, it includes:

[0081] Configuration module 10 is used to configure Ethernet-related support in the network security module of the Android system of the terminal device; the related support includes configuring the network security module as a wired interface suitable for Ethernet and configuring socket communication mode;

[0082] Specifically, configuration module 10 configures the network security module of the Android system on the terminal device to support Ethernet. In this embodiment, the network security module is wpa_supplicant, which can be configured with several interfaces, including nl80211 and wext. For Wi-Fi, nl80211 or wext is used, while for Ethernet, the wired interface is used. Socket communication is configured; this communication method allows for customizable data transmission, small data volume, short transmission time, and high performance.

[0083] A new interface module 20 has been added to provide interfaces for Ethernet 802.1x authentication interaction at the hardware, framework, and application layers of the Android system.

[0084] A new interface call module 30 is added, which is used to add interface calls for starting wired network security services, creating new Ethernet monitoring threads, and establishing socket connections in the Ethernet connection status processing of the framework layer of the Android system.

[0085] The authentication module 40 is used to perform 802.1x authentication interaction with the server when the terminal device discovers the 802.1x authentication server.

[0086] This embodiment, within the native framework of the Android system on the terminal device, enables the terminal device to perform Ethernet 802.1x authentication by configuring the network security module to be suitable for Ethernet and adding an interface for authentication interaction. This verifies the legitimacy of the user's identity. If authentication fails, port access will be blocked; if authentication succeeds, the user is authorized to access network resources, thereby improving the security of the terminal device's network connection and enabling billing management of the user's access to network resources.

[0087] Example 4

[0088] Configuration module 10 is used to configure Ethernet-related support in the network security module of the Android system of the terminal device; the related support includes configuring the network security module as a wired interface suitable for Ethernet and configuring socket communication mode;

[0089] A new interface module 20 has been added to provide interfaces for Ethernet 802.1x authentication interaction at the hardware, framework, and application layers of the Android system.

[0090] A new interface call module 30 is added, which is used to add interface calls for starting wired network security services, creating new Ethernet monitoring threads, and establishing socket connections in the Ethernet connection status processing of the framework layer of the Android system.

[0091] Detection submodule 41 is used to detect the network port status of the terminal device;

[0092] The first execution submodule 42 is used to start a wired network security process and create a new Ethernet monitoring thread when the network port status is physically connected but the communication link is not open. The monitoring thread is connected to the network security module process via a socket.

[0093] The second execution submodule 43 is used to send a scanning command to the network security module via a socket when the network interface is in the state of obtaining an IP address.

[0094] The scanning submodule 44 is used to detect whether the network security module has detected an 802.1x authentication server;

[0095] The authentication interaction submodule 45 is used to perform 802.1x authentication interaction with the authentication server when an 802.1x authentication server is detected.

[0096] The authentication result transmission module 50 is used to transmit the authentication result to the application layer through the Ethernet monitoring thread after the network security module transmits the authentication result to the Ethernet monitoring thread; so that the application layer can update the Ethernet 802.1x menu with the authentication result.

[0097] This embodiment refines the authentication module 40 based on embodiment three. It issues different instructions according to changes in the network port status and feeds back the authentication interaction results to the terminal device's interface, allowing the user to make adjustments based on the feedback. For example, when the scanning submodule 44 detects that the network security module has scanned an 802.1x authentication server, but Ethernet access is impossible due to an incorrect username or password, the user can promptly adjust and enter the correct username or password to access the Ethernet.

[0098] It should be noted that the above embodiments can be freely combined as needed. The above are merely preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for Ethernet 802.1x authentication based on the Android system, characterized in that, Includes the following steps: Configure Ethernet-related support in the network security module of the Android system on the terminal device. The relevant support includes configuring the network security module as a wired interface suitable for Ethernet and configuring socket communication mode. Interfaces for Ethernet 802.1x authentication interaction have been added to the hardware layer, framework layer, and application layer of the Android system. Add a new interface call to start wired network security service in the framework layer of the Android system; and create interface calls for Ethernet monitoring thread and socket connection establishment. When the terminal device is detected to be connected to a wired network, the corresponding 802.1x authentication operation is triggered; When the terminal device is detected to be connected to a wired network, the corresponding 802.1 authentication operation is triggered. Specifically, it includes: Detect the network port status of the terminal device; When the network port status is physically connected but the communication link is not open, the wired network security process is started, and a new Ethernet monitoring thread is created. The monitoring thread communicates with the network configuration service process via a socket. When the network interface is in the state of obtaining an IP address, a scan command is sent to the network security module via a socket. The system detects whether the network security module has detected an 802.1x authentication server. When an 802.1x authentication server is detected, perform 802.1x authentication with the authentication server.

2. The Ethernet 802.1x authentication method based on the Android system according to claim 1, characterized in that, The configuration of Ethernet-related support in the network security module of the Android system also includes: Configure Ethernet service parameters and service registration in the network security module.

3. The Ethernet 802.1x authentication method based on the Android system according to claim 1, characterized in that, After the terminal device performs authentication interaction with the server, it also includes: The network security module transmits the authentication result to the Ethernet monitoring thread via a socket. The Ethernet monitoring thread transmits the authentication result to the application layer of the Android system; The application layer of the Android system updates the authentication result to the Ethernet 802.1x menu.

4. The Ethernet 802.1x authentication method based on the Android system according to claim 1, characterized in that, The interfaces used for Ethernet 802.1x authentication interaction include a wired network security module service start interface, a service termination interface, a socket connection interface, a socket disconnect interface, a message receiving interface, and a command sending interface.

5. An Ethernet 802.1x authentication device based on the Android system, characterized in that, include: The configuration module is used to configure Ethernet-related support in the network security module of the Android system on the terminal device. The related support includes configuring the network security module as a wired interface suitable for Ethernet and configuring socket communication mode; A new interface module has been added to provide interfaces for Ethernet 802.1x authentication interaction at the hardware, framework, and application layers of the Android system. A new interface call module is added to add interface calls for starting wired network security services, creating a new Ethernet monitoring thread, and establishing a socket connection in the Ethernet connection status processing of the framework layer of the Android system. The authentication module is used to perform 802.1x authentication interaction with the 802.1x authentication server when the terminal device discovers the 802.1x authentication server; The authentication module includes: The detection submodule is used to detect the network port status of the terminal device; The first execution submodule is used to start the wired network security process and create a new Ethernet monitoring thread when the network port status is physically connected but the communication link is not open. The monitoring thread is connected to the network security module process through a socket. The second execution submodule is used to send a scanning command to the network security module via a socket when the network interface is in the state of obtaining an IP address. The scanning submodule is used to detect whether the network security module has detected an 802.1x authentication server; The authentication interaction submodule is used to perform 802.1x authentication interaction with the authentication server when an 802.1x authentication server is detected.

6. The Ethernet 802.1x authentication device based on the Android system according to claim 5, characterized in that, The configuration module is also used for, Configure Ethernet service parameters and service registration in the network security module.

7. The Ethernet 802.1x authentication device based on the Android system according to claim 5, characterized in that, Also includes: The authentication result transmission module is used to transmit the authentication result to the application layer through the Ethernet monitoring thread after the network security module transmits the authentication result to the Ethernet monitoring thread. This allows the application layer to update the authentication result to the Ethernet 802.1x menu.

8. The Ethernet 802.1x authentication device based on the Android system according to claim 5, characterized in that, The newly added interface module is specifically used to add a wired network security module service start interface, service termination interface, socket connection interface, socket disconnection interface, message receiving interface, and command sending interface.