Package org.apache.sysds.runtime.controlprogram.paramserv.homomorphicEncryption

## Class SEALClient

- java.lang.Object
- - org.apache.sysds.runtime.controlprogram.paramserv.homomorphicEncryption.SEALClient

    public class SEALClient
    extends Object

### Constructor Summary

Constructors
`SEALClient​(byte[] a)`

### Method Summary

All Methods Instance Methods Concrete Methods
`CiphertextMatrix` `encrypt​(MatrixObject plaintext)` encrypts one block of data with public key stored statically and returns it setPublicKey() must have been called before calling this
`PublicKey` `generatePartialPublicKey()` generates a partial public key stores a partial private key corresponding to the partial public key in ctx
`PlaintextMatrix` `partiallyDecrypt​(CiphertextMatrix ciphertext)` partially decrypts ciphertext with the partial private key.
`void` `setPublicKey​(PublicKey public_key)` sets the public key and stores it in ctx

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SEALClient

    public SEALClient​(byte[] a)

### Method Detail

#### generatePartialPublicKey

    public PublicKey generatePartialPublicKey()

generates a partial public key stores a partial private key corresponding to the partial public key in ctx

Returns:
  the partial public key

#### setPublicKey

    public void setPublicKey​(PublicKey public_key)

sets the public key and stores it in ctx

Parameters:
  `public_key` - the public key to set

#### encrypt

    public CiphertextMatrix encrypt​(MatrixObject plaintext)

encrypts one block of data with public key stored statically and returns it setPublicKey() must have been called before calling this

Parameters:
  `plaintext` - the MatrixObject to encrypt
Returns:
  the encrypted matrix

#### partiallyDecrypt

    public PlaintextMatrix partiallyDecrypt​(CiphertextMatrix ciphertext)

partially decrypts ciphertext with the partial private key. generatePartialPublicKey() must have been called before calling this function

Parameters:
  `ciphertext` - the ciphertext to partially decrypt
Returns:
  the partial decryption of ciphertext