EAP-PSK

What is Expansion of EAP-PSK?

EAP-PSK stands for Extensible Authentication Protocol - Pre-Shared Key.

What is EAP-PSK?

EAP-PSK is an authentication method for EAP that uses a symmetric pre-shared key for mutual authentication between client and server without requiring certificates.

Why is EAP-PSK useful?

  • Simpler to deploy — no need for certificate infrastructure.

  • Provides mutual authentication and session key derivation.

  • Useful in constrained environments (e.g., IoT, embedded systems).

  • Lightweight and secure (when used with strong PSKs).

How it works?

  • Both client and server share a pre-established key.

  • EAP-PSK defines a 4-phase handshake: 1. Identity exchange. 2. Exchange of nonces and mutual authentication using the PSK. 3. Key derivation and confirmation. 4. Success notification.

  • Protects against replay and man-in-the-middle attacks.

Where is EAP-PSK used?

  • IoT devices and constrained networks.

  • Environments where certificate management is not feasible.

  • Secure wireless or VPN authentication where simplicity is key.

Which OSI layer does this protocol belong to?

  • Operates at the Application Layer (Layer 7).

  • Encapsulated within EAP, which is carried over lower layers like EAPOL or RADIUS.

IS EAP-PSK Windows specific?

  • No, it is not Windows-specific.

  • It can be implemented on any OS that supports EAP frameworks.

IS EAP-PSK Linux Specific?

  • No, EAP-PSK is not Linux-specific.

  • It is available across platforms, although not always supported by default in some supplicants.

Which Transport Protocol is used by EAP-PSK?

  • Transported via EAP over LAN (EAPOL), RADIUS, or other EAP-capable transports.

  • Backend communication often uses UDP (RADIUS) or TCP (Diameter).

Which Port is used by EAP-PSK?

  • Uses standard RADIUS ports: * UDP 1812 (Authentication) * UDP 1813 (Accounting)

Is EAP-PSK using Client server model?

  • Yes, it uses a client-server architecture: * Client: Supplicant * Server: RADIUS or EAP-compliant authentication server

Whether EAP-PSK protocol uses certificates?

  • No.

  • It uses symmetric keys (pre-shared) instead of digital certificates.

How many frame exchanges are seen during connection for EAP-PSK protocol?

  • Typically involves 4 main EAP message exchanges.

  • Additional EAPOL or RADIUS messages may be included depending on infrastructure.

Whether EAP-PSK Protocol uses client certificates?

  • No, it does not use client certificates.

  • Authentication relies solely on the pre-shared key.

Whether EAP-PSK Protocol uses Server Certificates?

  • No.

  • No certificates are used on either side.

IS EAP-PSK Protocol depends on TCP?

  • No, EAP-PSK itself does not require TCP.

  • Backend communication (e.g., Diameter) might use TCP, but EAP-PSK is agnostic.

IS EAP-PSK Protocol depends on UDP?

  • Yes, commonly.

  • When transported via RADIUS, EAP-PSK relies on UDP 1812.

What are the roles involved when testing EAP-PSK Protocol?

  • Supplicant (Client device)

  • Authenticator (e.g., access point or switch)

  • Authentication Server (e.g., FreeRADIUS)

Does EAP-PSK Protocol work with FreeRADIUS server on Linux?

  • Yes, FreeRADIUS supports EAP-PSK.

  • Requires proper module configuration and key management.

Does EAP-PSK Protocol work with Internal radius server of hostapd?

  • No, hostapd’s internal server does not support EAP-PSK.

  • You need an external RADIUS server like FreeRADIUS.

What is the RFC version use for EAP-PSK Protocol?

  • EAP-PSK is defined in RFC 4764.

During Connection Procedure which EPoL Packets are encrypted?

  • EAPOL packets themselves are not encrypted.

  • However, key material exchanged via EAP-PSK is protected using cryptographic primitives like AES-128.

Can you Explain different stages of Connection Procedure for EAP-PSK Protocol?

  • Stage 1: EAP-Request/Identity → EAP-Response/Identity

  • Stage 2: Server sends random challenge (RAND_S)

  • Stage 3: Client responds with RAND_P, MAC_P

  • Stage 4: Server verifies MAC_P and sends MAC_S

  • Stage 5: Session key is derived and Success sent

What is the final output of Connection Procedure?

  • A shared Master Session Key (MSK) is generated for securing subsequent communication.

