0
$\begingroup$

If i store sensitive stuff (e.g passwords, salted passwords, Internet protacel adresss(so i know its not tamperd with), private keys(the keys are using a portion of the key on multiple disks in diffrent places for security and i want to make sure there in th write order y storing the hash insecurely(eg on ipfs)) *) *salted(I.E. non salted, salted) is it possible to reassemble at least 10% of the data (assuming data is 4096 bytes if bellow than salted up)(no brute force)?

$\endgroup$
2
  • 3
    $\begingroup$ 1) All cryptographic hash functions including SHA-3 are one way functions 2) I think you are mixing up salting & padding - padding is what is used for building a lower size input to fixed size. Salting is different. 3) Hashing is not using for storing private keys because you will never be able to recover the private key once hashed (because it's one way) $\endgroup$
    – user93353
    Commented Apr 5, 2023 at 0:34
  • $\begingroup$ @user93353 1) not always 2)im using salting to pad 3) My use case is that the hash is on a cloud storage provider(e.g gogle drive) and use the hash to verify the key $\endgroup$
    – Downvoter
    Commented Apr 7, 2023 at 19:07

2 Answers 2

5
$\begingroup$

All of the SHA-3 functions are cryptographic hash functions, and all secure cryptographic hash functions are one-way and not efficiently invertible. Therefore, if given only a hash, an attacker cannot determine any part of the input better than brute force. Of course, if the set of inputs is very small (for example, the two-digit integers), then clearly brute force is very efficient, and hashing doesn't change that.

However, because all secure cryptographic hash functions are uninvertible, even you won't be able to get the original data back out. If you need something invertible, you need a secure encryption algorithm (preferably an AEAD), such as AES-GCM or ChaCha20-Poly1305, and not a hash function.

Note also that for secure storage of passwords, you need a salt and a password hashing function like Argon2 or scrypt, and not a regular cryptographic hash function. That's because typically people pick bad passwords, and since cryptographic hash functions are fast, brute force is often efficient, and unsalted hashes also leak which passwords are identical.

$\endgroup$
1
$\begingroup$

So far, the question of the existence of a one-way function is an open problem. The existence of a one-way function would imply that ${\bf P}\neq {\bf NP}$.

It is even not known whether ${\bf P}\neq {\bf NP}$ implies the existence of a one-way function.

$\endgroup$
1
  • $\begingroup$ Of course, using the 'not polytime invertible' definition of onewayness, of course SHA3 is not oneway (as that makes sense only as $n$ goes to infinity and that doesn't happen with the fixed definition of SHA3). The question would make sense as 'is there a feasible way to generate preimages for SHA3'; however that question has nothing to do with $P = NP$... $\endgroup$
    – poncho
    Commented Jun 20, 2023 at 22:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.