Skip to content
This repository has been archived by the owner. It is now read-only.

Can IPFS crack passwords (i.e. help an attacker guess a password of which only a hash is known)? #37

Closed
Mithgol opened this issue Sep 15, 2015 · 7 comments
Labels

Comments

@Mithgol
Copy link

Mithgol commented Sep 15, 2015

(inspired by Greg Slepak)

Yes: if a known hash is a multihash and if a text file containing the password (and only the password) was ever published, then a mere IPFS lookup will return the password in plain text form.

Even if the login's owner have not ever published the password, such file may eventually be published by someone else.

Update: no, the hash is actually more complex; see below.

@jbenet
Copy link
Contributor

jbenet commented Sep 15, 2015

Actually No, the plaintext file is wrapped with metadata so the hash changes.

And this is silly:

 Even if the login's owner have not ever published the password, such file may eventually be published by someone else.

If someone deliberately puts the pwd out like that, they could just as well tweet it out and tag you personally.

Maybe ask first before asserting one way or another?

@Mithgol
Copy link
Author

Mithgol commented Sep 15, 2015

the plaintext file is wrapped with metadata so the hash changes

Sorry, I've misunderstood the dependence of that hash from the file's contents.

I've edited my original (wrong) answer and added a strikethrough to indicate the misunderstanding.

By the way, what are the elements of metadata that affect the hash?

For example, does the hash change if a file is renamed?

@Mithgol
Copy link
Author

Mithgol commented Sep 15, 2015

…I've just ipfs add two equal files and got two equal hashes, so the metadata must be something else, not the name.

@whyrusleeping
Copy link

whyrusleeping commented Sep 15, 2015

if you do

echo "hunter2" | ipfs add

you will not get the hash of hunter2, you will get the hash of the merkledag protobuf containing the data hunter2 (plus some unixfs framing)

@Mithgol
Copy link
Author

Mithgol commented Sep 15, 2015

Ah, I see. I get it. It's not even a hash of that file's content. It's a hash of an object that has links and blocks and whatnot.

@Mithgol Mithgol closed this as completed Sep 15, 2015
@jbenet
Copy link
Contributor

jbenet commented Sep 15, 2015

yep, thanks for editing 😄 👍

@madavieb
Copy link

madavieb commented May 23, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants