[EN/VN] ULOG 047 - Secret Sharing

in #ulog6 years ago

ULOG 047.png

Assume you have an important piece of data that needs to be kept a secret between a group of people, however, the access to that data from a single individual from that group is not necessary nor wanted for any reason. What can you do?

When I set up the Team Vietnam community, I also created a community bot (@teamvn) powered by the Steem Power of the community members and external supporters. Some members have asked who will be keeping the Owner Key of the bot account? In a Vietnamese interview made by @carlpei, I've answered the question saying that the key will be given to the admins so they could take control of the account if necessary. However, there can be a trust issue. Even though I trust my community admins, I needed something to infuse trust among the community members too. Can there be a chance of one admin going crazy one day and decide to use the Owner Key to upvote whatever content? We've seen that in the past so yes, it is possible.

So I needed a method to share the Owner Key with all my admins but to have it accessible only if the majority of them agreed to it. So I went and look for some kind of online vault that can only be accessed when multiple password is being given but could not find anything. After some thoughts, I started googling for some encryption methods that can do something similar and found out about "Secret Sharing".

Nếu bạn có một cái bí mật quan trọng bạn muốn chia sẽ với một nhóm người nhưng cái bí mật đó chỉ có thể đưa ra khi đa số đồng ý. Thí dụ là mật mã để ném bom nguyên tử, nếu mọi người biết nó thì bất cứ ai cũng có thể quyết định ném nó được. Vậy có cách nào bảo vệ cái mất mã đó và chỉ khi đa số đồng ý thì mới tìm được nó không?

Khi tôi tạo ra nhóm Team Vietnam, tôi cũng lập trình con bot @teamvn. Có một số người hỏi tôi về password của con bot, ai sẽ giữ nó? Trong bài Tường thuật cam kết về con bot @teamvn từ witness @quochuy tôi có nói rằng cái password đó sẽ đưa cho admin và nếu cần thì có thể dùng nó.

Tôi tin tưởng những admin của nhóm, nhưng sẽ có người sẽ không có cái sự tin tưởng này vì cũng có nhiều vụ đã xảy ra trên Steem và nới khác, nễu mỗi admin biết được password, thì một ngày nào đó một trong người đó quyết định dùng password để điều khiển con bot thì sao?

Vì thế, tôi đã suy nghĩ lâu về một cách nào để chia sẽ cái thông tin bí mật này với admin nhưng không có admin nào có thể riêng tư dùng nó. Tôi đã bắt đầu đi tìm một dịch vụ giữ thông tin mà cần nhiêu password để vào được, nhưng ko có cái nào cả. Sau khi đi tìm tòi trên net thì tồi đã moi ra cái cách gọi là "Secret Sharing"

Secret sharing (also called secret splitting) refers to methods for distributing a secret amongst a group of participants, each of whom is allocated a share of the secret. The secret can be reconstructed only when a sufficient number, of possibly different types, of shares are combined together; individual shares are of no use on their own.

Source: Wikipedia

"Secret sharing" là một cách để cắt cái bí mặt ra thành nhiểu phần và chia nó ra với một số người, mỗi người sẽ nhận một phần của cái bí mật.

Khi muốn tìm ra lại cái bí mật đó, mình cần góm lại đủ một số phần để mà tính ra lại cái bí mật. Mỗi phần không có thể dùng riêng nhưng mình cũng không cần tất cả mọi phần, chỉ cần một số nào đấy thôi.

Sau đây mình sẽ cho vài cái ví dụ để cho nó rõ ràng hơn.

There are few tools that implement the secret sharing methods. I've chosen http://passguardian.com/ because it offers me more parameters. It is based on Shamir Secret Sharing Scheme and is built on https://github.com/amper5and/secrets.js

I can define how many shares to split the secret into and I can also define the minimum of shares required to rebuild the secret. For example, lets say that the secret I want to protect is the following string:
this-is-the-password-to-my-one-million-dollar-account

I would go to http://passguardian.com/#split and use the "Split" tool to split this secret into 4 shares that requires 3 shares to rebuild the secret.

Tôi đã tìm ra và cái app trên mạng và đã quyệt định dùng http://passguardian.com vì nó có nhiều khả năng cần thiết. Nó dùng cách gọi là Sharmi Sharing Secret Scheme và dùng https://github.com/amper5and/secrets.js

Dùng nó, tôi có thể chọn cắt chia cái bí mật ra thành bào nhiêu phần và tôi cũng có thể chọn cần bao nhiêu phần để tìm ra lại cái bí mật. Thí dụ cái bí mật đó là cái mật mã này: this-is-the-password-to-my-one-million-dollar-account

Bây giờ tôi lên http://passguardian.com/#split và dùng cái "Split" để chia cái mật mã đó ra thành 4 phần và phải cần 3 phần để tìm ra lại mật mã:

Screen Shot 2018-08-08 at 6.49.11 pm.png

I can now email each of those shares to each of my 4 admins. If one day they need to access the secret, 3 of them need to agree to it and give out their share. They would then go to http://passguardian.com/#reconstruct and use the "Reconstruct" tool and enter their 3 shares and the secret will magically appear:

Bây giờ tôi sẽ có thể gửi mỗi phần đó đển 4 admin, mỗi người một phần. Nếu một ngày nào đó cộng đồng cần lấy lại cái mật mã con bot mà tôi không có đây thì chỉ cần 3 admin đồng ý và gửi cho nhau phần của mình, rồi lên http://passguardian.com/#reconstruct là có thể lấy lại được:

