Maude-NPA

Repository of protocol specifications in Maude-NPA

Home Choice Protocols Distance-Bounding Protocols Hash Functions Vulnerabilities Contact and links

Hash Functions Vulnerabilities

Hash functions are extensively used as key components in cryptographic protocols. However, most existing symbolic analyses assume the Random Oracle Model (ROM), abstracting hash functions as ideal black boxes. In our work [1], we move beyond this abstraction by analyzing two representative protocols under more realistic models that incorporate algebraic properties of hash functions to represent known vulnerabilities.

The protocols analyzed are:

Hash function vulnerabilities considered:

Given a hash function \( H: \{0,1\}^* \rightarrow \{0,1\}^{\ell(n)} \), we modeled the following vulnerabilities:

These vulnerabilities were modeled using an equational theory with order-sorted restrictions for operators such as \( H \), \( \pi_1 \), \( \pi_2 \), \( cp1 \), and \( cp2 \), while preserving associativity of the concatenation operator \( \parallel \). CPC and ColExt vulnerabilities were also modeled for the SIGMA protocol with the following intruder strand instead of equations, which alligns with the event-based approach propossed in [4]:

:: nil :: [ nil 
  | -(sign(sk(A), H(X1 ; X2 ; X3 ; cp1(X1 ; X2 ; X3, Y1) ; S1 ; S2))), 
    +(sign(sk(A), H(Y1 ; cp2(X1 ; X2 ; X3, Y1) ; S1 ; S2))), 
  nil ]
    

Using this modeling, we were able to automatically discover the known attacks on SIGMA previously found using Tamarin [4], as well as a new attack on the Meadows protocol using the combination of 1stPreImg and 2ndPreImg+InLeak.

A summary of our analysis is shown below, including execution time, number of states, and search depth:

Protocol Hash Vulnerability Approach Algebraic Theory Depth States Time
SIGMA CPC & ColExt Eq. Theory conc (assoc)
exp (assoc, comm)
cp1, cp2
11 6180 16.32 days
Event-Based conc (assoc)
exp (assoc, comm)
13 618 1.14 hours
CPC Eq. Theory conc (assoc)
exp (assoc, comm)
cp1, cp2
11 258 18 min
Meadows 1stPreImg Eq. Theory conc (assoc*)
XOR (assoc*, comm)
pi1
8 313 20.88 min
2ndPreImg & InLeak Eq. Theory conc (assoc*)
XOR (assoc*, comm)
pi2, inLeak
8 698 2.37 hours

* Associativity was not needed to find the attacks considering these vulnerabilities.

To download the complete Maude-NPA specification and outputs, click HERE.


References
  1. Hernández-Sánchez, A., & Escobar, S. (2025). A Symbolic Analysis of Hash Functions Vulnerabilities in Maude-NPA. European Symposium on Research in Computer Security (ESORICS).
  2. Bhargavan, K., & Leurent, G. (2016). Transcript collision attacks: Breaking authentication in TLS, IKE, and SSH. NDSS Symposium.
  3. Meadows, C., et al. (2007). Distance bounding protocols: Authentication logic analysis and collusion attacks. In Secure Localization and Time Synchronization. Springer.
  4. Cheval, V., et al. (2023). Hash Gone Bad: Automated Discovery of Protocol Attacks That Exploit Hash Function Weaknesses. USENIX Security.