[Cryptography] IPFS spin locks !

Henry Baker hbaker1 at pipeline.com
Mon May 10 16:05:34 EDT 2021


The IPFS (Interplanetary File System) *addresses* blocks
that are 'stored' within it by producing a *hash* of the
(immutable) block itself as its 'address'.

Assuming that the hashing algorithm is publicly known,
anyone can now create a spin lock whose 'address' is the
hash of some not-yet-stored-in-IPFS random file, and this
random file is communicated to other processes who all
need to synchronize with one another.

Any process waiting for the sync signal will spin trying
to access this 'address/hash' by attempting to 'read' it
from IPFS. These 'reads' will continue to *time out* so
long as there is no object in IPFS having that particular
hash.

When it is time to synchronize, any one of these processes
can 'add' this particular file to IPFS, after which all of
the spinning processes will eventually (with some unknown
delay) be able to 'read' this file from IPFS. The mere fact
that the file is being returned is the signal for any
spinning process to proceed.

Given the length of these hash addresses, it is exceedingly
unlikely that anyone outside the group can *guess* its hash,
nor can anyone who guesses its hash come up with a file
having that exact hash to add to IPFS.

The IPFS thus implements a kind of 'transactional memory'
(Google it).

This also reminds me of the WWII BBC and their "London
calling with messages for our friends".



More information about the cryptography mailing list