Soda Labs
Soda Labs Docs
Developer GuidesTypes and operations

Supported types

The confidential Solidity data types Bubble adds, and the plaintext types each one maps to.

Bubble introduces novel data types to accommodate the necessity of maintaining confidentiality. Subsequently, it introduces additional operations capable of manipulating these confidential data types without compromising their secrecy.

Data Types

To support confidentiality, we introduce a new set of data types mirroring the existing solidity types with size of up to 256 bits. We present two new types needed for manipulating private smart contracts:

  • Inputtext™ (itBool, itUint8, itUint16, itUint32, itUint64, itUint128, itUint256)
  • Garbledtext™(gtBool, gtUint8, gtUint16, gtUint32, gtUint64, gtUint128, gtUint256)

We make a distinction between secret data types that are used for security ‘in transit’, or ‘in use’. That is, while inputtext data type (denoted IT) is used for protecting data in transit, we use the garbledtext™ data type (denoted GT) for protecting data in use.

Detailed examples of these types are presented in the following link💰Private ERC20 Example

Usage

  • Inputtext™ is used when a user initially presents encrypted data to Bubble. It undergoes initial validation and subsequently gets transformed into "garbledtext" for subsequent computations.
  • Garbledtext™ is used either in operations or by passing secret data from contract to contract. This is actually a "handle" - an opaque reference pointing to encrypted data stored and managed off-chain by the MPC engine. This allows user data to remain private even while being actively used inside smart contract logic.

On this page