3 ms·
Does birthday paradox apply here? It’s about any pair of people having the same birthday, whereas in this case you need someone else with a specific birthday.
by ratorx 5y ago
Does birthday paradox apply here? It’s about any pair of people having the same birthday, whereas in this case you need someone else with a specific birthday.
For example, if you generate 2 numbers and they are the same, but are different to the capnproto number, that’s a collision but doesn’t actually matter.
EDIT: It does apply, I misunderstood what the number was being used for.
- elcritch 5y agoIt does apply, according to https://www.johndcook.com/blog/2017/01/10/probability-of-secure-hash-collisions/ https://www.johndcook.com/blog/2017/01/10/probability-of-sec...
- ratorx 5y agoYou’re right, I misunderstood what the magic number was being used for.
- lozenge 5y agoBut if my application only uses 100 schemas, I only care about a collision if it's with one of those 100.
- gpderetta 5y agoYou have a collision if any two schemas share the id, not if a specific schema collides with any of the others. So it is exactly like the birthday paradox.
- heavenlyblue 5y agoYeah, but that collision probably doesn’t matter because there’s a bunch of other variables that need to come together for it to be an issue at all.
- gpderetta 5y agoIf the schema id is the message id, in principle it could be an issue as the protocol on the wite would be ambiguous. Then again, you should be able to detect any collisions when you register a schema with the schema repo and deal with it at that time.
- deleted 5y ago[deleted]