1
$\begingroup$

For example I have the password X and I want to encrypt 2 different things. Even if one of them was stolen due to a keylogger, other will be completely safe. I wonder how safe something like this would be if the master key is completely random, secure and unknown. Also with what algorithm, program would i be able to do this on Linux systems?

I think something like this is possible actually because of Electrum's key generation method. It uses one master private key to generate all the addresses and private keys.

$\endgroup$
2

1 Answer 1

2
$\begingroup$

Using the HKDF algorithm would work:

prk = HKDF-EXTRACT(salt, master_key)

Key1 = HKDF-EXPAND(prk, "info 1", digest_len)
Key2 = HKDF-EXPAND(prk, "info 2", digest_len)

This creates two keys that are generated from the master key, but given Key1, someone else wouldn't be able to generate Key2, as they don't know the master key.

$\endgroup$
1
  • $\begingroup$ Good idea - you can do this with the install of a library on most languages. $\endgroup$
    – Legorooj
    Commented Dec 30, 2019 at 0:36

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.