MCPcopy Index your code
hub / github.com/bcgit/bc-java / Zuc128Mac

Class Zuc128Mac

core/src/main/java/org/bouncycastle/crypto/macs/Zuc128Mac.java:11–245  ·  view source on GitHub ↗

Zuc128 Mac implementation. Based on https://www.qtc.jp/3GPP/Specs/eea3eia3specificationv16.pdf

Source from the content-addressed store, hash-verified

9 * Based on https://www.qtc.jp/3GPP/Specs/eea3eia3specificationv16.pdf
10 */
11public final class Zuc128Mac
12 implements Mac
13{
14 /**
15 * The Maximum Bit Mask.
16 */
17 private static final int TOPBIT = 0x80;
18
19 /**
20 * The Zuc128 Engine.
21 */
22 private final InternalZuc128Engine theEngine;
23
24 /**
25 * The calculated Mac in words.
26 */
27 private int theMac;
28
29 /**
30 * The active keyStream.
31 */
32 private final int[] theKeyStream;
33
34 /**
35 * The initialised state.
36 */
37 private Zuc128CoreEngine theState;
38
39 /**
40 * The current word index.
41 */
42 private int theWordIndex;
43
44 /**
45 * The current byte index.
46 */
47 private int theByteIndex;
48
49 /**
50 * Constructor.
51 */
52 public Zuc128Mac()
53 {
54 theEngine = new InternalZuc128Engine();
55 theKeyStream = new int[2];
56 }
57
58 /**
59 * Obtain Algorithm Name.
60 *
61 * @return the name
62 */
63 public String getAlgorithmName()
64 {
65 return "Zuc128Mac";
66 }
67
68 /**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected