LogoLogo
  • Overview
    • Intro
    • Fair Math Actor
      • Fair Math Controller
      • Fair Math VM
      • Setup an Actor
    • Hello (CIFAR) world!
  • FHE Computer
    • Overview
    • Architectural Layers
      • Application Layer
      • Orchestration Layer
      • Verification Layer
      • Execution Layer
      • Data Layer
    • ISA
      • fhe
      • arith
      • tensor
      • polycircuit
    • Operating System
      • Computer State
      • Application
        • Running Applications
        • External Functions
        • Interactive APPS
      • Execution Graph and Tasks
        • Atomic and Composite Instructions
        • Instruction Unrolling
        • Task Dependencies
        • Execution Graph
      • Process
        • Process lifecycle
        • Resource Allocation and Isolation
      • Order Book
        • Matching Mechanism
        • Task Complexity
        • Instruction Complexity
        • Task re-Delegation
      • Context
        • Context Structure
      • FHE Component Repository
    • Fair Math Actors
      • Task State Monitoring
      • Execution Pairs
      • Rewards and Penalties
    • Ethereum Endpoint
    • CIFAR10 App
  • Whitepapers
    • FHE Computer
    • FHERMA
  • FHERMA
  • Resources
    • Computer CLI
    • FHERMA
    • POLYCIRCUIT (CPP)
    • OpenFHE-rs
    • Talks and Podcasts
  • Social
    • Twitter
    • Linkedin
    • Website
    • Github
Powered by GitBook
LogoLogo
On this page
  1. FHE Computer
  2. Operating System
  3. Context

Context Structure

Context Representation

The context in the Fair Math Computer is a JSON-like object that organizes information into the following sections:

  1. fhe Contains cryptographic data, including:

    • Public keys.

    • Rotation keys.

    • Cryptographic contexts.

  2. args Represents command-line-style arguments provided to the application during execution.

  3. vars Describes all variables used in the process. Each variable entry includes:

    • id: Unique identifier for the variable.

    • basetype: The base type of the variable (e.g., i32).

    • is_secret: A boolean indicating whether the variable is encrypted.

    • is_array: A boolean indicating whether the variable is an array.

    • storage: Specifies where the variable's value is stored (e.g., local or ipfs).

    • value: The current value of the variable, either directly or as a reference (e.g., an IPFS hash).

Example Context File

Below is an example of context file:

{
    "vars": {
        "%arg0": {
            "basetype": "",
            "is_array": false,
            "is_secret": false,
            "storage": "ipfs",
            "value": "ipfs.QmXR5FDSupU6ZKxxkU95WcywhmAvykLZbNEqtcu2P3M43a"
        },
        "%arg2": {
            "basetype": "i32",
            "is_array": true,
            "is_secret": false,
            "storage": "ipfs",
            "value": "ipfs.QmfZhqPFDZmyK4rAxwDH5FTHeQGrJjDFbRJ1WDzW4qpF1P"
        },
        "%mul_key": {
            "basetype": "CKKSMulKey",
            "is_array": false,
            "is_secret": false,
            "storage": "ipfs",
            "value": "ipfs.QmT4xPQnAkZXR6PGDySaVZ4kBPbHdkVi2TqZgUZdREhfa7"
        },
        "pk": {
            "basetype": "CKKSPublicKey",
            "is_array": false,
            "is_secret": false,
            "storage": "ipfs",
            "value": "ipfs.QmeA4jDooaoR4G2amHtnQKGpRD4eEdfVZSLjARDFF5HJq4"
        }
    }
}

This structure allows the system to organize and manage cryptographic and process-related information efficiently, ensuring seamless application execution.

PreviousContextNextFHE Component Repository

Last updated 5 months ago

Page cover image