Class/Object

ksb.csle.didentification.privacy

EncryptionOperator

Related Docs: object EncryptionOperator | package privacy

Permalink

class EncryptionOperator extends BasePrivacyAnonymizer

:: ApplicationDeveloperApi ::

Operator that implements the encryption module in the Pseudo Anonymization algorithm, and encrypts the values of the data using encryption algorithm. Currently, DES (Data Encryption Standard) and AES (Advanced DES) are implemented (key size: 56 (DES), 128 (AES)). Especially, due to the importance of the key generation, it makes the key based on SHA1 and SHA512.

Linear Supertypes
BasePrivacyAnonymizer, DataFrameCheck, BaseDataOperator[StreamOperatorInfo, DataFrame], BaseGenericOperator[StreamOperatorInfo, DataFrame], BaseGenericMutantOperator[StreamOperatorInfo, DataFrame, DataFrame], BaseDoer, Logging, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EncryptionOperator
  2. BasePrivacyAnonymizer
  3. DataFrameCheck
  4. BaseDataOperator
  5. BaseGenericOperator
  6. BaseGenericMutantOperator
  7. BaseDoer
  8. Logging
  9. Serializable
  10. Serializable
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new EncryptionOperator(o: StreamOperatorInfo)

    Permalink

    o

    Object that contains message ksb.csle.common.proto.StreamDidentProto.EncryptionInfo EncryptionInfo contains attributes as follows:

    • selectedColumnId: Column ID to apply the encryption function
    • valColName: Column name to be used as a value column (required)
    • key: the encryption key
    • method: DES or AES (currently, DES is not supported)
    • fieldInfo: the info about column attributes (identifier, sensitive, ..)
    • check: the method how to verify the performance of anonymized data

    EncryptionInfo

    enum EncryptionKey {
    	NORMAL = 0;
    	SHA1 = 1;
    	SHA512 = 2;
    }
    enum EncryptionMethod {
    	DES = 0;
    	AES = 1;
    }
    message EncryptionInfo {
      repeated int32 selectedColumnId = 1;
      required EncryptionKey key = 2 [default = NORMAL];
      required EncryptionMethod method = 3 [default = DES];
      repeated FieldInfo fieldInfo = 4;
      optional PrivacyCheckInfo check = 5;
    }

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def anonymize(src: DataFrame, columnNames: Array[String]): DataFrame

    Permalink
    Definition Classes
    BasePrivacyAnonymizer
  5. def anonymize(src: DataFrame, columnName: String): DataFrame

    Permalink

    Anonymizes the column specified in src dataframe using generic 'Type' method.

    Anonymizes the column specified in src dataframe using generic 'Type' method. The 'Type' is decided by inherited object module.

    src

    Dataframe to anonymize

    columnName

    Column to be anonymized

    returns

    DataFrame The dataframe which replaces original column with anonymized column

    Definition Classes
    BasePrivacyAnonymizer
  6. def anonymizeColumn(src: DataFrame, columnName: String, method: EncryptionMethod): DataFrame

    Permalink
  7. def anonymizeColumn(src: DataFrame, columnName: String): DataFrame

    Permalink

    encrypts the column of src dataframe using defined encryption method.

    encrypts the column of src dataframe using defined encryption method.

    src

    Dataframe to anonymize

    columnName

    Column to be pseudo-anonymized

    returns

    DataFrame Anonymized dataframe

    Definition Classes
    EncryptionOperatorBasePrivacyAnonymizer
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def deAnonymize(src: DataFrame, columnName: String, method: EncryptionMethod): DataFrame

    Permalink
  11. def deAnonymize(src: DataFrame, columnName: String): DataFrame

    Permalink

    De-anonymizes the anonymized dataframe using defined encryption method

    De-anonymizes the anonymized dataframe using defined encryption method

    src

    Dataframe to de-anonymize

    columnName

    Column name to be de-anonymized

    returns

    DataFrame The de-anonymized dataframe

  12. def decrypt(bytes: Array[Byte], b64secret: String, algo: String): Array[Byte]

    Permalink

    Decrypts the given array of encrypted bytes

    Decrypts the given array of encrypted bytes

    bytes

    the array of bytes in the value to be de-anonymized.

    b64secret

    key to anonymize

    algo

    the anonymization method to apply (AES, DES)

    returns

    Array[Byte] The array of bytes in the deanonymized value

  13. def encrypt(bytes: Array[Byte], b64secret: String, algo: String): Array[Byte]

    Permalink

    Encrypts the given array of bytes

    Encrypts the given array of bytes

    bytes

    the array of bytes in the value to anonymize.

    b64secret

    key to anonymize

    algo

    the anonymization method to apply (AES, DES)

    returns

    Array[Byte] The array of bytes in the anonymized value

  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def getColumnName(src: DataFrame, columnId: Int): String

    Permalink

    Returns column name from src dataframe specified by the column ID defined by protobuf.

    Returns column name from src dataframe specified by the column ID defined by protobuf.

    src

    dataframe to get names of columns.

    columnId

    column ID to anonymize.

    returns

    String.

    Definition Classes
    DataFrameCheck
  19. def getColumnNames(src: DataFrame, columnIDs: Array[Int]): Array[String]

    Permalink

    Returns column names from src dataframe specified by column IDs.

    Returns column names from src dataframe specified by column IDs. Note that the column with invalid IDs are ignored.

    src

    dataframe to get names of columns.

    returns

    Array[String].

    Definition Classes
    DataFrameCheck
  20. def getQuasiColumnIDs(fieldInfos: Array[FieldInfo]): Array[Int]

    Permalink
    Definition Classes
    DataFrameCheck
  21. def getSensColumnIDs(fieldInfos: Array[FieldInfo]): Array[Int]

    Permalink
    Definition Classes
    DataFrameCheck
  22. def getValidColumnIDs(src: DataFrame, columnIDs: Array[Int]): Array[Int]

    Permalink
    Definition Classes
    DataFrameCheck
  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. def isValidColumnID(src: DataFrame, columnID: Int): Boolean

    Permalink

    Checks the given column ID is valid.

    Checks the given column ID is valid.

    src

    dataframe to get names of columns.

    returns

    Boolean.

    Definition Classes
    DataFrameCheck
  26. def isValidColumnName(src: DataFrame, columnName: String): Boolean

    Permalink

    Checks the given column Name is valid.

    Checks the given column Name is valid.

    src

    dataframe to get names of columns.

    columnName

    column Name.

    returns

    Boolean.

    Definition Classes
    DataFrameCheck
  27. var key: String

    Permalink
  28. val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  29. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  30. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. def operate(df: DataFrame): DataFrame

    Permalink
    Definition Classes
    EncryptionOperator → BaseGenericOperator → BaseGenericMutantOperator
  33. val p: EncryptionInfo

    Permalink
  34. val privacy: PrivacyCheckInfo

    Permalink
    Definition Classes
    BasePrivacyAnonymizer
  35. def stop: Unit

    Permalink
    Definition Classes
    BaseGenericOperator → BaseGenericMutantOperator
  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  37. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  38. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from BasePrivacyAnonymizer

Inherited from DataFrameCheck

Inherited from BaseDataOperator[StreamOperatorInfo, DataFrame]

Inherited from BaseGenericOperator[StreamOperatorInfo, DataFrame]

Inherited from BaseGenericMutantOperator[StreamOperatorInfo, DataFrame, DataFrame]

Inherited from BaseDoer

Inherited from Logging

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped