Introduction to Digital Signatures

Purpose and Analogy

  • Concept: Similar to how a person physically signs a document to confirm its origin or approval, a digital signature is used cryptographically.
  • Authentication Problem: How can a recipient (Bob) ensure a message truly comes from the claimed sender (Alice) and not an imposter (Eve)?
  • Solution: Bob can ask Alice to cryptographically sign the message.
  • Function: A digital signature authenticates Alice as the valid sender of the message.

Limitations of Simple Digitized Signatures

  • Question: Why not just scan a physical signature and append it to a digital document?
  • Vulnerability: Anyone with access can easily copy this digitized signature image and paste it onto a different document (e.g., a fraudulent check).
  • Forgery: While modifying a physical signature requires cutting/pasting or photocopying (often detectable), digital copying and pasting is seamless and indistinguishable from the original use.
  • Requirement: We need digital signatures that are intrinsically linked to the specific message being signed and cannot be separated and reattached to another message.

Core Principles

  • Binding: A digital signature must be tied not only to the signer but also to the message content.
  • Verifiability: The signature must be easily verifiable by any third party.
  • Two Processes: Digital signature schemes involve two distinct steps:
    1. Signing Process: Performed by the sender using private information.
    2. Verification Process: Performed by the receiver (or anyone) using public information.

Basic Requirements

  • Easy to Sign: The signing process should be computationally easy for the legitimate signer.
  • Easy to Verify: The verification process should be computationally easy for anyone.
  • Hard to Forge: It must be computationally infeasible for anyone (including the receiver) to forge a valid signature for a message they haven’t seen signed, or to create a new message with a valid signature based on existing signed messages.

Working Procedure (General)

This describes the common approach using hash functions.

  1. Hashing (Signing End):
    • Alice takes her electronic file (message ).
    • She applies a cryptographic hash algorithm (e.g., SHA-1, SHA-256) to the message .
    • This produces a fixed-size hash value (or message digest) .
  2. Signing (Signing End):
    • Alice uses her private key () and a signing algorithm to encrypt the hash value .
    • This produces the digital signature .
    • Alice sends the original message and the signature together to Bob.
  3. Hashing (Verification End):
    • Bob receives the message and the signature . (Using primes ’ to denote received versions).
    • Bob applies the same hash algorithm used by Alice to the received message .
    • This produces a hash value .
  4. Verification (Verification End):
    • Bob obtains Alice’s public key ().
    • Bob uses the public key and a verification algorithm (the inverse of the signing algorithm) to decrypt the received signature .
    • This produces a hash value .
  5. Comparison:
    • Bob compares the hash he computed from the message () with the hash recovered from the signature ().
    • If , the signature is valid. This means the message hasn’t been altered (Integrity) and it was signed by the holder of the private key corresponding to the public key used (Authentication).
    • If , the signature is invalid.

Comparison: Digital Signature vs. Public Key Encryption

FeatureDigital SignaturePublic Key Encryption
ActionSigning DataEncrypting Data
Key Used (Doer)Private Key (Only holder can sign)Public Key (Anyone can encrypt)
ActionVerifying SignatureDecrypting Data
Key Used (Doer)Public Key (Anyone can verify)Private Key (Only holder can decrypt)

Security Services Provided

Digital signatures offer the following security services:

  1. Integrity: Ensures that the message content has not been modified after being signed. Verification fails if the message is altered because the hash will change.
  2. Message Authentication: Verifies that the message originated from the owner of the private key used for signing. Only the owner of the private key could have generated the valid signature verifiable by the corresponding public key.
  3. Nonrepudiation: Prevents the sender from falsely denying that they sent and signed the message. Since only the sender possesses the private key, a valid signature serves as strong evidence that they created it.

RSA Digital Signature Scheme

Concept

  • Uses the RSA algorithm’s public/private key pair properties.
  • Signing is essentially “decrypting” the message/hash with the private key.
  • Verification is essentially “encrypting” the signature with the public key.

