Show newer

@icedquinn Depends what you mean by "crypto code".. and what use the payload has in the overall system. But yea its something that needs be done all the time. I have had to implement canonical json in cryptocurrency code before, for example.

@icedquinn Yes except as I stated that does not solve the problem that canonical JSON solves.

If give the hash of some previously hashed payload, and the hash of some new payload, if the payloads arent canonical then you cant perform an equality check at all to verify if the payloads are equivelant. With canonical JSON you can.

@icedquinn Yes but your missing the point. you have no way of verifying the two blackboxes are equivelant with that process, it does nothing to address that problem. The same JSON, simply reordered randomly will produce completely different hashes and signatures with no way of knowing they are the same thing.

Thus it isnt solving the underlying problem that would be solved by requiring a specific bit representation, that is, the ability to check for equality.

@icedquinn How does that give you a hash that is directly comparable? You would still wind up with different byte arrays and thus different signatures that are not directly comparable.

@icedquinn I agree thats a shitty spec... IT does expose a very real problem with JSON though, that two equivelant pieces of JSON can hash to very different values.

It is the reason I have often in my projects (where hashed values representing unique JSON is needed) used canonical JSON, which is a standard that fixes that issue. Sadly it isnt well adopted so it generally needs to be used as an internal standard.

That time the USA accused russia of chemical warfare but it turned out just to be Bee shit...

en.wikipedia.org/wiki/Yellow_r

@1iceloops123 I ate a gigantic chinese meal loaded with carbs... so pretty much the same thing.

@Madmonkey
I dont recall ever claiming someone said that. Whats your point?

@bluejay Your axiom is incorrect, therefore your conclusion is also incorrect.

New varients become selected for when vaccines are in wide use in the population. Without vaccines the variants are out competed by the main branch (usually). Any variants that do arise in unpopulated populations must be selected for against the main branch whereas in a vaccinated population this need not be the case, allowing a larger range of variants to be selected for and ultimately arise.

Show older
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.