Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Asyncoro
Description
This module provides basic support for asynchronous communication and computation of secret-shared values.
Synopsis
- createConnections :: Int -> [Party] -> IO [Party]
- send :: Int -> ByteString -> Party -> SIO ()
- receive :: Int -> Party -> SIO (MVar ByteString)
- class Gather a where
- async :: SIO a -> SIO (MVar a)
- asyncList :: Int -> SIO [a] -> SIO [MVar a]
- asyncListList :: Int -> Int -> SIO [[a]] -> SIO [[MVar a]]
- await :: MVar a -> SIO a
- incPC :: SIO Int
- decreaseBarrier :: Barrier -> IO ()
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:
- pc (8 bytes signed int)
- payload_size (4 bytes unsigned int)
- payload (byte string of length payload_size).
receive :: Int -> Party -> SIO (MVar ByteString) Source #
Receive payload labeled with given pc from the peer.
Transform SecureTypes
into FiniteField
by reading the future MVar
share that contains a FiniteField
(blocking).
Instances
Gather SecureTypes Source # | |
Defined in Asyncoro Associated Types type Result SecureTypes Source # Methods gather :: SecureTypes -> SIO (Result SecureTypes) Source # | |
Gather a => Gather [a] Source # | |
(Gather a, Gather b) => Gather (a, b) Source # | |
(Gather a, Gather b, Gather c) => Gather (a, b, c) Source # | |
decreaseBarrier :: Barrier -> IO () Source #