Digital Signatures using 4096-bit RSA provide a mechanism for asymmetrically verifying the integrity and authenticity of data. Digital signatures provide a way to ensure that data was created by a known sender and has not been altered in transit.
DOWNLOADS
RSA Digital Signature.exe - Desktop Application
RSA Digital Signature.py - Python Source Code
Password: password
INSTRUCTIONS
Select “Next”
Select “Open” and choose file.
Select “Sign” or “Verify”
* Signature file will save in the same folder as source file. Always select source file when verifying and not the signature file.
Sign:
Select “Save”
Select “Exit”
RSA Digital Signature and Signer’s Public Key
Verify:
or
Select “Exit”
BACKGROUND
Digital Signatures combine a cryptographic hash function with an asymmetric encryption algorithm to create a unique value or “signature”. A digital signature hashes data and encrypts it using a private key. The data and digital signature are sent to the recipient.
The data is hashed using the same hashing algorithm as the sender. The encrypted hash is decrypted using the sender’s public key. The decrypted hash is compared to the generated hash of the data for authenticity and integrity.
The security of digital signatures relies on the strength of the cryptographic algorithms used and the secrecy of the private key. It is computationally infeasible for an attacker to forge a digital signature without knowledge of the private key.
Digital signatures provide non-repudiation, meaning the sender cannot deny sending the message once it has been signed. This is because only the sender possesses the private key needed to create the digital signature.
Digital signatures play a critical role in ensuring the authenticity, integrity, and non-repudiation of digital data and are widely used in various secure communication applications.
HOW IT WORKS
Key Generation:
The sender generates a pair of cryptographic keys: a private key and a public key. The private key is kept secret and known only to the sender, while the public key can be freely distributed.
Choose Two Prime Numbers:
Select two distinct prime numbers, p and q.
Calculate Modulus:
Compute n = p × q. This is the modulus used in both the public and private keys.
Calculate Euler's Totient Function:
Compute ϕ(n) = (p−1) × (q−1).
Choose Private Key Exponent:
Select an integer d such that 1 < d < ϕ(n) and d is coprime with ϕ(n).
Calculate Public Key Exponent:
Compute e, the modular multiplicative inverse of d modulo ϕ(n). This means e × d ≡ 1 (modϕ(n)).
Signature Generation:
To sign a message, the sender first computes a hash (using a cryptographic hash function like SHA-256 or SHA-512) of the data. This hash is a fixed-size representation of the data that uniquely identifies its contents.
The sender then encrypts the hash with their private key using a digital signature algorithm (such as RSA or DSA). This encrypted hash is the digital signature.
Hash the Message:
Hash the message m to produce a fixed-length hash value H(m).
Compute the Signature:
Compute the signature s of the hash value using the private key exponent d and modulus n: s = H(m)^d (mod n)
The sender attaches the digital signature to the data and sends both the data and the signature to the recipient.
Signature Verification:
Upon receiving the data and the signature, the recipient first computes the hash of the received data using the same hash function used by the sender.
The recipient then decrypts the digital signature using the sender's public key to obtain the original hash value.
If the computed hash value matches the decrypted hash value, the digital signature is considered valid, and the data is considered authentic and unaltered. If the hash values do not match, the signature is considered invalid, indicating that the data has been tampered with or is not from the purported sender.
Hash the Message:
Hash the received message m′ to produce H(m′).
Verify the Signature:
Verify the signature s using the public key exponent e and modulus n: H(m′) = s^e (mod n)
Security:
The security of RSA digital signatures is based on the security of the RSA algorithm and the use of cryptographic hash functions to ensure the integrity of the message.