Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Within RFC 2104 section 3 there is discussion around keys (below). How are these keys agreed upon/distributed? Practically speaking is asymmetric crypto a requirement to "bootstrap" and distribute keys? Any help/guidance is appreciated...thanks!

"Keys need to be chosen at random (or using a cryptographically strong pseudo-random generator seeded with a random seed), and periodically refreshed. (Current attacks do not indicate a specific recommended frequency for key changes as these attacks are practically infeasible. However, periodic key refreshment is a fundamental security practice that helps against potential weaknesses of the function and keys, and limits the damage of an exposed key.)"

share|improve this question
up vote 7 down vote accepted

How are these keys agreed upon/distributed? Practically speaking is asymmetric crypto a requirement to "bootstrap" and distribute keys?

The answers to those questions are beyond the scope of the RFC. So, it depends on the context in which HMAC is being used. The keys can be agreed upon/distributed in any secure manner. The RFC doesn't care. It could be via asymmetric crypto, it could be in person, it could be via carrier pigeon (if that is considered secure in your threat model).

share|improve this answer
    
Interesting...so it sounds like it really depends on how one wants to implement depending on security requirements. Are there any documented examples/use cases where all the concatenated cryptographic functions are laid out from end to end? – juantonamela Mar 28 at 15:19
    
@juantonamela TLS and SSH. – mikeazo Mar 28 at 15:42
3  
HMAC is also frequently used in situations that don't require key distribution, e.g. a server using HMAC to sign tokens and validate the signatures later. The key could be generated on the server and never leave it. – cjm Mar 28 at 18:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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