临时存储
This commit is contained in:
@@ -371,12 +371,13 @@ public class Zuc256Core {
|
||||
state.LFSR_lo[15] = tmp[0]; state.LFSR_hi[15] = tmp[1];
|
||||
|
||||
|
||||
short c15_2 = 0;
|
||||
for (short i = 0; i < 32; i++) {
|
||||
// BitReconstruction3
|
||||
// X0 = ((LFSR[15] & 0x7FFF8000) << 1) | (LFSR[14] & 0xFFFF);
|
||||
// X0 = ((L15 & 0x7FFF8000)<<1) | (L14 & 0xFFFF)
|
||||
short c15 = (short)((state.LFSR_lo[15] & (short)0x8000) >>> 15);
|
||||
X0[1] = (short)(((state.LFSR_hi[15] & (short)0x7FFF) << 1) | c15);
|
||||
c15_2 = (short)((state.LFSR_lo[15] & (short)0x8000) >>> 15);
|
||||
X0[1] = (short)(((state.LFSR_hi[15] & (short)0x7FFF) << 1) | (short)(c15_2 & 0x0001));
|
||||
X0[0] = state.LFSR_lo[14];
|
||||
|
||||
// X1 = ((LFSR[11] & 0xFFFF) << 16) | (LFSR[9] >>> 15);
|
||||
@@ -459,7 +460,7 @@ public class Zuc256Core {
|
||||
|
||||
// v = add31(v, W >>> 1);
|
||||
shr32u1(W[0], W[1], T2); // T2[0]=lo, T2[1]=hi(无符号>>>1)
|
||||
T2[1] = (short)(T2[1] & 0x7FFF); // 只保留31位
|
||||
T2[1] = (short)(T2[1] & (short)0xFFFF); // 只保留31位
|
||||
add31(V[0], V[1], T2[0], T2[1], V);
|
||||
|
||||
// System.arraycopy(state.LFSR, 1, state.LFSR, 0, 15)
|
||||
|
||||
Reference in New Issue
Block a user