Security protocols for Wi-Fi networks

After WPA and WPA2, the Wi-Fi Alliance presented WPA3, the new security standard for wireless networks.

Among the various ways to secure the Wi-Fi connection , the choice of a suitable cryptographic algorithm is certainly the preferred option for Internet users. At the base there are two reasons one of a technical nature and one of an organizational nature. On the one hand, most routers - both those purchased in specialized centers and those received on loan for use by telephone providers - are already configured with a key that represents the security protocol of the Wi-Fi modem; on the other hand, the cryptographic algorithm is the simplest and most immediate tool to defend your Internet connection - as well as your privacy - when you are surfing wirelessly.

We will analyze below the most used security protocols in this field, highlighting their strengths and weaknesses, without neglecting the examination of the algorithms used for password encryption .

What is and how WEP works

The Wired Equivalent Privacy (equivalent privacy to the wired network) was the first encryption protocol for wireless networks introduced with the standard IEEE 802.11 . Launched in 1999, the WEP is based on the RC4 cipher algorithm , with a secret key of 40 or 104 bits. To this is connected an initialization vector IV ( Initialisation Vector ) of 24 bits that serves to encrypt the plaintext M and the related checksum ICV ( Integrity Check Value, the check value to verify the integrity of the message) calculated with the CRC-32 algorithm.

The security protocol produces its encrypted message C with the following relation:

C = [M || ICV (M)] + [RC4 (K || IV)]

where || is a concatenation operator and + is an XOR operator .

Back in 2001, however, this protocol began to show the first cracks. In an article which has become famous ( Weakness in the Key Scheduling Algorithm of RC4 , Selected Areas in Cryptography, 2001, pp 1-24) Scott Fluhrer, Itsik Mantin, and Adi Shamir pointed out all the flaws and all RC4 algorithm security vulnerabilities caused by these deficiencies.

The three authors showed materially that, by exploiting these vulnerabilities and analyzing a sufficient amount of data traffic, it would be possible to reconstruct the encryption key piece by piece and, therefore, have free access to the Wi-Fi network.

Similar problems have also been found regarding the algorithm used for control values ​​- the CRC-32 - as noted in the article Intercepting mobile communications: the insecurity of 802.11 (MOBICOM 2001: pp.180-189) signed by Nikita Borisov, Ian Goldberg and David Wagner.

In 2004 the final blow came to the shreds of credibility that the WEP protocol preserved - for some it was still usable for domestic and non-crucial applications. In the first few months of the year, however, some cracking programs were released - Aircrack by Christophe Devine and WepLab by José Ignacio Sànchez - which made it possible to pierce a Wi-Fi network protected by this security protocol within 10 minutes.

IEEE 802.11i

Starting in 2001, the Wi-Fi Alliance (the consortium that manages the development and release of protocols related to wireless Internet connectivity) began working on new security protocols that could replace the run-down WEP. The work went on for 3 years and in 2004 the security protocols collected under the IEEE 802.11i standard were ratified. Called Wi-Fi Protected Access in the jargon , it has been implemented in commercial systems in two successive phases, so that today it is possible to use both the WPA protocol and the WPA2 protocol.. The first is a temporary standard, introduced only to buffer the emergency-security caused by the flaws of the WEP, while the second is the final version of the IEEE 802.11i standard.

What is and how WPA works

The encryption of the passwords in this new protocol always takes place through the RC4 algorithm but to 128 bits, to which a 48 bit initialization vector must be added. This coupled - substantially the same at the base of the WEP - is however further joined by the TKIP protocol ( Temporary Key Integrity Protocol ), which allows to dynamically change the cryptographic keys adopted in the transmission of data. Thanks also to an initialization vector which is twice the length of WEP, this solution eliminates the most worrying security flaws of the old protocol.

In summary, WPA uses a dynamic security key creation system, increases the size of the key and uses a more secure message integrity verification system, thus increasing the security of the WLAN in this way. .

Back in 2008, however, experts in computer security had generated methods to "pierce" a WPA network in less than 60 seconds.

