2
$\begingroup$

I want to authenticate server messages to clients. The communication between clients and server is unicast. As I know I can use either used MAC or DSA.

  1. by using MAC, I required a shared key between client and server which can be conducted by distributing public key to the client, and the client can generate share key, encrypts it by using public key and send to the server. So I require encryption and MAC algorithms.
  2. by using a Digital signature, I required only distributed public key to clients.

So which one is better using DSA, or MAC and encryption?

$\endgroup$
5
$\begingroup$

Which is better depends on context.

Reasons to choose 1 (MAC with a key that was generated by client and sent encrypted under public key of server)

  • Shorter messages from server to client (a MAC is at least 4 times shorter than a DSA signature).
  • Much faster verification of messages by client (DSA signature verification is slow; that can be improved with ECDSA, and much improved with RSA signature instead of DSA; MAC is the speed king).
  • Much faster preparation of messages on server, after the initial key establishment (DSA signature generation is slow compared to a MAC; that can be improved with ECDSA, RSA tends to make that worse; again, MAC is the speed king).

Reasons to choose 2 (DSA signed messages)

  • No need for any communication from clients to server.
  • Conceptual simplicity.
  • No need for a CSPRNG on clients (these are hard to get secure).
  • No secret whatsoever in the clients (keeping a secret secret and unaltered is harder than keeping a public information unaltered).
  • No need for encryption at all (which is harder to get secure than signature verification).
  • Less secrets on server (option 1 requires the server to keep the client-unique MAC key secret).
  • The same signed message can be sent to all clients (most useful for multicast, but not much of an argument for unicast).
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.