Package org.bouncycastle.crypto.ec
Class ECFixedTransform
- java.lang.Object
-
- org.bouncycastle.crypto.ec.ECFixedTransform
-
- All Implemented Interfaces:
ECPairFactorTransform
,ECPairTransform
public class ECFixedTransform extends java.lang.Object implements ECPairFactorTransform
this transforms the original randomness used for an ElGamal encryption by a fixed value.
-
-
Constructor Summary
Constructors Constructor Description ECFixedTransform(java.math.BigInteger k)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ECMultiplier
createBasePointMultiplier()
java.math.BigInteger
getTransformValue()
Return the last transform value used by the transformvoid
init(CipherParameters param)
initialise the underlying EC ElGamal engine.ECPair
transform(ECPair cipherText)
Transform an existing cipher text pair using the ElGamal algorithm.
-
-
-
Method Detail
-
init
public void init(CipherParameters param)
initialise the underlying EC ElGamal engine.- Specified by:
init
in interfaceECPairTransform
- Parameters:
param
- the necessary EC key parameters.
-
transform
public ECPair transform(ECPair cipherText)
Transform an existing cipher text 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 interfaceECPairTransform
- 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 transform value used by the transform- Specified by:
getTransformValue
in interfaceECPairFactorTransform
- Returns:
- a BigInteger representing k value.
-
createBasePointMultiplier
protected ECMultiplier createBasePointMultiplier()
-
-