Screen Shot 2018-08-08 at 6.51.58 pm.png

In the case of Team Vietnam, I needed to cover another scenario: what if 2 out of the 4 admins don't agree to this but the community is supportive of it? So I used the "Split" tool again and split the secret into 6 shares with a required minimum of 4 shares to reconstruct the secret. I will give one share to each of the admin and the two remaining shares will go to two representatives of the community. Now, if 2 admins disagree, they can be bypassed by having the two community representatives to agree. So 2 admins + 2 community member will have the same power as 3 admins.

Cho nhóm Team Vietnam, tôi cũng cần giải quyết một vụ khác: nếu 2 trong 4 admin không đồng ý nhưng cộng đồng lại đồng ý thì sao? Nên, tôi sẽ dùng cái "Split" để chia cái bí mật ra thành 6 phần và cần 4 phần để tìm ra lại cái bí mật. Tôi sẽ đưa 4 phân cho 4 admin và 2 phần còn lại thì sẽ đưa cho 2 người đại diện cộng đồng. Với cái cách thứ hai này, thì chỉ cần 2 admin và 2 người đại diện đồng ý là được rồi. Hai admin và hai người đài diện sẽ có khả nằng của 3 admin.

Ai muốn đứng ra làm người đại diện cho cộng đồng thì hãy cho tôi biết. Bước sau sẽ là cho cộng đồng bầu cho hai người.


Related content


 Do more on Steem
quochuy.jpgOn Steem, Witnesses are playing the important role of providing a performant and safe network for all of us. You have the power to choose 30 trusty witnesses to package transactions and sign the blocks that will go in the Steem blockchain. Vote for me via SteemConnect to help me do more useful projects for the community.
Join me on Homesteaders Online's Discord
If you are Australian (even abroad), join #teamaustralia!

Credits

  • The image at the top has been generated with the Canva app using my own photo.

Protect your money against Phishing Scam!

Cryptos accounts are the target of international scammers because they want your hard earned money!

Those people are very clever and in a moment of inattention, you've given them your login and password!

I've created a Chrome extension that can help you detecting scam links!

Install Steemed Phish Chrome desktop browser extension now!

Password and Private Keys security

You all know that your Steem password is the access to all your STEEM, SBD, posting, transferring, everything... right?
So, please, follow these simple steps and keep yourself safe:

  1. Apart from the initial setup of your account, NEVER use your password ANYWHERE, if stolen, it will give full control to your Steem account.
  2. Backup your password and keep it somewhere safe. Use a password manager like Lastpass, print it on paper and put it in a safe (no kidding). If you forget your password, no one can help you out.
  3. To login for creating content and curating, use your Private Posting Key
  4. To make transfers and account operations, use your Private Active Key
  5. To encrypt and decrypt memos, use your Private Memo Key
Sort:  

I wonder how many people actually use their private posting key rather than the master password. You have always been able to login to Steemfiles without your active key. What do you think of sites that use Steem Connect and you have to give your active key to login to them?

I think still many people use their master password instead of their posting key which is a security issue but this is still something non-tech people don't understand yet.

I trust SteemConnect v2 (you can tell by the URL), they are using your Active Key only to setup a proxy account setting into your Steem account, this allow the site to post and upvote on your behalf without the need of knowing your Posting Key. Neither SteemConnect v2 nor the site will store neither of your Active Key or your Posting Key, they use an authorisation token instead.

There has been case where a SteemConnect v2 powered site has been compromised (utopian.io), the hacker didn't get access to any private keys but got access to the authorization token, all he/she could do was upvote some posts. Users who gave permission to utopian via SteemConnect v2 to post/upvote on their behalf only needed to connect to SteemConnect and revoke the access token and generate a new one by authorizing Utopian again (using the Active Key one more time).

Honestly, I get confused between all of the passwords for Steemit, especially when used on sites other that Steemit such as busy.org, tasteem, or SteemConnect, or whatever else. I understand that there are legitimate reasons why there are different ones...just doesn't feel natural. Maybe it's just me. The passwords are in weird characters so I don't remember them. So I save them on a public email so that I can access it when I am using a different device (which is probably not what the administrators of steemit intend for)... It's a mess.

Agree, it does not feel natural but that's part of the crypto world. Those passwords are not only used to access your account, they are also used to encrypt and sign your transactions as to prove they are coming from you. With Steem you have multiple of them to make it safer, so you can give your posting key to another app to post and upvote for you without giving them the power to take your money. Then you have the Owner Key (master password) that has the power to generate all the other keys if you ever loose them.

I use a password manager such as LastPass to remember those complicated passwords for me. Then my master password to access LastPass itself is the only password I need to remember but I make it strong still because whoever can guess my master Lastpass password will have access to all my passwords.

That sounds like a really useful tool when you're getting that hardcore into things :O And nice foresight on your part to look into these things well before they were in any danger of becoming an issue.

It feels like I'm the president of the US sharing a nuclear missile launch passcode to the generals hahahaha

Exactly what I feel after reading your post, haha

UpvoteBank
Your upvote bank
__2.jpgThis post have been upvoted by the @UpvoteBank service. Want to know more and receive "free" upvotes click here