What is and how WPA2 works

The official ratification of the IEEE 802.11i standard took place in June 2004 and also brought with it the new security protocol for Wi-Fi networks.

The WPA2 finally manages to solve all the security flaws of the WEP, without adding new as happened with the WPA. With this standard, key innovations were introduced, such as the separation of user authentication from the secrecy and integrity of the message, ensuring a robust, secure and scalable network architecture (suitable, therefore, for both home and industrial networks of big dimensions).

This architecture consists of three elements:

  • User authentication, assigned to the IEEE 802.1x standard ;
  • The RSN ( Robust Security Network ) protocol that keeps track of the associations between devices connected to the network;
  • The CCMP ( Counter-Mode / Cipher Block Chaining Message Authentication Code Protocol ) ensures the confidentiality and integrity of data and the certainty of the sender.

Communication between devices takes place only through a process called four way handshake (translatable as a four-way handshake ). The process is articulated - in fact - in four phases:

  1. Security Policy Agreement;
  2. 802.1x authentication;
  3. Key derivation and distribution;
  4. Privacy and data integrity.

In the first phase, the parties involved in the communication establish the security parameters to be respected. The two nodes of the network find a sort of "agreement" on the allowed authentication methods, security protocols for unicast traffic , protocols for multicast traffic and support for pre-authentication.

The second phase is that of authentic authentication, which takes place using the 802.1x standard. This phase starts when the access point requests the identification data from the client and this responds with the chosen authentication method. The exchange of messages between the two nodes of the network continues until a common master key (MK) is created.

Once the second phase is completed with client authentication, the phase of the exchange of cryptographic keys between the two nodes begins. To raise the security level, the keys are changed frequently until the connection between the two nodes is closed. The keys are created and distributed between the two points following a precise hierarchical order established during the previous phases.

The fourth and last phase of the process allows to control the secrecy and integrity of the data exchanged by the two nodes thanks to control values ​​generated by protocols such as TKIP ( Temporal Key Integrity Protocol ), WRAP ( Wireless Robust Authenticated Protocol ) and CCMP.

What is and how WPA3 works

During the CES 2018, the Wi-Fi Alliance presented the new cryptographic security standard for wireless networks. Called WPA3, it will be available in routers and Wi-Fi access points from the second half of 2018. Compared to its predecessor, "caught in the hole" with the KRACK attack , the WPA3 ensures higher levels of security both in the case of private and password-protected Wi-Fi networks, both for free public Wi-Fi networks.

The new wireless security standard adopts a new handshake strategy , which will protect Wi-Fi from "brute force in a dictionary" hacker attacks .

 When we talk about handshake (ie "handshake") we refer to the preliminary steps that allow two network devices to contact and start exchanging data with each other. In particular, during the Wi-Fi handshake , the devices send signals useful to identify each other, so as to be sure that neither is impersonating another "entity", and establish which are the basic parameters to be used during the course of the connection.4-way as part of the system that ensures that all devices connected to the wireless network share the same password (which makes them susceptible to hacker attacks able to steal this information), in the new WPA3 the initial handshake will not be vulnerable to attacks on the dictionary as it is able to encrypt the traffic with different passwords for each connected device, thus ensuring a higher level of security for domestic and non-domestic connections. 

Not only that: if a device attempts to connect to a network over and over again by entering an incorrect password, the WPA3 will "banner" it, excluding it a priori from the possibility of access, thus preventing it from connecting (even in the future) putting at risk all other users on the network.

Moreover, those who connect to public Wi-Fi networks can count on "individualized" cryptography, which will protect the communications of every single device connected to the network by encrypting them "at the root". Finally, a security suite with 192-bit encryption aligned to the standards of the Commercial National Security Algorithm (CNSA) will offer greater security to government and public bodies of all kinds. 

The bit, in this case, is related to the concept of information entropy and indicates the complexity of the encryption key and therefore how simple it is to guess it: the higher its value, the more complex it will be for the hacker to be able to "eliminate the noise "cryptographic and thus discover the message behind it.