Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review Chia private key & wallet security best practices - implement and document for Machinaris. #53

Open
guydavis opened this issue May 25, 2021 · 6 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@guydavis
Copy link
Owner

guydavis commented May 25, 2021

We inherited the keys=/root/.chia/mnemonic.txt behavior from the official Chia Docker, but there needs to be a better way to handle the private key and/or keyring.

Some notes:

  • When mode=plotter, we can now just pass farmer_pk and pool_pk, so that's good.
  • When mode=harvester, we can import the farmer's ca and not require mnemonic.txt, so that's good.
  • But when mode=[farmer|fullnode], we need a better approach to private key security. Currently, mnemonic.txt is required on first launch to initialize Chia services.
  • Best practice is to change the payout address to a cold wallet so that coins do not accumulate in the main wallet used by Machinaris.

Some references:

I'm opening this thread and calling for discussion and assistance to find best practices and approaches. Any contributions of wiki documentation and code pull requests are welcomed. A "Security" discussion channel has also been opened our our Discord. Come share good ideas!

@guydavis guydavis added the help wanted Extra attention is needed label May 25, 2021
@guydavis guydavis self-assigned this Jun 9, 2021
@HitLuca
Copy link

HitLuca commented Sep 21, 2021

Is mnemonic.txt needed more than once? Because having it deleted after startup would already be something

@guydavis
Copy link
Owner Author

guydavis commented Sep 22, 2021

Thanks for the suggestion. Back in late May, when I last tested starting an existing fullnode without invoking chia keys add, I was getting errors related to the wallet, perhaps due that Chia version.

However, based on your suggestion, I have just re-tested this scenario, with an empty mnemonic.txt, and now things are working? Farming is running and the wallet seems available. I need to test this further to determine exactly which conditions this works under.

@guydavis guydavis added enhancement New feature or request help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Oct 14, 2021
@JakubSido
Copy link

I see more problems...
If forks, or (sorry) machinaris get access to the phrase ... even if I use a cold wallet, there is still an issue with manipulation with:

  1. plot NFT (pool change/self pooling) -- So the attacker can change pool or even change to self pooling
  2. communicate with a pool and change payout address

So, the cold wallet can save my already farmed coins. But the future of the plots and future rewards are compromised.

Am I wrong?
Are there any other options to solve those problems?
A cold wallet is not sufficient I think

I have also tried to open this question on official chia github..
See Chia-Network/chia-blockchain#9007

@guydavis
Copy link
Owner Author

guydavis commented Nov 5, 2021

I see more problems... If forks, or (sorry) machinaris get access to the phrase ... even if I use a cold wallet, there is still an issue with manipulation with:

  1. plot NFT (pool change/self pooling) -- So the attacker can change pool or even change to self pooling
  2. communicate with a pool and change payout address
    So, the cold wallet can save my already farmed coins. But the future of the plots and future rewards are compromised.

Hi. Great points! Yes, you are absolutely correct. The value of plots is tied to the private key encoded in the mnemonic. For that reason, each person in this blockchain farming ecosystem must assess their own risk/reward position. For some, that will mean:

  1. Only running the official software, without any 3rd party tools. They must also ensure their farming systems are not compromised by malware and remote exploits, as we all must do these days using Internet-connected systems.
  2. OR not even running official farming software, instead using Flexfarmer to only harvest for example.
  3. Others still will want to participate in the blockchain fork community, cross-farming the same plots to obtain those additional rewards. This, by definition, will expand the exposure surface for one's mnemonic key. Many will find that an acceptable trade-off, particularly when combined with a cold wallet.

Only each individual can determine their own risk tolerance in pursuit of blockchain rewards by farming plots. Machinaris will continue to serve those interested in more than one blockchain in as secure a manner as possible. Hope this helps answer your question!

@JakubSido
Copy link

I am not here to hate :-)
I just really want to find some safe way to do it.

I believe, there should be another way instead of sharing the keyphrase.
It should be possible to farm without a wallet sk.

What about not sharing the phrase but only map private keys needed for farming into the containers and keep unnecessary keys hidden?

@guydavis
Copy link
Owner Author

guydavis commented Nov 5, 2021

Yes, good suggestion. Like in the official Chia docker, it's possible to set the keys environment variable to persistent. Then no mnemonic is required, but all key import and management is responsibility of the advanced user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants