CN107613494B - Large-scale user sign-in method based on wireless equipment handshake protocol - Google Patents
Large-scale user sign-in method based on wireless equipment handshake protocol Download PDFInfo
- Publication number
- CN107613494B CN107613494B CN201710755143.7A CN201710755143A CN107613494B CN 107613494 B CN107613494 B CN 107613494B CN 201710755143 A CN201710755143 A CN 201710755143A CN 107613494 B CN107613494 B CN 107613494B
- Authority
- CN
- China
- Prior art keywords
- server
- user
- request message
- sign
- client
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Mobile Radio Communication Systems (AREA)
- Small-Scale Networks (AREA)
Abstract
Description
技术领域technical field
本发明涉及无线网络技术领域,尤其是一种基于无线设备握手协议的大规模用户签到方法。The invention relates to the technical field of wireless networks, in particular to a large-scale user sign-in method based on a wireless device handshake protocol.
背景技术Background technique
用户签到是一种确认用户实际出现在指定场景的方法,传统的做法是在一张列有用户标识(如姓名)的纸上要求用户签字。日常生活中,教师为了获得学生的出勤率,一般需要采用某种签到方法。然而,传统的签到方法当用户人数超过一定数目时,会因耗时过长而无实际价值,例如,当学生人数达到百人以上时,这种签到方法会占用大量课堂时间。User check-in is a method of confirming that a user actually appears in a designated scene, and the traditional approach is to require the user to sign on a piece of paper that lists the user's identification (eg, name). In daily life, teachers generally need to adopt some kind of sign-in method in order to obtain the attendance rate of students. However, when the number of users exceeds a certain number, the traditional check-in method will take too long to be of practical value. For example, when the number of students exceeds 100, this check-in method will take up a lot of class time.
替代方法是利用蓝牙或WiFi。使用蓝牙时,用户应当拥有一台有蓝牙模块的设备,当此设备离服务器端的蓝牙较近时,二者可以配对、交换数据,从而服务器端可以发现用户。此方法的缺点是由蓝牙技术本身的局限性造成的:用户只有在服务器附近时才会被感知(一般10米以内),并且服务器一次只能连接一个用户。当用户数量增加时,整个过程依然耗时较长。The alternative is to utilize Bluetooth or WiFi. When using Bluetooth, the user should have a device with a Bluetooth module. When the device is close to the Bluetooth on the server side, the two can pair and exchange data, so that the server side can discover the user. The disadvantage of this method is caused by the limitations of the Bluetooth technology itself: the user is only perceived when the server is in the vicinity (generally within 10 meters), and the server can only connect to one user at a time. When the number of users increases, the whole process still takes a long time.
传统的利用WiFi签到的方法是一种基于连接的方法,即,用户加入到服务器端建立的局域网中,从而与服务器建立稳定的连接,通过局域网发送任意信号给服务器达到签到的目的。缺点是,普通无线路由器(AP)只能支持30个客户端同时连接,即使是昂贵的企业级的无线接入端,也只能支持60个左右的客户端同时连接。因此,此方法无法适用于人数超过百人的场景。The traditional method of using WiFi to sign in is a connection-based method, that is, the user joins the local area network established by the server to establish a stable connection with the server, and sends any signal to the server through the local area network to achieve the purpose of sign-in. The disadvantage is that an ordinary wireless router (AP) can only support 30 clients to connect at the same time, and even an expensive enterprise-level wireless access terminal can only support about 60 clients to connect at the same time. Therefore, this method cannot be applied to scenarios with more than 100 people.
发明内容SUMMARY OF THE INVENTION
发明目的:为解决上述技术问题,本发明提出一种基于无线设备握手协议的大规模用户签到方法,该方法耗时短、成本低,适用于大规模用户签到。Purpose of the invention: In order to solve the above technical problems, the present invention proposes a large-scale user check-in method based on a wireless device handshake protocol, which is short-time-consuming and low-cost, and is suitable for large-scale user check-in.
技术方案:为实现上述技术效果,本发明提出一种基于无线设备握手协议的大规模用户签到方法,该方法包括四个阶段:Technical solution: In order to achieve the above technical effects, the present invention proposes a large-scale user check-in method based on a wireless device handshake protocol, which includes four stages:
(1)服务器初始化阶段:(1) Server initialization phase:
服务提供者预先为各客户端分配一个唯一的签到者编号,并将各客户端的签到者编号存储至服务器中;服务器创建加密无线局域网,加密无线局域网的加密方式为WEP;The service provider assigns a unique sign-in number to each client in advance, and stores the sign-in number of each client in the server; the server creates an encrypted wireless local area network, and the encryption method of the encrypted wireless local area network is WEP;
(2)用户接入阶段:(2) User access stage:
用户通过客户端接入加密无线局域网时,通过握手协议向服务器发送请求报文,请求报文中包含客户端的签到者编号;When the user accesses the encrypted wireless local area network through the client, a request message is sent to the server through the handshake protocol, and the request message includes the client's sign-in number;
(3)服务器识别用户阶段:(3) The server identifies the user stage:
(3-1)服务器过滤与客户端之间的交互报文,寻找含有签到者编号的请求报文;(3-1) The server filters the interaction messages with the client, and looks for the request message containing the sign-in number;
(3-2)服务器从找到的请求报文中提取报文的第51到第53个字节作为初始化向量,记为I;(3-2) The server extracts the 51st to 53rd bytes of the message from the found request message as an initialization vector, denoted as 1;
(3-3)穷举所有可能的签到者编号,逐一与I进行匹配:(3-3) Enumerate all possible sign-in numbers and match with I one by one:
对于任意一个签到者编号U,将其拼接到I之后,组成待测密钥K,若K长度未达到64位,则在K末尾补0以使K为64位;用待测密钥K根据RC4算法对请求报文中从第55字节开始的140个字节的内容进行加密,得到加密后的报文L;判断L的后4字节是否是L前136个字节的CRC32校验码;若是,则服务器判定该请求报文对应的签到者编号为U,转入步骤(3-4);否则,对下一个签到者编号执行步骤(3-3);For any sign-in number U, after splicing it into I, the key K to be tested is formed. If the length of K does not reach 64 bits, 0 is added at the end of K so that K is 64 bits; use the key K to be tested according to The RC4 algorithm encrypts the content of 140 bytes starting from the 55th byte in the request message to obtain the encrypted message L; judge whether the last 4 bytes of L are the CRC32 checksum of the first 136 bytes of L If it is, the server determines that the sign-in number corresponding to the request message is U, and goes to step (3-4); otherwise, executes step (3-3) for the next sign-in number;
(3-4)服务器提取请求报文的MAC字段,并将MAC地址与步骤(3-3)中破解的签到者编号记录到本地存储器,作为对应客户端的密码;(3-4) The server extracts the MAC field of the request message, and records the MAC address and the sign-in number cracked in the step (3-3) to the local storage as the password of the corresponding client;
(3-5)服务器标记对应用户为“已到”;(3-5) The server marks the corresponding user as "arrived";
(4)断开连接阶段(4) Disconnection stage
当“已到”的用户再次向服务器发送请求报文时,由于请求报文中的初始签到者编号与服务器本地存储器中的密码不一致,则服务器发送拒绝连接报文给用户,用户接收到拒绝连接报文后放弃连接。When the "already arrived" user sends a request message to the server again, since the initial sign-in number in the request message is inconsistent with the password in the server's local storage, the server sends a connection rejection message to the user, and the user receives a connection rejection message. Abandon the connection after the message.
进一步的,所述请求报文的第27个字节为0xB0,第28个字节为0x40。Further, the 27th byte of the request message is 0xB0, and the 28th byte is 0x40.
进一步的,所述服务器具有WiFi功能,而所述客户端为具有WiFi功能的无线终端。Further, the server has WiFi function, and the client is a wireless terminal with WiFi function.
进一步的,所述服务器由计算机和路由器构成,而所述客户端为具有WiFi收发功能的手机、笔记本或者平板电脑。Further, the server is composed of a computer and a router, and the client is a mobile phone, a notebook or a tablet computer with a WiFi transceiver function.
有益效果:与现有技术相比,本发明具有以下优势:Beneficial effect: Compared with the prior art, the present invention has the following advantages:
(1)支持的用户数量多,可以支持百人以上的应用。(1) The number of supported users is large, and applications with more than 100 people can be supported.
(2)方便易用。用户在签到时不需要接近服务器,在无线信号覆盖的区域内均可签到。同时,用户不需要在设备上安装任何特殊软件。(2) Convenient and easy to use. Users do not need to approach the server when checking in, and they can check in in the area covered by wireless signals. At the same time, users do not need to install any special software on the device.
(3)部署成本低。签到服务的提供者不需要购买企业级的无线路由器,使用普通的无线路由器即可,降低了部署成本。(3) The deployment cost is low. Providers of check-in services do not need to purchase enterprise-level wireless routers, but can use ordinary wireless routers, which reduces deployment costs.
(4)耗时短。本发明提出的方法会捕获无线设备在握手过程中的报文,从中提取信息进行签到。握手阶段是无线设备进行交互的第一个阶段,因此耗时较短。(4) Time-consuming is short. The method proposed by the present invention captures the message of the wireless device in the handshake process, and extracts information from it to sign in. The handshake phase is the first phase in which wireless devices interact and therefore takes less time.
附图说明Description of drawings
图1为服务器根据握手报文破解用户编号的流程图。Figure 1 is a flowchart of the server cracking the user ID according to the handshake message.
图2为实验观测到的单用户签到平均时延随着签到用户个数变化的曲线图。Figure 2 is a graph showing the variation of the average check-in delay of a single user with the number of check-in users observed experimentally.
具体实施方式Detailed ways
下面结合附图对本发明作更进一步的说明。The present invention will be further described below in conjunction with the accompanying drawings.
本发明在实施时,签到服务提供者需要一个带WiFi功能的服务器,签到用户需要一个WiFi无线终端。前述带WiFi功能的服务器可以由一个无线路由器和一台计算机构成。前述的WiFi无线终端可以是手机、笔记本或者平板电脑等具有WiFi收发功能的设备。When the present invention is implemented, the sign-in service provider needs a server with WiFi function, and the sign-in user needs a WiFi wireless terminal. The aforementioned server with WiFi function can be constituted by a wireless router and a computer. The aforementioned WiFi wireless terminal may be a device with a WiFi transceiver function, such as a mobile phone, a notebook computer, or a tablet computer.
整个过程分为四个阶段:The whole process is divided into four stages:
1.服务器初始化阶段1. Server initialization phase
1.1服务提供者将签到者信息输入服务器。签到者信息至少包含用于区分签到用户的签到者编号,如学号。1.1 The service provider enters the check-in information into the server. The sign-in information at least includes the sign-in number used to distinguish the sign-in users, such as the student number.
1.2服务器创建加密无线局域网,等待用户连接。加密方式选择WEP。具体的加密密码可以是任意数字或字母组合,可以与某个用户签到者编号相同,也可以不同于任意用户的签到者编号。1.2 The server creates an encrypted wireless LAN and waits for the user to connect. Select WEP as the encryption method. The specific encrypted password can be any combination of numbers or letters, which can be the same as the sign-in number of a certain user, or different from the sign-in number of any user.
2.用户接入阶段2. User access stage
用户通过客户端加入加密无线局域网,当提示输入密码时,输入用户的签到者编号。此时客户端会自动通过握手协议向服务器发送请求报文,这些请求报文中包含了与用户签到者编号相关的信息。The user joins the encrypted wireless LAN through the client, and when prompted to enter the password, enter the user's sign-in number. At this time, the client will automatically send request packets to the server through the handshake protocol, and these request packets contain information related to the user's sign-in number.
3.服务器识别用户阶段3. The server identifies the user stage
服务器过滤用户的请求报文,提取出包含用户签到者编号信息的报文,采用密码碰撞的办法破解出用户输入的签到者编号。最后将用户签到者编号与无线设备的MAC地址记录到本地以备下次使用。服务器识别用户的流程如图1所示,具体如下:The server filters the user's request message, extracts the message containing the user's sign-in number information, and uses the method of password collision to decipher the sign-in number entered by the user. Finally, the user sign-in number and the MAC address of the wireless device are recorded locally for use next time. The process of identifying users by the server is shown in Figure 1, and the details are as follows:
3.1服务器跟踪与客户端交互的报文,寻找含有客户端加密信息的请求报文。这种报文的第27个字节为0xB0,第28个字节为0x40。3.1 The server tracks the packets interacting with the client, and looks for the request packet containing the encryption information of the client. The 27th byte of this message is 0xB0, and the 28th byte is 0x40.
3.2服务器从前述找到的请求报文中提取初始化向量,记为I。向量I为24位,位于报文的第51到第53个字节。3.2 The server extracts the initialization vector from the previously found request message, denoted as I. The vector I is 24 bits and is located in the 51st to 53rd bytes of the message.
3.3穷举所有可能的用户签到者编号,逐一与I匹配:对于签到者编号U,将其拼接到I之后,组成一个64位长的待测密钥K(若U长度不符合要求,则在末尾补0以使待测密钥为64位)。提取报文中从第55字节开始的140个字节的内容,记为J,用待测密钥K根据RC4算法对J的内容进行加密,得到加密报文L。如果加密报文L的后4字节A恰好是加密报文L前136个字节B的CRC32校验码,则说明请求报文对应的用户签到者编号为U,穷举结束,转入步骤3.4;否则,尝试下一个签到者编号,即对下一个签到者编号执行步骤3.3。3.3 Enumerate all possible user sign-in numbers and match with I one by one: for sign-in number U, splicing it to I to form a 64-bit long key to be tested K (if the length of U does not meet the requirements, in 0 is added at the end to make the key under test 64 bits). Extract the content of 140 bytes starting from the 55th byte in the message, denoted as J, and encrypt the content of J with the key K to be tested according to the RC4 algorithm to obtain the encrypted message L. If the last 4 bytes A of the encrypted message L happen to be the CRC32 check code of the first 136 bytes B of the encrypted message L, it means that the user sign-in number corresponding to the request message is U, the exhaustion is over, and go to the step 3.4; otherwise, try the next check-in number, that is, perform step 3.3 for the next check-in number.
3.4服务器提取请求报文的MAC字段,将MAC地址与3.3中破解的签到者编号记录到本地,做为对应用户的新密码。3.4 The server extracts the MAC field of the request message, and records the MAC address and the sign-in number cracked in 3.3 locally as the new password of the corresponding user.
3.5服务器标记对应用户为“已到”。3.5 The server marks the corresponding user as "arrived".
4.断开连接阶段4. Disconnect Phase
当“已到”的用户再次向服务器发送请求报文时,由于请求报文中的签到者编号与服务器本地存储器中的新密码不一致,则服务器发送拒绝连接报文给用户,用户接收到拒绝连接报文后放弃连接。这样可以及早让已签到用户放弃无线信道,节省无线网络资源,便于下一个用户的签到。When the "already arrived" user sends a request message to the server again, since the sign-in number in the request message is inconsistent with the new password in the server's local memory, the server sends a connection rejection message to the user, and the user receives a connection rejection message. Abandon the connection after the message. In this way, users who have signed in can be made to give up the wireless channel as soon as possible, saving wireless network resources and facilitating the sign-in of the next user.
实施案例Implementation case
本发明的一个具体实现案例如下。服务器为一台运行Ubuntu 16.04操作系统的笔记本电脑,其处理器为CoreTM i5-4210M。服务器通过USB接口连接到型号为Netgearwg111 v2 RTL8187的无线网卡。服务器通过无线网卡创建了WEP加密无线局域网。用户的WiFi无线终端采用智能手机。实验测试了用户签到时延随用户数的变化情况。这里的用户签到时延为服务器接收到用户的第一个无线报文开始至服务器破解出用户的编号为止的时间。图2为实验结果,可以看到,用户签到时延随着用户数的增加而增加,但当用户数为300人时,单用户的平均签到时延依然低于1.2毫秒。A specific implementation case of the present invention is as follows. The server is a laptop running Ubuntu 16.04 operating system with a processor of Core ™ i5-4210M. The server is connected to a wireless network card model Netgearwg111 v2 RTL8187 through the USB interface. The server creates a WEP encrypted wireless LAN through the wireless network card. The user's WiFi wireless terminal adopts a smart phone. The experiment tests the change of user sign-in delay with the number of users. The user sign-in delay here is the time from when the server receives the first wireless message of the user until the server deciphers the user's number. Figure 2 shows the experimental results. It can be seen that the user check-in delay increases as the number of users increases, but when the number of users is 300, the average check-in delay for a single user is still lower than 1.2 milliseconds.
以上所述仅是本发明的优选实施方式,应当指出:对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above is only the preferred embodiment of the present invention, it should be pointed out that: for those skilled in the art, without departing from the principle of the present invention, several improvements and modifications can also be made, and these improvements and modifications are also It should be regarded as the protection scope of the present invention.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710755143.7A CN107613494B (en) | 2017-08-29 | 2017-08-29 | Large-scale user sign-in method based on wireless equipment handshake protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710755143.7A CN107613494B (en) | 2017-08-29 | 2017-08-29 | Large-scale user sign-in method based on wireless equipment handshake protocol |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107613494A CN107613494A (en) | 2018-01-19 |
CN107613494B true CN107613494B (en) | 2020-06-09 |
Family
ID=61056180
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710755143.7A Active CN107613494B (en) | 2017-08-29 | 2017-08-29 | Large-scale user sign-in method based on wireless equipment handshake protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107613494B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108616878B (en) * | 2018-03-28 | 2021-03-26 | 努比亚技术有限公司 | Encryption and decryption method, equipment and computer storage medium |
CN109413582A (en) * | 2018-11-01 | 2019-03-01 | 苏州道博环保技术服务有限公司 | One kind is registered method |
CN109788478B (en) * | 2019-02-21 | 2022-10-04 | 南京航空航天大学 | Method for collecting data by using authentication process in WPA wireless network |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8006090B2 (en) * | 2004-03-24 | 2011-08-23 | Intel Corporation | System and method for combining user and platform authentication in negotiated channel security protocols |
CN204143504U (en) * | 2014-09-20 | 2015-02-04 | 中国航空工业集团公司洛阳电光设备研究所 | Wireless attendance system |
CN104410947A (en) * | 2014-11-27 | 2015-03-11 | 南京邮电大学 | Wireless intelligent terminal name-calling scheduling method |
CN105184880A (en) * | 2015-08-17 | 2015-12-23 | 武汉理工大学 | Sign-in system and method based on WiFi |
CN105869224A (en) * | 2015-01-19 | 2016-08-17 | 北京艾博纳信息技术有限公司 | Lesson check in method and system based on intelligent terminal WLAN |
-
2017
- 2017-08-29 CN CN201710755143.7A patent/CN107613494B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8006090B2 (en) * | 2004-03-24 | 2011-08-23 | Intel Corporation | System and method for combining user and platform authentication in negotiated channel security protocols |
CN204143504U (en) * | 2014-09-20 | 2015-02-04 | 中国航空工业集团公司洛阳电光设备研究所 | Wireless attendance system |
CN104410947A (en) * | 2014-11-27 | 2015-03-11 | 南京邮电大学 | Wireless intelligent terminal name-calling scheduling method |
CN105869224A (en) * | 2015-01-19 | 2016-08-17 | 北京艾博纳信息技术有限公司 | Lesson check in method and system based on intelligent terminal WLAN |
CN105184880A (en) * | 2015-08-17 | 2015-12-23 | 武汉理工大学 | Sign-in system and method based on WiFi |
Also Published As
Publication number | Publication date |
---|---|
CN107613494A (en) | 2018-01-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3086527B1 (en) | Method and apparatus for managing beacon device | |
RU2683853C1 (en) | Method for improving gprs key, sgsn device, user device, hlr / hss and gprs system | |
CN107529160A (en) | A kind of VoWiFi method for network access and system, terminal and wireless access points equipment | |
JP7535022B2 (en) | Apparatus, method and program for remotely managing devices | |
US10419212B2 (en) | Methods, systems, apparatuses, and devices for securing network communications using multiple security protocols | |
CN107613494B (en) | Large-scale user sign-in method based on wireless equipment handshake protocol | |
US10152587B2 (en) | Device pairing method | |
WO2018205148A1 (en) | Data packet checking method and device | |
CN110535877A (en) | Internet-of-things terminal identity identifying method and Verification System based on double authentication | |
CN106878280A (en) | The method and apparatus of user authentication, the method and apparatus for obtaining user number information | |
WO2017005163A1 (en) | Wireless communication-based security authentication device | |
CN102480473A (en) | Security information interaction system and method based on frequency shift keying (FSK) | |
JP6447949B1 (en) | Authentication system, authentication server, authentication method, and authentication program | |
CN110337103A (en) | A kind of connectionless data hided transmission method based on 802.11 agreements | |
CN104335621B (en) | Association identification communication device and association identification communication method | |
CN106453400B (en) | An authentication method and system | |
US11974128B2 (en) | Communication method, communication system, relay device, and relay program | |
CN115150075A (en) | Method, apparatus, device and medium for data communication based on shared secret key | |
CN107135194A (en) | Safety information interaction method and equipment | |
CN109788478B (en) | Method for collecting data by using authentication process in WPA wireless network | |
CN101383816A (en) | Wireless network authentication system and method thereof | |
CN110248326A (en) | A kind of data processing method and its device | |
CN106912047A (en) | Terminal authentication method, apparatus and system | |
US11622269B2 (en) | Methods and systems of head end based wireless device authentication | |
CN113423068B (en) | Communication method, mobile terminal, publishing terminal and communication system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |