SkyeKiwi Protocol

— A Technical Overview

SkyeKiwi
5 min readMay 7, 2021

--

SkyeKiwi Protocol is a decentralized secret sharing protocol that is capable of sharing files from a single seed phrase to GB size of files, to a few people to hundreds and thousands of people.

In this article, we will try to explain the core technical components in plain language.

Threshold Secret Sharing (TSS) & Lagrange Polynomial

The core technology of TSS relies on the Lagrange Interpolation Theorem. The term is actually very intuitive in plain English: two points are sufficient to draw a line on a plane, three points are sufficient to determine a triangle on a plane. When a collection of multiple polynomial curves on a plane intersects on three points, and any three of them are sufficient to determine the three points, then any three of these polynomial curves are enough to determine the destination shape.

To take this context out from polynomial and math, when we supply the function with two numbers (i.e. number of the collection of curves and number of curves needed to construct the shape), along with the desired property of the constructed shape (i.e. area of the shape for instance), we have constructed a function that:

Function TSS (secret: Uint8Array, totalPieces: Number, threshold: Number) -> CurveParameters: Array<Uint8Array>

Without diving too deep, we have demonstrated a practical way to divide a secret into many pieces and set a minimum threshold to decrypt the message. This process is commonly known as the Shamir Secret Sharing Schema as an honor to the famous cryptographer Adi Shamir who invented this method in 1979. The Link is here if you would like to read more on it.

Targeted Sharing

TSS is providing a good general algorithm to manage how a secret is intended to be shared. However, distributing these shares without a centralized server is another problem that needs to be solved.

Luckily, sharing a secret to a targeted receiver is no cutting-edge technology anymore. The X25519 Curve commonly used by blockchains provides a set of tools to asymmetrically encrypt a piece with the receiver’s public key, while only the intended receiver is able to decrypt with the private key associate with the public key.

We use Curve25519 encryption to further encrypt all shares generated by the TSS method so that only the intended receivers of the shares are able to decrypt the shares.

Sealing & Unsealing

Due to the nature complicity of the TSS algorithms, it is impractical to put a file of a few GBs size through the algorithms. Computation will take forever for large files, and the storage usage is multiplied by the number of shares generated. Therefore, we are adopting a seal & unsealing mechanism for large files.

On file upstream, SkyeKiwi Protocol will read in any large file in chunks, while randomly generate a 32bytes key to symmetrically encrypt each piece (or take in a key at the user’s discretion). We will collect the hashes of each file before encryption and built a lightweight Merkle Tree to verify the integrity of the file when downloaded, and each encrypted chunk will be deflated to reduce the storage usage. These encrypted, deflated chunks will be uploaded to IPFS and later be placed as storage orders to the Crust Network. The key used to encrypt will be encrypted through the TSS mechanism & the X25519 Curve and be encrypted and shared to all receivers. We call this process “sealing of a file”.

To unseal a file, one needs to simply reverse the above process.

Coordination

To facilitate the sealing and unsealing process efficiently, a blockchain smart contract is a crucial piece of the puzzle. As we have discussed above, we have converted a file into small encrypted pieces, while maintaining metadata of the file through IPFS CIDs, a schema to share and a key to be divided and encrypted for all intent receivers.

We use blockchain smart contracts to facilitate coordination between all parties. SkyeKiwi will provide a few sample smart contracts for developers to play with. A few noticeable features on sharing coordination include:

  • write access
  • nonce validation and management algorithm to ensure a linear version history of smart contracts (we are open for suggestions and contribution to integrate a full-size version control system as a middle layer in the future).

One More Thing: Automatically Approve Access Request

For an artwork platform (refer to link), it may be convenient for an artist to automatically approve all access requests. Since only the current recipients of the secrets know the secret, it is impossible for a smart contract to reveal the secret without accessing the secret through a public network. Therefore, SkyeKiwi is also building a simple automatic bot to listen to requests for access events emitted from smart contracts, while the secret owners can set certain conditions for revealing the secret and automatically approve the request on machines injected with their blockchain identity.

For the Future

  • Advanced Secret Sharing Schema Support: when multiple parties need to decrypt their pieces at the same time to decrypt the file. Similar to how the nuclear weapon button works: many high-level commanders need to approve the request simultaneously. We plan to integrate a peer-to-peer whisper protocol into our current design to achieve this.
  • Faster TSS Algorithm: The efficiency of the TSS algorithm is the biggest performance bottleneck for efficiently sharing the secret to more people. Currently, SkyeKiwi relies on an open-source audited JavaScript library to proceed with all polynomial calculations. The library is a part of the open-source code base of the Slant PrivEOS project on EOS. There is new academic research on how to increase the efficiency of the TSS algorithm and we do plan to adopt a faster algorithm through a WASM bridge to a more performant Rust or C implementation.
  • A Better Standardized Smart Contract for Richer Capacities: Decentralized coordination is a complicated topic. We have built the protocol to be versatile and generic while leaving lots of space for improvement through better smart contracts.
  • Chain Level Integration: SkyeKiwi might release a Substrate pallet to integrate the protocol functionalities by off-chain workers. If you believe this is a good idea, drop us a message :)

Contact

I hope you enjoyed this brief walkthrough. We take pride in our creation but always open to suggestions.

Drop us a message to:

Email: hello@skye.kiwi

Telegram: t.me/skyekiwi

Twitter: skyekiwi_team

Website: https://skye.kiwi

--

--

SkyeKiwi
SkyeKiwi

Written by SkyeKiwi

We are building a decentralized secret sharing protocol. Visit us @ https://skye.kiwi

No responses yet