Scheme Description

  • Alice:
    • Has an RSA key pair: Private key , Public key .
    • Wants to sign a message (or typically, the hash of the message ).
  • Signing Process (Alice):
    • Computes the signature using her private key : (If signing a digest , then )
    • Sends the message and the signature to Bob.
  • Verification Process (Bob):
    • Receives message and signature . Obtains Alice’s public key .
    • Computes a value using the public key :
    • Compares the computed with the received message :
      • If , the signature is valid.
      • If , the signature is invalid. (If signing a digest, Bob computes and . Compares and .)

RSA Signature on Message Digest (Standard Practice)

  • Why sign the digest?
    • RSA operations are computationally expensive, especially on large messages.
    • Hashing is much faster.
    • Public key block sizes might be smaller than the message; hashing creates a fixed-size input suitable for RSA.
  • Process:
    1. Alice (Signer):
      • Message .
      • Compute digest .
      • Sign the digest using private key : .
      • Send .
    2. Bob (Verifier):
      • Receive . Obtain Alice’s public key .
      • Compute digest of received message: .
      • Verify signature using public key : .
      • Compare: If , accept; otherwise, reject.

Attacks on RSA Signed Digests

Attacks often target the hash function or the way RSA interacts with it.

  1. Key-Only Attack (Eve only knows Alice’s public key)

    • Case a (Second Preimage Attack): Eve intercepts a valid pair . She tries to find a different message such that . If successful, would be a valid forgery.
      • Difficulty: Depends on the second preimage resistance of the hash function. Hard for good hash functions.
    • Case b (Collision Attack): Eve finds two messages, and , such that . She tricks Alice into signing (producing signature ). Eve now has a valid pair for a message Alice never intended to sign.
      • Difficulty: Depends on the collision resistance of the hash function. Hard for good hash functions.
    • Case c (Preimage Attack): Eve generates a random signature and computes . She then tries to find any message such that . If successful, is a valid pair.
      • Difficulty: Depends on the preimage resistance (or one-way property) of the hash function. Hard for good hash functions.
  2. Known-Message Attack (Eve has some valid message-signature pairs signed with the same key)

    • Multiplicative Property Attack: If the hash function had a multiplicative property (e.g., ), Eve could compute . This would be a valid signature for .
      • Mitigation: Cryptographic hash functions (SHA-1, SHA-256, etc.) do not have such simple algebraic properties. Finding an such that (given ) is generally as hard as finding a preimage if the hash function is preimage resistant.
  3. Chosen-Message Attack (Eve can get Alice to sign messages of Eve’s choosing)

    • Similar multiplicative attack potential as Known-Message if the hash function were weak. Eve asks Alice to sign and , gets and . If Eve could find such that , she could forge where .
      • Difficulty: Relies on finding given the target hash value, which should be hard due to preimage resistance.

ElGamal Digital Signature Scheme

Concept

  • Based on the difficulty of the discrete logarithm problem.
  • Involves a random element in the signing process, making the signature non-deterministic (different signatures for the same message each time).

Standard ElGamal Signature Scheme (Page 14)

  • Setup:
    • Choose a large prime .
    • Choose a generator of the multiplicative group (or a suitable subgroup).
    • Alice chooses a private key , where .
    • Alice computes her public key .
    • Public parameters: . Private key: .
  • Signing Process (Alice signing message ):
    1. Select a secret random integer such that and . This must be unique for each signature.
    2. Compute .
    3. Compute . (Requires computing the modular inverse of modulo ).
    4. The signature is the pair . Alice sends .
  • Verification Process (Bob verifying ):
    1. Obtain Alice’s public key . Verify that .
    2. Compute .
    3. Compute .
    4. The signature is valid if and only if .
  • Proof of Correctness:
    • From the signing equation, .
    • Multiplying by , we get .
    • Rearranging, .
    • Now consider . Using the congruence in the exponent:
    • Since and , substitute these:
    • This is exactly . Thus, if the signature is valid.

