This paper presents a security-enhanced dynamic routing algorithm utilizing quasigroup cryptography to improve data transmission security in both wired and wireless networks. The proposed algorithm aims to randomize delivery paths while being compatible with existing routing protocols, such as RIP and DSDV, to minimize path similarity and reduce the chances of eavesdropping. It incorporates a cryptography-based system and employs a distance-vector approach for efficient implementation without the need for excessive control messages.