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
Zuc256 implementation.
Based on https://www.is.cas.cn/ztzl2016/zouchongzhi/201801/W020180126529970733243.pdf
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor for streamCipher.protectedZuc256CoreEngine(int pLength) Constructor for Mac.protectedZuc256CoreEngine(Zuc256CoreEngine pSource) Constructor for Memoable. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Create a copy of the engine.Obtain Algorithm Name.protected intObtain Max iterations.voidReset from saved engine state.protected voidsetKeyAndIV(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 Details
-
Zuc256CoreEngine
protected Zuc256CoreEngine()Constructor for streamCipher. -
Zuc256CoreEngine
protected Zuc256CoreEngine(int pLength) Constructor for Mac.- Parameters:
pLength- the Mac length
-
Zuc256CoreEngine
Constructor for Memoable.- Parameters:
pSource- the source engine
-
-
Method Details
-
getMaxIterations
protected int getMaxIterations()Obtain Max iterations.- Overrides:
getMaxIterationsin classZuc128CoreEngine- Returns:
- the maximum iterations
-
getAlgorithmName
Obtain Algorithm Name.- Specified by:
getAlgorithmNamein interfaceStreamCipher- Overrides:
getAlgorithmNamein classZuc128CoreEngine- Returns:
- the name
-
setKeyAndIV
protected void setKeyAndIV(int[] pLFSR, byte[] k, byte[] iv) Process key and IV into LFSR.- Overrides:
setKeyAndIVin classZuc128CoreEngine- Parameters:
pLFSR- the LFSRk- the keyiv- the iv
-
copy
Create a copy of the engine.- Specified by:
copyin interfaceMemoable- Overrides:
copyin classZuc128CoreEngine- Returns:
- the copy
-
reset
Reset from saved engine state.- Specified by:
resetin interfaceMemoable- Overrides:
resetin classZuc128CoreEngine- Parameters:
pState- the state to restore
-