0

Lets's say I have a cipher-module / cryptography-service that signs a hash of some unknown payload.

What are the possible attacks that I would need to guard against in this context (primarily assuming RSA algorithm but it could also be EC-DSA algorithm)?

With regard to the RSA, to guard against chosen cipher-text attacks as noted here have come-up with the following scheme.

  1. Client calculates SHA-256 hash of payload.
  2. Client sends hash to server for timestamping.
  3. Server receives hash, generates a nonce.
  4. Server concatenates nonce (server-generated-random) and the hash (client-input) and calculates hash on the concatenated string.
  5. Server signs the hash that it calculated and returns the signature and the nonce back to client.

What I'd like to know is -

  1. Is the above a standard approach for this type of usecase?
  2. Is there a better scheme than plain concatenation? I
  3. Guess RSA OAEP / PSS schemes are intended to guard against such attacks for RSA but I am more inclined towards the above since its independent of the algorithm (RSA/DSA). Am I correct in this assumption?
Ravindra HV
  • 204
  • 6
  • 14

0 Answers0