Ensuring information security is indispensable during data communication among a collective of entities. This requirement is exemplified in the context of online voting systems (OVS), which necessitate the conduction of fair and transparent elections. A pivotal aspect of securing the OVS involves authenticating authorized voters prior to vote casting and encrypting the votes before their transfer over a secure channel for tallying. The present study centers on the development of a mathematical model for an authentication scheme that can be implemented in an OVS to facilitate impartial elections. The devised model integrates mathematical and cryptographic principles of Galois fields, group codes, and pseudo-random key stream generators to formulate individual voter passcodes, thereby providing two-factor authentication. The proposed scheme is exemplified through a scenario suitable for orchestrating a medium-scale election involving 65,536 voters via an OVS. Furthermore, with the appropriate selection of inputs, the model exhibits the capacity to support large-scale elections.