What is the format of the key generate after the connection procedure?

  • The MSK is 64 bytes (512 bits), derived from the pre-shared key and exchanged nonces.

Where the use of PMK generated by the Connection Procedure?

  • PMK is derived from the MSK and used in WPA2/WPA3 enterprise mode.

  • It helps generate encryption keys like PTK for data protection.

  • In this section, you are going to learn

  • Terminology

  • Version Info

  • rfc details

  • Run AP mode operation with hostapd

AP : Download hostapd

Note

  • Make sure internet is available in laptop to download hostapd package

test:~$ wget http://w1.fi/releases/hostapd-2.9.tar.gz

AP: Install required packages

test:~$ sudo apt install libnl-genl-3-dev libnl-3-dev libdbus-glib-1-dev

AP : Extract hostapd

test:~$ tar -xzvf hostapd-2.9.tar.gz

AP : Change directory to hostapd

test:~$ cd hostapd-2.9/hostapd/

AP : Check the current working directory using pwd command

Note

  • Make sure your current working directory is hostapd

test:~$ pwd
/home/test/hostapd-2.9/hostapd

AP : Copy the contents of defconfig file to .config file

Note

  • .config file is required for make to start compilation of hostapd

test:~$ sudo cp defconfig .config

AP : Complile hostapd

Note

  • Compile hostapd by running make command

test:~$ make

AP : Check for the binaries created

Note

  • Make sure hostapd and hostapd_cli are present

test:~$ ls
hostapd
hostapd_cli

AP : Create a hostapd.conf file in /etc/hostapd folder with below content

test:~$ sudo vim /etc/hostapd/hostapd.conf

ctrl_interface=/var/run/hostapd
interface=enp0s8
driver=wired
logger_stdout=1
logger_stdout_level=1
ieee8021x=1
eap_server=1
eap_user_file=/etc/hostapd/hostapd.eap_user
eap_reauth_period=3600
auth_algs=1
macaddr_acl=0

AP : Create a file eap_user in /etc/hostapd/ folder with below content

test:~$ sudo vim /etc/hostapd/hostapd.eap_user

AP : Run hostapd

test:~$ sudo ./hostapd /etc/hostapd/hostapd.conf
enp0s8: interface state UNINITIALIZED->ENABLED
enp0s8: AP-ENABLED

STA : Download wpa_supplicant

Note

  • Make sure internet is available in laptop to download supplicant package

test:~$ wget https://w1.fi/releases/wpa_supplicant-2.9.tar.gz

STA: Install required packages

test:~$ sudo apt install libnl-genl-3-dev libnl-3-dev libdbus-glib-1-dev

STA : Extract wpa_supplicant

test:~$ tar -xvf wpa_supplicant-2.9.tar.gz

STA : Change directory to wpa_supplicant

test:~$ cd wpa_supplicant-2.9/wpa_supplicant/

STA : Check the current working directory using pwd command

Note

  • Make sure your current working directory is wpa_supplicant

test:~$ pwd
/home/test/wpa_supplicant-2.9/wpa_supplicant

STA : Copy the contents of defconfig file to .config file

Note

  • .config file is required for make to start compilation of supplicant

test:~$ cp defconfig .config

STA : Compile wpa_supplicant

Note

  • Compile supplicant by running make command.

test:~$ make

STA: You might get errors while make regarding openssl headers in that case install the openssl headers and then do make clean and then do make again.

test:~$ sudo apt install libssl-dev
test:~$ make clean
test:~$ make

STA : Check for the binaries created

Note

  • Make sure wpa_supplicant and wpa_cli are present

test:~$ ls
wpa_supplicant
wpa_cli

STA: Copy required certificates from hostapd to wpa_supplicant

STA : Create wpa_supplicant.conf

test:~$ sudo vim wpa_supplicant.conf

ctrl_interface=/run/wpa_supplicant
update_config=1
network={
key_mgmt=WPA-EAP
eap=PSK
identity="user3"
password="1234567890123456"
}

STA : Run wpa_supplicant

test:~$ sudo ./wpa_supplicant -D wired -i enp0s8 -c wpa_supplicant.conf
enp0s8: CTRL-EVENT-EAP-SUCCESS EAP authentication completed successfully

STA: Test

test:sudo ./wpa_cli -i enp0s8
> status
  • setup

  • setup

  • packet details

  • usecases

  • features

  • Reference links