Secret Randomness
Generate random encrypted values in Bubble, with randomness shared across the MPC parties so no single party knows it.
The Bubble system introduces an innovative method for generating random encrypted values, utilizing a process that ensures confidentiality and security in multiparty computation (MPC) environments. In this system, each party involved in the computation contributes to the creation of the random values by generating a share of the randomness. This collaborative approach ensures that the randomness remains secure and that no single party has access to the full random value.
By distributing the responsibility for generating randomness across multiple parties, the Bubble system enhances security and privacy. Each participant only knows their own share of the randomness and lacks insight into the contributions of others, thus preserving the integrity and confidentiality of the random values created.
There are two types of random generation:
Rand
The Rand function produces an encrypted random value.
Each bit size has a unique rand function:
function rand() internal returns (gtBool)
function rand8() internal returns (gtUint8)
function rand16() internal returns (gtUint16)
function rand32() internal returns (gtUint32)
function rand64() internal returns (gtUint64)
function rand128() internal returns (gtUint128)
function rand256() internal returns (gtUint256)RandBoundedBits
RandBoundedBits8 function generates an encrypted random value that falls within the range of [0, 2^numBits]
Each bit size has a unique randBoundedBits function:
function randBoundedBits8(uint8 numBits) internal returns (gtUint8)
function randBoundedBits16(uint8 numBits) internal returns (gtUint16)
function randBoundedBits32(uint8 numBits) internal returns (gtUint32)
function randBoundedBits64(uint8 numBits) internal returns (gtUint64)
function randBoundedBits128(uint8 numBits) internal returns (gtUint128)
function randBoundedBits256(uint8 numBits) internal returns (gtUint256)