diff --git a/Sources/HomomorphicEncryption/HeScheme.swift b/Sources/HomomorphicEncryption/HeScheme.swift index e9564f03..19307461 100644 --- a/Sources/HomomorphicEncryption/HeScheme.swift +++ b/Sources/HomomorphicEncryption/HeScheme.swift @@ -17,7 +17,7 @@ import ModularArithmetic /// Polynomial format. /// /// - Warning: There should be no other conformances to ``PolyFormat`` beyond ``Coeff`` and ``Eval``. -public protocol PolyFormat { +public protocol PolyFormat: Sendable { /// A textual representation of the format. static var description: String { get } } diff --git a/Sources/PrivateInformationRetrieval/IndexPir/MulPir.swift b/Sources/PrivateInformationRetrieval/IndexPir/MulPir.swift index 65053764..9d7f2f77 100644 --- a/Sources/PrivateInformationRetrieval/IndexPir/MulPir.swift +++ b/Sources/PrivateInformationRetrieval/IndexPir/MulPir.swift @@ -416,7 +416,7 @@ extension MulPirServer { try await responseCiphertexts .append(.init(stride(from: 0, to: database.count, by: perChunkPlaintextCount).async - .map { startIndex in + .map { [queryCiphertexts, firstDimensionQueries] startIndex in try await self.computeResponseForOneChunk( expandedDim0Query: firstDimensionQueries, expandedRemainingQuery: queryCiphertexts, diff --git a/Sources/PrivateInformationRetrieval/IndexPir/PirUtil.swift b/Sources/PrivateInformationRetrieval/IndexPir/PirUtil.swift index f285ea8d..4c7460ea 100644 --- a/Sources/PrivateInformationRetrieval/IndexPir/PirUtil.swift +++ b/Sources/PrivateInformationRetrieval/IndexPir/PirUtil.swift @@ -17,7 +17,7 @@ import HomomorphicEncryption import ModularArithmetic /// A protocol outlining the auxiliary functionalities used in PIR. -public protocol PirUtilProtocol { +public protocol PirUtilProtocol: Sendable { /// The underlying HE scheme. associatedtype Scheme: HeScheme /// The Scalar type used by the HE scheme. @@ -169,15 +169,16 @@ extension PirUtilProtocol { remainingOutputs -= outputToGenerate return outputToGenerate } - let expanded: [[CanonicalCiphertext]] = try await .init((0..