问题
Suppose N people want to communicate with each of N- 1 other people using symmetric key encryption. All communication between any two people, i and j, is visible to all other people in this group of N, and no other person in this group should be able to decode their communication. How many keys are required in the system as a whole? Now suppose that public key encryption is used. How many keys are required in this case?
I have found two answers for symmetric that state it is either n(n-1)/2 or n(n-1), the former makes most sense to me.
For public I have found either 2N keys or N keys. Again the former makes most sense to me here.
Could someone shed some light on the correct answers?
回答1:
This is out of scope for SO, I suggest you look at crypto.stackexchange.com in the future. Also, the question is vague in some ways and you fail to explain your rational. I encourage you to include more information next time. That said...
To communicate using symmetric key cryptography each pair of people must share a key. This leads to the N(N-1)/2
equation. However, most systems will assume your keys are uni-directional so each sender has a unique key for each receiver, this doubles the number of keys to N(N-1)
.
To communicate using asymmetric cryptography, and not counting any sort of certificate authority, each user has a public/private key pair. Two keys per user leads to the 2N
value. If, however, you consider each "pair" to be just one key then I could understand a reasonable person calling this N
keys (they might even mean "on the order of N
keys", or O(N)
keys).
来源:https://stackoverflow.com/questions/30111821/symmetric-and-public-key-encryption