Package org.bouncycastle.crypto.engines
Class Zuc256CoreEngine
- java.lang.Object
-
- org.bouncycastle.crypto.engines.Zuc128CoreEngine
-
- org.bouncycastle.crypto.engines.Zuc256CoreEngine
-
- All Implemented Interfaces:
StreamCipher
,Memoable
- Direct Known Subclasses:
Zuc256Engine
public class Zuc256CoreEngine extends Zuc128CoreEngine
Zuc256 implementation. Based on https://www.is.cas.cn/ztzl2016/zouchongzhi/201801/W020180126529970733243.pdf
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Zuc256CoreEngine()
Constructor for streamCipher.protected
Zuc256CoreEngine(int pLength)
Constructor for Mac.protected
Zuc256CoreEngine(Zuc256CoreEngine pSource)
Constructor for Memoable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Memoable
copy()
Create a copy of the engine.java.lang.String
getAlgorithmName()
Obtain Algorithm Name.protected int
getMaxIterations()
Obtain Max iterations.void
reset(Memoable pState)
Reset from saved engine state.protected void
setKeyAndIV(int[] pLFSR, byte[] k, byte[] iv)
Process key and IV into LFSR.-
Methods inherited from class org.bouncycastle.crypto.engines.Zuc128CoreEngine
encode32be, init, makeKeyStreamWord, processBytes, reset, returnByte
-
-
-
-
Constructor Detail
-
Zuc256CoreEngine
protected Zuc256CoreEngine()
Constructor for streamCipher.
-
Zuc256CoreEngine
protected Zuc256CoreEngine(int pLength)
Constructor for Mac.- Parameters:
pLength
- the Mac length
-
Zuc256CoreEngine
protected Zuc256CoreEngine(Zuc256CoreEngine pSource)
Constructor for Memoable.- Parameters:
pSource
- the source engine
-
-
Method Detail
-
getMaxIterations
protected int getMaxIterations()
Obtain Max iterations.- Overrides:
getMaxIterations
in classZuc128CoreEngine
- Returns:
- the maximum iterations
-
getAlgorithmName
public java.lang.String getAlgorithmName()
Obtain Algorithm Name.- Specified by:
getAlgorithmName
in interfaceStreamCipher
- Overrides:
getAlgorithmName
in classZuc128CoreEngine
- Returns:
- the name
-
setKeyAndIV
protected void setKeyAndIV(int[] pLFSR, byte[] k, byte[] iv)
Process key and IV into LFSR.- Overrides:
setKeyAndIV
in classZuc128CoreEngine
- Parameters:
pLFSR
- the LFSRk
- the keyiv
- the iv
-
copy
public Memoable copy()
Create a copy of the engine.- Specified by:
copy
in interfaceMemoable
- Overrides:
copy
in classZuc128CoreEngine
- Returns:
- the copy
-
reset
public void reset(Memoable pState)
Reset from saved engine state.- Specified by:
reset
in interfaceMemoable
- Overrides:
reset
in classZuc128CoreEngine
- Parameters:
pState
- the state to restore
-
-