A Mobile Adhoc NETwork (MANET) operates without dedicated routing hardware, relying instead on dynamic wireless connections among nodes that can join or leave the network at any time. This dynamic nature demands a flexible routing protocol to manage variable number of nodes effectively. However, the absence of centralized infrastructure in MANETs poses security challenges, leaving nodes vulnerable to attacks. While several security solutions have been proposed, many face practical limitations. This paper introduces a novel approach to detect attacks on the Ad Hoc On-Demand Distance Vector (AODV) routing protocol within MANETs, specifically those involving malicious nodes masquerading as best routing paths by manipulating AODV's sequence numbers. An extension to the AODV protocol is introduced to ensure secure communication between different nodes in MANET. The proposed security mechanism includes a signature verification mechanism based on the Edwards digital signature curve (Ed25519), which is demonstrated on the Objective Modular Network Testbed in C++ (OMNet++) simulator. Our solution employs an extension to AODV protocol where asymmetric cryptography is introduced to generate and authenticate digital signatures, ensuring a high level of security. Additionally, a novel detection mechanism is introduced to identify malicious nodes within the network as a supplementary security layer. Simulation results demonstrate a high detection rate, accurately identifying between 83 % and 100 % of malicious nodes based on their presence in the network.