框架初始化

This commit is contained in:
zcy
2025-09-03 15:40:10 +08:00
parent 176b0aa6f6
commit 1b4c192180
12 changed files with 408 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package com.zuc.zuc256;
/**
* ZUC 内部状态LFSR(16x31bit) + R1/R2。
* Java 中用 int 保存(仅低 31 位有效)。
*/
public final class Zuc256State {
public final int[] lfsr = new int[16]; // 线性反馈移位寄存器31bit/项
public int r1; // 32bit working register
public int r2; // 32bit working register
public void reset() {
for (int i = 0; i < lfsr.length; i++) lfsr[i] = 0;
r1 = 0; r2 = 0;
}
}