## 3 Proposed Method and Mathematical Analysis
### ElGamal Digital Signature  
Digital signature systems based on the discrete logarithm problem are the most common type of digital signature system. The ElGamal Encryption Algorithm can be used to create digital signatures, which provide authentication and non-repudiation of the data. This is achieved by using the private key to sign the data, and the public key to verify the signature. Therefore, the proposed model employs the ElGamal Digital Signature for digital signatures. Following Figure 1, Sender A sends the original message M, first using a digital signature to sign it.  
The specific steps for signing are as follows (refer to Figure 2): M is plaintext, E is the encrypted message (as the signed file), D is the decrypted message, SK\({}_{A}\) is the private key of Sender A, and PK\({}_{A}\) is the public key of Sender A.  
Here, we set a large prime number p, \(Z_{p}^{*,s}\)s generating element g, Sender A's private key \(x\leftarrow_{R}Z_{p}^{*}\), and Sender A's public key \(y\equiv g^{x}\ (mod\ p)\).  
For the message M to be signed, Sender A performs the following steps:  
Calculate the hash value H(M) of M;  
Select random number k: \(k\gets RZ_{p-1}^{*}\), then calculate \(r\equiv g^{k}\ (mod\ p)\);  
Calculate \(s\equiv(H(M)-xr)k^{-1}(mod\ p-1)\);  
Use (r, s) as the resulting digital signature.  
Finally, the signature verification process is carried out, where the receiver, upon receiving the message M and the digital signature (r, s), calculates H(M) and verifies it according to Equation (1):  
\[Ver(y,(r,s),H(M))=True\leftrightarrow y^{r}s\equiv g^{H(M)}(mod\ p) \tag{1}\]  
Correctness can be proved according to Equation (2):  
\[y^{r}r^{s}\equiv\ g^{rx}g^{ks}\equiv\ g^{rx+H(M)-rx}\equiv\ g^{H(M)}(mod\ p) \tag{2}\]  
Compared to other digital signature algorithms, ElGamal Digital Signature offers a high level of security because it uses asymmetric key cryptography. The private key used for signing is kept secret, while the public key used for verification is available to everyone. ElGamal Digital Signature ensures non-repudiation, which means that the signatory cannot deny having signed the document or message. This feature is crucial in legal and commercial transactions where a signature is required to prove authenticity and intent. In practice, ElGamal Digital Signature can be used to sign any type of document, information, or data. It is not limited to a specific file format or application. Moreover, ElGamal Digital Signature is computationally efficient, can be implemented on a variety of platforms, including mobile and IoT devices, and can be used to sign multiple documents simultaneously. It is also suitable for large-scale applications that require frequent signing and verification. Furthermore, ElGamal Digital Signature is based on a standard encryption algorithm, making it easy to integrate with other systems and applications. It ensures compatibility and interoperability with other digital signature solutions. As a result, ElGamal  
Figure 2: The process of digital signature.  
Digital Signature makes it easier to authenticate signatures where multiple documents and data are required for privacy-preserving biometric data.