ElGamal Variant (Pages 15, 16)

  • Setup:
    • Choose prime .
    • Choose generator (equivalent to ).
    • Alice chooses private key (equivalent to ).
    • Alice computes public key (equivalent to ).
    • Public parameters: . Private key: .
  • Signing Process (Alice signing message ):
    1. Choose a secret random integer (equivalent to ) such that .
    2. Compute .
    3. Compute . (Note the structure difference from standard ).
    4. Signature is . Alice sends .
  • Verification Process (Bob verifying ):
    1. Obtain public key .
    2. Compute .
    3. Compute .
    4. Signature is valid if .
  • Proof of Correctness (Variant):
    • From signing : .
    • Rearranging: .
    • Consider . Substitute the exponent:
    • Since and :
    • This is exactly . Thus, .

ElGamal Example (Variant from Page 16)

  • Parameters: , , (private).
  • Public key: .
  • Message: .
  • Random secret chosen by Alice: . (Note ).
  • Signing:
    1. .
    2. Need , i.e., . Using Extended Euclidean Algorithm, .
    3. .
  • Signature is . Alice sends .
  • Verification (Bob):
    1. .
    2. . Calculating these large powers requires modular exponentiation. (Calculation needed) (Calculation needed) Re-check calculation from slide… (Slide confirms result)
  • Result: Since and , . The signature is valid.

Digital Signature Algorithm (DSA)

  • Mentioned as “One Standard” in the outline (Page 1).
  • No details provided in the subsequent slides.
  • DSA is another signature scheme based on the discrete logarithm problem, similar in principle to ElGamal but with some differences in structure and calculation. It was specified as a U.S. Federal Information Processing Standard (FIPS).

Secure Electronic Transaction (SET)

Introduction

  • Problem: How to securely communicate credit card and purchasing data over the internet to gain consumer trust?
  • Needs:
    • Authentication of both buyer (cardholder) and merchant.
    • Confidentiality of transmitted data (like credit card numbers).
  • Systems Vary By:
    • Type of public-key encryption used.
    • Type of symmetric encryption used.
    • Message digest algorithm used.
    • Number of parties having private keys.
    • Number of parties having digital certificates.
  • SSL/TLS: Secure Sockets Layer / Transport Layer Security (Provides secure channel, used widely, can involve 1 or 2 private keys/certificates).
  • i KP (IBM).
  • SEPP (Secure Encryption Payment Protocol): MasterCard, IBM, Netscape.
  • STT (Secure Transaction Technology): VISA, Microsoft.
  • SET (Secure Electronic Transactions): Developed primarily by Visa and MasterCard.

SET Overview

  • Goal: Protect credit card transactions online.
  • Features:
    • Confidentiality: All sensitive messages are encrypted.
    • Trust: Relies heavily on digital certificates. All parties must have certificates issued by a trusted hierarchy.
    • Privacy: Information is made available only on a “need-to-know” basis (e.g., merchant doesn’t see credit card number, bank doesn’t see order details). This is achieved using Dual Signatures.

Participants in the SET System

  • Cardholder: Buyer using a credit card.
  • Merchant: Seller accepting credit card payments.
  • Issuer: Financial institution that issued the card to the cardholder (Cardholder’s bank).
  • Acquirer: Financial institution that establishes an account with the merchant and processes payments (Merchant’s bank).
  • Payment Gateway: Interface between SET (internet) and existing financial payment networks for authorization and clearing. Often operated by the acquirer or a designated third party.
  • Certificate Authority (CA): Trusted entity that issues and manages digital certificates for all participants.

SET Business Requirements

  • Provide confidentiality of payment and ordering information.
  • Ensure the integrity of all transmitted data.
  • Authenticate the cardholder as a legitimate user of the credit card account.
  • Authenticate the merchant’s ability to accept credit card transactions via its relationship with a financial institution.
  • Use best security practices and system design.
  • Be independent of transport security mechanisms (like TLS/SSL) but not prevent their use.
  • Facilitate interoperability between software and network providers.

SET Transaction Flow (Simplified)

  1. Customer browses and decides to purchase.
  2. Customer software (e.g., e-wallet) sends order information (OI) and encrypted payment information (PI) to the merchant, using SET protocols (including Dual Signature).
  3. Merchant forwards PI (still encrypted) and related information to the Payment Gateway.
  4. Payment Gateway decrypts PI, reformats if necessary, and requests payment authorization from the Issuer via the Acquirer and payment network.
  5. Issuer authorizes (or denies) payment. Authorization flows back to the Gateway.
  6. Gateway sends authorization status back to the Merchant.
  7. Merchant confirms the order with the customer and fulfills it (e.g., ships goods).
  8. Merchant later sends a “capture” request (to actually get the funds) to the Gateway.
  9. Funds are transferred through the payment network; Issuer bills the cardholder.

