hMPC-0.1.0.2: Multiparty Computation in Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Asyncoro

Description

This module provides basic support for asynchronous communication and computation of secret-shared values.

Synopsis

Documentation

createConnections :: Int -> [Party] -> IO [Party] Source #

Open connections with other parties, if any.

send :: Int -> ByteString -> Party -> SIO () Source #

Send payload labeled with pc to the peer.

Message format consists of three parts:

  1. pc (8 bytes signed int)
  2. payload_size (4 bytes unsigned int)
  3. payload (byte string of length payload_size).

receive :: Int -> Party -> SIO (MVar ByteString) Source #

Receive payload labeled with given pc from the peer.

class Gather a where Source #

Transform SecureTypes into FiniteField by reading the future MVar share that contains a FiniteField (blocking).

Associated Types

type Result a :: * Source #

Methods

gather :: a -> SIO (Result a) Source #

Instances

Instances details
Gather SecureTypes Source # 
Instance details

Defined in Asyncoro

Associated Types

type Result SecureTypes Source #

Gather a => Gather [a] Source # 
Instance details

Defined in Asyncoro

Associated Types

type Result [a] Source #

Methods

gather :: [a] -> SIO (Result [a]) Source #

(Gather a, Gather b) => Gather (a, b) Source # 
Instance details

Defined in Asyncoro

Associated Types

type Result (a, b) Source #

Methods

gather :: (a, b) -> SIO (Result (a, b)) Source #

(Gather a, Gather b, Gather c) => Gather (a, b, c) Source # 
Instance details

Defined in Asyncoro

Associated Types

type Result (a, b, c) Source #

Methods

gather :: (a, b, c) -> SIO (Result (a, b, c)) Source #

async :: SIO a -> SIO (MVar a) Source #

forkIO the action monad asynchronously and return future MVar. Provide the given state monad with its own program counter space.

asyncList :: Int -> SIO [a] -> SIO [MVar a] Source #

asyncListList :: Int -> Int -> SIO [[a]] -> SIO [[MVar a]] Source #

await :: MVar a -> SIO a Source #

Read the value from the future MVar (blocking).

incPC :: SIO Int Source #

increment program counter in state.