Top Description Fields Constructors Methods
org.bouncycastle.crypto.engines

public Class XSalsa20Engine

extends Salsa20Engine
Class Inheritance
Imports
org.bouncycastle.util.Pack

Implementation of Daniel J. Bernstein's XSalsa20 stream cipher - Salsa20 with an extended nonce.

XSalsa20 requires a 256 bit key, and a 192 bit nonce.

Field Summary

Inherited from org.bouncycastle.crypto.engines.Salsa20Engine:
DEFAULT_ROUNDSengineStateroundssigmataux

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
protected int
protected void
setKey(byte[] keyBytes, byte[] ivBytes)

Overrides org.bouncycastle.crypto.engines.Salsa20Engine.setKey.

XSalsa20 key generation: process 256 bit input key and 128 bits of the input nonce using a core Salsa20 function without input addition to produce 256 bit working key and use that with the remaining 64 bits of nonce to initialize a standard Salsa20 engine state.
Inherited from org.bouncycastle.crypto.engines.Salsa20Engine:
advanceCounteradvanceCountergenerateKeyStreamgetCountergetPositioninitpackTauOrSigmaprocessBytesresetresetCounterretreatCounterretreatCounterreturnBytesalsaCoreseekToskip

Constructor Detail

XSalsa20Engineback to summary
public XSalsa20Engine()

Method Detail

getAlgorithmNameback to summary
public String getAlgorithmName()

Overrides org.bouncycastle.crypto.engines.Salsa20Engine.getAlgorithmName.

Implements org.bouncycastle.crypto.StreamCipher.getAlgorithmName.

Doc from org.bouncycastle.crypto.StreamCipher.getAlgorithmName.

Return the name of the algorithm the cipher implements.

Returns:String

the name of the algorithm the cipher implements.

getNonceSizeback to summary
protected int getNonceSize()

Overrides org.bouncycastle.crypto.engines.Salsa20Engine.getNonceSize.

setKeyback to summary
protected void setKey(byte[] keyBytes, byte[] ivBytes)

Overrides org.bouncycastle.crypto.engines.Salsa20Engine.setKey.

XSalsa20 key generation: process 256 bit input key and 128 bits of the input nonce using a core Salsa20 function without input addition to produce 256 bit working key and use that with the remaining 64 bits of nonce to initialize a standard Salsa20 engine state.