System information
Appendix B. Calculating Packet Signatures and the Signature Nullifier
B-2
uint2 new_seed = (sig << 1)&0x1FF;
byte null1;
uint2 new_sig = sig;
if(new_seed >= 0x0100)
new_seed++;
null1 = (byte)(0x0100 - (new_seed + (sig >> 8)));
new_sig = calcSigFor(&null1,1,sig);
// now perform the same calculation for the most significant byte
// in the signature. This time we will use the signature that was
// calculated using the first null byte
byte null2;
new_seed = (new_sig << 1)&0x01FF;
if(new_seed >= 0x0100)
new_seed++;
null2 = (byte)(0x0100 - (new_seed + (new_sig >> 8)));
// now form the return value placing null in the most
// significant byte location
uint2 rtn = null1;
rtn <<= 8;
rtn += null2;
return rtn;
}// calcSigNullifier