If I understand correctly MAC makes sure that the encrypted message isn't altered, so I presume signing the message with for example ed25519 would do the job too. Am I right?

  • $\begingroup$ Can we call this dupe of this What is the advantage of digital signatures over message authentication codes? $\endgroup$
    – kelalaka
    Commented Nov 24, 2020 at 21:03
  • $\begingroup$ If you explain your actual case, you might get a better response, As your key-exchange, your encryption algorithm, and mode of operation. And, may be you need the non-repudiation or not. $\endgroup$
    – kelalaka
    Commented Nov 24, 2020 at 21:10
  • $\begingroup$ I'm making very simple blockchain where transactions would be messages, as addresses I would use ed25519 public keys and i would want to implement encryption to those messages. I'm thinking of making key-exchange with x25519 then use the key for aes256 and I wonder if I need MAC if every message wold be signed by senders private key. I hope I make at least a little sense. $\endgroup$
    – lixkel
    Commented Nov 24, 2020 at 21:36
  • $\begingroup$ The linked question provides the answer to your main question. Signature is fine for you Also, read this Should we sign-then-encrypt, or encrypt-then-sign? $\endgroup$
    – kelalaka
    Commented Nov 24, 2020 at 22:01
  • $\begingroup$ @kelalaka I don't know if those links except the last apply. The question is whether we need to MAC if we are signing the message. The OP should clarify whether they really mean signing the message, as it isn't clear whether they merely wish to use eliptic curves for key exchange based on the last comment. Using it as (an albeit wonderful form of) key exchange to encrypt with AES is neither a signature nor authentication. $\endgroup$
    – Modal Nest
    Commented Nov 24, 2020 at 22:39


Browse other questions tagged or ask your own question.