1

Let's suppose I'm uploading some website to website example.com, and I'm signing every single file with MAC which is shared by users of my website to verify that me (the admin) uploaded that file.

It's clear that if someone isn't a user of the website (ie doesn't know the Message authentication code) can't upload files and convince other user that it's the admin who uploaded them.

But what if the someone is a user? How can I let users only use the Message authentication code for checking and not be able to access or see its value (thus they won't be able to sign new uploads as my uploads)?

1 Answer 1

2

Typically, a Message Authentication Code (MAC) is a symmetric algorithm. That is! The same key is used for generation and for verification (i.e. we have a mutual authentication). In that case, there is no way to verify a MAC without also being able to create MACs for other messages.

However, you can use a digital signature to sign messages such that anyone with the public key can verify them, but others cannot sign messages that validate with that public key. In this way, you can get the non-repudiation that no symmetric authentication can provide. EdDSA (usually in the form of Ed25519) is the preferred signature algorithm these days. EdDSA is safe against nonce bias by design as opposed to DSA and ECDSA ( though there is a deterministic DSA (ECDSA) by Thomas Pornin)

0

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.