There's a problem in a textbook that is really stumping me.

How would you enhance the RIPv2 protocol to provide a (more) secure and scalable schema for distributing the updates? Describe the steps of a new version of the protocol which still uses a simple password authentication algorithm, but with different keys for each router

I'm not sure what they mean by "different keys". Is it keys in a keyed-MD5 hash or do are they referring to password itself?

Either way I'm not sure how the protocol would work. How would the routers be able to authenticate each other if they don't share anything or know anything about the others? It seems to me like it's not possible

Any direction or clarification on this problem would help. Thanks!

  • 3
    What book is this quote from? Please include title, author, publisher, year, and page number.
    – Tommiie
    Commented Dec 14, 2018 at 12:18
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
    – Ron Maupin
    Commented Dec 25, 2018 at 10:27

1 Answer 1


Here "key" means "secret for encrypting/decrypting". Your passage doesn't specify that the keys should be asymmetric, so for simplicity just think about how you'd solve it with straightforward symmetric encryption, or any of the straightforward hash-based authentication mechanisms. You have to think about how the different actors check the incoming messages for authenticity, what a malevolent actor might try, and how to prevent it. Start with reading and re-reading section 4.1 of the RIP2 RFC 2453 (and also 5.2).

Perhaps the Wikipedia article on Cryptography is useful for you, especially the sections on symmetric and asymmetric keys. You might also find useful ideas in the article on Message Authentication Code.

It's clear the textbook question is focussed on how you change the protocol, not any particular detail of the cryptography beyond the fact that the partners have different keys.

Your question "How would the routers be able to authenticate each other if they don't share anything or know anything about the others?" is about "key exchange", one of the trickier things in cryptography. Just start with the simplest scheme, the "pre-shared key", where an adminstrator configures whatever secrets are required.

  • I suppose you could always use a diffie hellman key exchange to generate a shared key between every neighbour and encrypt with that key, but I don't think that qualifies as a solution with "different keys for each router" Commented Dec 15, 2018 at 15:00
  • @JohnSlaine Indeed you could. I'd suggest though that this question is about learning how to adapt and extend protocols, which is why my answer suggests a simple Auth Code or symmetric encryption. In real life I'm sure everybody would suggest a different routing protocol anyways (rather than devise a new variant of an old protocol) which already had authentication and/or encryption.
    – jonathanjo
    Commented Dec 15, 2018 at 15:23
  • As I understand it with symmetric encryption you encrypt and decrypt with the same key so I guess I don't understand how we can use it without first exchanging keys if all routers don't have the same key to start with. Commented Dec 15, 2018 at 15:31
  • I was imagining the simplest thing (from the point of view of the protocol) is that you configure each router with the key of every other router it trusts, and the routing messages are validated with some kind of hash of key and the plaintext message, following the format of RFC 2543 section 4.1. You could also encrypt the route entry messages. It's important your modified protocol is identifiable as such, so routers can ignore these messages if they don't understand them.
    – jonathanjo
    Commented Dec 15, 2018 at 15:46
  • ... when devising modifications of a protocol, my advice would be to imagine you're writing the new RFC, which would mostly say "Same as before, except this field X is different in the following way ..." Your implementers have to decide what goes into every field of every packet; you have to give them the information to do so.
    – jonathanjo
    Commented Dec 15, 2018 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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