## 4 Experimental Results and Analysis
### Tool Formal Security Validation
#### 4.4.1 Formal Key Exchange Algorithm  
Below (see Algorithm 1) is the pseudocode for our ECC-based authentication protocol, for each subspace, according to the definition of the mathematical model, based on the contractions given by the parameters \((\alpha\) and \(\beta)\):  
```
0:\(G_{\alpha}^{\beta}\), \(k_{A}\), \(k_{B}\), \(P_{A}\), \(P_{B}\), \(K_{AB}\), \(\alpha\), \(\beta\), \(p\)
0: Secure shared session key \(K_{AB}\)
1:Step 1: Key Generation\(\triangleright\) Each device generates its private key with contractions
2: Device \(A\) generates private key \(k_{A}\) and computes contracted public key \(P_{A}=((k_{A}\cdot G_{\alpha}^{\beta})\mod p)/\alpha\)
3: Device \(B\) generates private key \(k_{B}\) and computes contracted public key \(P_{B}=((k_{B}\cdot G_{\alpha}^{\beta})\mod p)/\beta\)
4:Step 2: Exchange Public Keys\(\triangleright\) Devices exchange public keys over an open channel
5: Device \(A\) sends \(P_{A}\) to Device \(B\)
6: Device \(B\) sends \(P_{B}\) to Device \(A\)
7:Step 3: Compute Shared Key with Factorization\(\triangleright\) Each device computes the shared secret key
8: Device \(A\) computes \(K_{AB}=((k_{A}\cdot P_{B})\mod p)/(\alpha+\beta)\)
9: Device \(B\) computes \(K_{AB}=((k_{B}\cdot P_{A})\mod p)/(\alpha+\beta)\)
10:Step 4: Secure Communication Established\(\triangleright\) Both devices now share the same symmetric key
11: Return \(K_{AB}\)
```  
**Algorithm 1** ECC-Based Key Exchange with Parameter Contractions  
Explanation of Parameters  
* \(G_{\alpha}^{\beta}\): The generator point on the elliptic curve, based on \((\alpha\) and \(\beta)\) contractions.
* \(k_{A},k_{B}\): The private keys generated by devices \(A\) and \(B\), respectively.
* \(P_{A},P_{B}\): The public keys derived from the private keys and the generator point.
* \(K_{AB}\): The shared session key computed by both devices.  
The implementation took into account a structuring of the subspaces defined by the mathematical model and the creation of cryptographic primitive structures based on the particularities of the devices in which they will be implemented.  
Step 1: Key Generation with Parameter Contraction  
Each device generates its private key and computes the corresponding public key. Unlike traditional ECC implementations, our method incorporates a contraction factor \((\alpha,\beta)\) that optimizes key representation while maintaining security properties:  
\[P_{A}=\frac{(k_{A}\cdot G)\mod p}{\alpha},\quad P_{B}=\frac{(k_{B}\cdot G)\mod p}{\beta} \tag{5}\]  
This approach reduces computational overhead and ensures that key derivations remain secure against side-channel attacks.  
Step 2: Secure Public Key Exchange  
Public keys are exchanged between communicating parties over an open channel. Given the modular reduction applied to key computations, an adversary intercepting these values gains no advantage in reconstructing private keys.  
Step 3: Shared Key Computation with Factorization  
Both devices compute the shared session key using a combination of modular arithmetic and factorization techniques:  
\[K_{AB}=\frac{(k_{A}\cdot P_{B})\mod p}{\alpha+\beta}=\frac{(k_{B}\cdot P_{A}) \mod p}{\alpha+\beta} \tag{6}\]  
This formulation ensures that even if partial information is leaked, it remains computationally infeasible for an attacker to reconstruct the session key due to the non-trivial inversion complexity introduced by the denominator.  
Step 4: Establishment of Secure Communication  
At the conclusion of the key exchange, both devices securely derive the same session key \(K_{AB}\), which is then used for encrypted communication. The incorporation of modular reductions and parameter contractions guarantees that this key remains resistant to cryptanalysis techniques such as lattice-based attacks and man-in-the-middle intrusions.