Table of Contents

Class XSalsa20Engine

Namespace
Org.BouncyCastle.Crypto.Engines
Assembly
BouncyCastle.Cryptography.dll

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

public class XSalsa20Engine : Salsa20Engine, IStreamCipher
Inheritance
XSalsa20Engine
Implements
Inherited Members

Remarks

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

Properties

AlgorithmName

The name of the algorithm this cipher implements.

public override string AlgorithmName { get; }

Property Value

string

NonceSize

protected override int NonceSize { get; }

Property Value

int

Methods

SetKey(byte[], byte[])

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.

protected override void SetKey(byte[] keyBytes, byte[] ivBytes)

Parameters

keyBytes byte[]
ivBytes byte[]