Key Technologies in SET

  • Confidentiality: DES (Data Encryption Standard) for symmetric encryption of bulk information (like PI). Keys are exchanged using public-key encryption (digital envelopes).
  • Integrity & Authentication: RSA digital signatures combined with SHA-1 hash codes.
  • Cardholder Authentication: X.509v3 digital certificates containing the cardholder’s public key, signed by an Issuer-trusted CA, used with RSA signatures.
  • Merchant Authentication: X.509v3 digital certificates containing the merchant’s public key(s), signed by an Acquirer-trusted CA, used with RSA signatures. (Merchants typically had two certificates: one for signing, one for key exchange).
  • Privacy (Dual Signatures): A core SET innovation to separate order information (OI) from payment information (PI).

Dual Signatures

  • Concept: Links two separate pieces of information (intended for different recipients) together cryptographically, while keeping the content of each piece private from the recipient of the other.
  • SET Context:
    • Message 1: Order Information (OI) - Sent by Customer, intended for Merchant.
    • Message 2: Payment Information (PI) - Sent by Customer, intended for Bank (via Payment Gateway).
  • Goal:
    • Limit Information: Merchant sees OI but not the credit card number in PI. Bank sees PI but not the specific items ordered in OI.
    • Linkage: Prove that the payment (PI) is specifically intended for this order (OI) and not some other order the merchant might try to substitute.
  • Why Needed? If the customer simply sent a signed OI to the merchant and a signed PI to the bank (via the merchant), a malicious merchant could potentially capture the signed PI and pair it with a different (perhaps fraudulent) signed OI from the same customer, claiming the payment was for the fraudulent order. Dual signature prevents this.

Dual Signature Operation

  1. Hashing: The customer’s software computes the hash (using SHA-1 in SET) of the Payment Information () and the Order Information ():
    • (Payment Information Message Digest)
    • (Order Information Message Digest)
  2. Concatenation: The two digests are concatenated: .
  3. Hashing Again: The concatenated digest is hashed:
    • (Payment Order Message Digest)
  4. Signing: The customer encrypts (signs) this final digest () using their private signature key ():
    • is the Dual Signature.

Information Sent

  • To Merchant: Customer sends OI (plaintext), DS, OIMD. (Also, PI encrypted for the bank, and the digital envelope for PI’s symmetric key).
  • To Bank (via Merchant & Gateway): Merchant forwards PI (encrypted), DS, PIMD, and the digital envelope.

Dual Signature Verification by Merchant

  • Goal: Verify that the OI received is linked to the payment being processed (even though the merchant can’t see the PI).
  • Inputs: Merchant has OI, DS, OIMD, and the customer’s public signature key () from the customer’s certificate. Crucially, the merchant also needs PIMD. SET protocols ensure the merchant receives PIMD along with the other components.
  • Steps:
    1. Merchant computes the hash of the received Order Information: . Verify this matches the received .
    2. Merchant computes the combined hash using the received and the received : .
    3. Merchant decrypts (verifies) the Dual Signature using the customer’s public key: .
    4. Compare: If , the signature is valid, proving the OI is linked to the PI whose hash is PIMD.

Dual Signature Verification by Bank/Gateway

  • Goal: Verify that the PI received is linked to the order being processed (even though the bank can’t see the OI).
  • Inputs: Bank/Gateway has PI (after decryption), DS, PIMD, OIMD, and the customer’s public signature key ().
  • Steps:
    1. Gateway decrypts the PI using the symmetric key from the digital envelope.
    2. Gateway computes the hash of the decrypted Payment Information: . Verify this matches the received .
    3. Gateway computes the combined hash using the computed (which is ) and the received : .
    4. Gateway decrypts (verifies) the Dual Signature using the customer’s public key: .
    5. Compare: If , the signature is valid, proving the PI is linked to the OI whose hash is OIMD.

