Closed sgoendoer closed 7 years ago
I'm not completely sure we need the salt if we are going to make it public.
The idea for the salt is like this: First, everything in the Global Registry is considered to be publicly accessible. Second, UserIDs are generated in a fixed way, e.g. by hashing the public key using PBKDF2 (with sha256 and 10k (?) iterations)
So in theory, this allows an attacker to "grab" everything (or at least a substantial portion of) the datasets on the DHT.
Trying to break one user's key alone takes now would take an attacker an enormous amount of time: For each iteration, he would have to create a key pair (which is rather slow), then hash it via PBKDF2 (which is slow by design) and see whether the outcome is a collision with the UserID he just attacked.
When in possession of a high number of keys, each "round" would attack all previously grabbed UserIDs at the same time, so in theory: all !
Having a salt, which is public, but unique for each UserID, would force the attacker to attack each UserID separately.
Got it. Thanks.
I would further propose to use JWT instead of adding signatures directly to the data. This would create a base64-encoded string, which can be verified by a standardized framework instead if a self-defined signing scheme
How should the data be represented in the Global Registry?
We discussed so far having a list of UserIDs, some timestamp, the public key, signature, and salt. We could add a human-readable username and a flag indicating whether the account is still active or not (see #1)
Proposal: Use JSON
GUID: "1V3G0H7EPFG55W52LUG5SN0ZFVTVMQTTZ6Q5TV5BBTIP05IA0E"
furthermore, this JSON object should be put into a JWT as a claim "data". The JWT MUST be signed with the private key matching the public key of the dataset.