org.bouncycastle.crypto.ec

## Class ECNewRandomnessTransform

- java.lang.Object
- - org.bouncycastle.crypto.ec.ECNewRandomnessTransform

- All Implemented Interfaces:
    ECPairFactorTransform, ECPairTransform

      public class ECNewRandomnessTransform
      extends java.lang.Object
      implements ECPairFactorTransform

  this transforms the original randomness used for an ElGamal encryption.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ECNewRandomnessTransform()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected ECMultiplier` | `createBasePointMultiplier()`
    `java.math.BigInteger` | `getTransformValue()` Return the last random value generated for a transform
    `void` | `init(CipherParameters param)` initialise the underlying EC ElGamal engine.
    `ECPair` | `transform(ECPair cipherText)` Transform an existing cipher test pair using the ElGamal algorithm.

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

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

- - ### Constructor Detail

    - #### ECNewRandomnessTransform

          public ECNewRandomnessTransform()

  - ### Method Detail

    - #### init

          public void init(CipherParameters param)

      initialise the underlying EC ElGamal engine.
      Specified by:
        `init` in interface `ECPairTransform`
      Parameters:
        `param` - the necessary EC key parameters.

    - #### transform

          public ECPair transform(ECPair cipherText)

      Transform an existing cipher test pair using the ElGamal algorithm. Note: it is assumed this transform has been initialised with the same public key that was used to create the original cipher text.
      Specified by:
        `transform` in interface `ECPairTransform`
      Parameters:
        `cipherText` - the EC point to process.
      Returns:
        returns a new ECPair representing the result of the process.

    - #### getTransformValue

          public java.math.BigInteger getTransformValue()

      Return the last random value generated for a transform
      Specified by:
        `getTransformValue` in interface `ECPairFactorTransform`
      Returns:
        a BigInteger representing the last random value.

    - #### createBasePointMultiplier

          protected ECMultiplier createBasePointMultiplier()