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

public Class Zuc256CoreEngine

extends Zuc128CoreEngine
Class Inheritance
Known Direct Subclasses
org.bouncycastle.crypto.engines.Zuc256Engine, org.bouncycastle.crypto.macs.Zuc256Mac.InternalZuc256Engine
Imports
org.bouncycastle.util.Memoable

Zuc256 implementation. Based on https://www.is.cas.cn/ztzl2016/zouchongzhi/201801/W020180126529970733243.pdf

Field Summary

Modifier and TypeField and Description
private static final byte[]
private static final byte[]
private static final byte[]
private static final byte[]
private byte[]
theD

The selected D constants.

Constructor Summary

AccessConstructor and Description
protected
Zuc256CoreEngine()

Constructor for streamCipher.

protected
Zuc256CoreEngine(final int
the Mac length
pLength
)

Constructor for Mac.

protected
Zuc256CoreEngine(final Zuc256CoreEngine
the source engine
pSource
)

Constructor for Memoable.

Method Summary

Modifier and TypeMethod and Description
public Memoable

Returns:

the copy
copy
()

Overrides org.bouncycastle.crypto.engines.Zuc128CoreEngine.copy.

Implements org.bouncycastle.util.Memoable.copy.

Create a copy of the engine.
public String
protected int

Returns:

the maximum iterations
getMaxIterations
()

Overrides org.bouncycastle.crypto.engines.Zuc128CoreEngine.getMaxIterations.

Obtain Max iterations.
private static int

Returns:

the built integer
MAKEU31
(byte
part A
a
,
byte
part B
b
,
byte
part C
c
,
byte
part D
d
)

Build a 31-bit integer from constituent parts.

public void
reset(final Memoable
the state to restore
pState
)

Overrides org.bouncycastle.crypto.engines.Zuc128CoreEngine.reset.

Implements org.bouncycastle.util.Memoable.reset.

Reset from saved engine state.
protected void
setKeyAndIV(final int[]
the LFSR
pLFSR
,
final byte[]
the key
k
,
final byte[]
the iv
iv
)

Overrides org.bouncycastle.crypto.engines.Zuc128CoreEngine.setKeyAndIV.

Process key and IV into LFSR.
Inherited from org.bouncycastle.crypto.engines.Zuc128CoreEngine:
encode32beFinitmakeKeyStreamWordprocessBytesresetreturnByteROT

Field Detail

EK_dback to summary
private static final byte[] EK_d

Hides org.bouncycastle.crypto.engines.Zuc128CoreEngine.EK_d.

EK_d128back to summary
private static final byte[] EK_d128
EK_d32back to summary
private static final byte[] EK_d32
EK_d64back to summary
private static final byte[] EK_d64
theDback to summary
private byte[] theD

The selected D constants.

Constructor Detail

Zuc256CoreEngineback to summary
protected Zuc256CoreEngine()

Constructor for streamCipher.

Zuc256CoreEngineback to summary
protected Zuc256CoreEngine(final int pLength)

Constructor for Mac.

Parameters
pLength:int

the Mac length

Zuc256CoreEngineback to summary
protected Zuc256CoreEngine(final Zuc256CoreEngine pSource)

Constructor for Memoable.

Parameters
pSource:Zuc256CoreEngine

the source engine

Method Detail

copyback to summary
public Memoable copy()

Overrides org.bouncycastle.crypto.engines.Zuc128CoreEngine.copy.

Implements org.bouncycastle.util.Memoable.copy.

Create a copy of the engine.

Returns:Memoable

the copy

getAlgorithmNameback to summary
public String getAlgorithmName()

Overrides org.bouncycastle.crypto.engines.Zuc128CoreEngine.getAlgorithmName.

Implements org.bouncycastle.crypto.StreamCipher.getAlgorithmName.

Obtain Algorithm Name.

Returns:String

the name

getMaxIterationsback to summary
protected int getMaxIterations()

Overrides org.bouncycastle.crypto.engines.Zuc128CoreEngine.getMaxIterations.

Obtain Max iterations.

Returns:int

the maximum iterations

MAKEU31back to summary
private static int MAKEU31(byte a, byte b, byte c, byte d)

Build a 31-bit integer from constituent parts.

Parameters
a:byte

part A

b:byte

part B

c:byte

part C

d:byte

part D

Returns:int

the built integer

resetback to summary
public void reset(final Memoable pState)

Overrides org.bouncycastle.crypto.engines.Zuc128CoreEngine.reset.

Implements org.bouncycastle.util.Memoable.reset.

Reset from saved engine state.

Parameters
pState:Memoable

the state to restore

setKeyAndIVback to summary
protected void setKeyAndIV(final int[] pLFSR, final byte[] k, final byte[] iv)

Overrides org.bouncycastle.crypto.engines.Zuc128CoreEngine.setKeyAndIV.

Process key and IV into LFSR.

Parameters
pLFSR:int[]

the LFSR

k:byte[]

the key

iv:byte[]

the iv