Score:1

Is there a multi-key HMAC scheme?

je flag

I wonder if there is any scheme or algorithm to generate HMACs that verify with multiple keys.

Suppose I have the secret keys K1, K2 and K3 and I have a message M1. Is the following possible?

  • Generate an HMAC1 with M1 that can be verified with K1 and K2 but not with K3

  • Generate a HMAC2 with M1 that can be verified with K2 and K3 but no longer with K1

  • Generate an HMAC3 with M1 that that can be verified with only K1 but not with K2 and K3

That is, to be able to authenticate a message to an arbitrary set of N keys. Maybe not with HMAC but with some other type of MAC algorithm.

I am analyzing if it is possible to issue OTPs (a truncated HMAC) against a series of devices (each one knows its key but not the key of the other devices) that authenticates a user only in an arbitrary subset of these devices.

Thanks.

poncho avatar
my flag
"Generate an HMAC1 with M1 that can be verified with K1 and K2 but not with K3" - is there a reason that the obvious approach of 'HMAC(K1, M1) || HMAC(K2, M1)' is not acceptable?
Maarten Bodewes avatar
in flag
Would be tricky to compress it further I guess. A hash over the authentication tags won't work if you can only calculate one of the tags.
Different-March-5530 avatar
je flag
Hi @poncho, thanks for answering. How would you compress the HMAC(K1, M1) || HMAC(K2, M1) structure into a 6 to 8 digit OTP? Assuming you are a device that only knows K1, how would you validate that OTP?
Different-March-5530 avatar
je flag
@MaartenBodewes Yes, the idea is to issue OTPs to authenticate users in an arbirtary set of devices. The devices should be able to validate it only by knowing a key (their own).
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.