Accomplishments of Dual Signature

  • Merchant receives OI and verifies it’s linked to a valid payment intent.
  • Bank receives PI and verifies it’s linked to a specific order intent.
  • Customer has successfully linked OI and PI while maintaining privacy, and can prove this linkage if necessary (since they created the DS linking the specific and ).

SET Purchase Transaction Messages (Simplified)

The purchase involves several message exchanges.

  1. Initiate Request (Customer to Merchant):
    • Customer needs Merchant’s and Payment Gateway’s certificates.
    • Sends request indicating brand of card, a unique transaction ID, and a nonce (random number).
  2. Initiate Response (Merchant to Customer):
    • Merchant responds, signing the response.
    • Includes customer’s nonce, a merchant nonce, the transaction ID.
    • Also includes Merchant’s Signature Certificate and Payment Gateway’s Key Exchange Certificate.
  3. Purchase Request (Customer to Merchant):
    • Cardholder verifies the certificates received.
    • Creates OI and PI.
    • Generates a one-time symmetric key () for encrypting PI.
    • Encrypts using the Payment Gateway’s public key exchange key () - this is the digital envelope.
    • Encrypts PI using : .
    • Calculates and .
    • Calculates the Dual Signature .
    • Message Contains: OI (clear), , Digital Envelope (), DS, OIMD, Cardholder Certificate. (The diagram suggests PIMD is also passed, likely needed by Merchant for verification step).
  4. Purchase Response (Merchant to Customer):
    • Merchant verifies certificates and the Dual Signature (as described above).
    • Processes the order information.
    • Forwards payment components (Encrypted PI, Digital Envelope, DS, PIMD, OIMD, Certs) to Payment Gateway for authorization.
    • Sends an acknowledgment message to the customer, signed by the merchant, referencing the transaction ID. Includes Merchant’s signature certificate.
    • Customer verifies the merchant’s signature on the response.

SET Payment Process

  • Broken into two main phases after the purchase request:
    1. Payment Authorization: Merchant requests authorization before shipping goods/providing service.
    2. Payment Capture: Merchant requests the actual transfer of funds after fulfillment.

Payment Authorization

  • Merchant Request to Gateway: Sends an authorization request containing:
    • Purchase-related info: Encrypted PI, Dual Signature (DS), OIMD, PIMD, Digital Envelope (for ).
    • Authorization-related info: Transaction ID, amount, etc., possibly in a block signed by the merchant’s private key and including an encrypted session key for the gateway response.
    • Certificates: Cardholder’s signature cert, Merchant’s signature cert, Merchant’s key exchange cert.
  • Payment Gateway Actions:
    1. Verify all certificates.
    2. Decrypt authorization block envelope (if used), verify merchant signature on auth block.
    3. Decrypt payment block digital envelope () to get .
    4. Decrypt to get PI.
    5. Verify the Dual Signature using PI, OIMD, and customer’s public key.
    6. Verify transaction ID consistency.
    7. Format and send an authorization request to the Issuer via the payment network.
    8. Receive authorization response from Issuer.
  • Authorization Response (Gateway to Merchant):
    • Sends a response message back to the merchant.
    • Includes authorization status (approved/denied), authorization code.
    • May include a “Capture Token” required for the later payment capture phase.
    • Message is typically signed/authenticated by the gateway. Includes Gateway’s certificate.

SET Overhead

  • SET involves significant cryptographic operations for a single transaction:
    • Multiple messages (4 between customer/merchant, 2 between merchant/gateway for auth).
    • Multiple digital signatures (e.g., ~6).
    • Multiple RSA encryptions/decryptions (e.g., ~9 cycles, including key exchange, signing/verifying).
    • Multiple DES encryptions/decryptions (e.g., ~4 cycles, for PI and session keys).
    • Multiple certificate verifications (e.g., ~4).
  • Scaling: Requires managing a large infrastructure of Certificate Authorities and distributing/validating certificates for potentially millions of users and merchants. Multiple servers often need access to certificate copies or validation services.