Class SEALServer


  • public class SEALServer
    extends Object
    • Constructor Detail

      • SEALServer

        public SEALServer()
    • Method Detail

      • generateA

        public byte[] generateA()
        this generates the a constant. in a future version we want to generate this together with the clients to prevent misuse
        Returns:
        serialized a constant
      • aggregatePartialPublicKeys

        public PublicKey aggregatePartialPublicKeys​(PublicKey[] partial_public_keys)
        accumulates the given partial public keys into a public key, stores it in ctx and returns it
        Parameters:
        partial_public_keys - an array of partial public keys generated with SEALServer::generatePartialPublicKey
        Returns:
        the aggregated public key
      • accumulateCiphertexts

        public CiphertextMatrix accumulateCiphertexts​(CiphertextMatrix[] ciphertexts)
        accumulates the given ciphertext blocks into a sum ciphertext and returns it
        Parameters:
        ciphertexts - ciphertexts encrypted with the partial public keys
        Returns:
        the accumulated ciphertext (which is the homomorphic sum of ciphertexts)
      • average

        public MatrixObject average​(CiphertextMatrix encrypted_sum,
                                    PlaintextMatrix[] partial_plaintexts)
        averages the partial decryptions
        Parameters:
        encrypted_sum - is the result of accumulateCiphertexts()
        partial_plaintexts - is the result of SEALServer::partiallyDecrypt of each ciphertext fed into accumulateCiphertexts
        Returns:
        the unencrypted, element-wise average of the original matrices