rlpx / org.apache.tuweni.rlpx / EthereumIESEncryptionEngine

EthereumIESEncryptionEngine

open class EthereumIESEncryptionEngine (source)

Support class for constructing integrated encryption ciphers for doing basic message exchanges on top of key agreement ciphers. Follows the description given in IEEE Std 1363a.

Constructors

<init>

Set up for use with stream mode, where the key derivation function is used to provide a stream of bytes to xor with the message.

EthereumIESEncryptionEngine(agree: BasicAgreement!, kdf: DerivationFunction!, mac: Mac!, commonMac: ByteArray!)

Set up for use in conjunction with a block cipher to handle the message. It is strongly recommended that the cipher is not in ECB mode.

EthereumIESEncryptionEngine(agree: BasicAgreement!, kdf: DerivationFunction!, mac: Mac!, commonMac: ByteArray!, cipher: BufferedBlockCipher!)

Functions

getCipher

open fun getCipher(): BufferedBlockCipher!

getLengthTag

open fun getLengthTag(p2: ByteArray!): ByteArray!

getMac

open fun getMac(): Mac!

init

Initialise the encryptor.

open fun init(forEncryption: Boolean, privParam: CipherParameters!, pubParam: CipherParameters!, params: CipherParameters!): Unit
open fun init(privateKey: AsymmetricKeyParameter!, params: CipherParameters!, publicKeyParser: KeyParser!): Unit

Initialise the decryptor.

open fun init(publicKey: AsymmetricKeyParameter!, params: CipherParameters!, ephemeralKeyPairGenerator: EphemeralKeyPairGenerator!): Unit

processBlock

open fun processBlock(in: ByteArray!, inOff: Int, inLen: Int): ByteArray!