Update comments

pull/681/head^2
Jeffrey Walton 2018-07-06 00:35:01 -04:00
parent 97a1e8cae2
commit 30b304b0f1
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
3 changed files with 37 additions and 25 deletions

View File

@ -225,8 +225,11 @@ void HC128Policy::OperateKeystream(KeystreamOperation operation, byte *output, c
PutWord(false, LITTLE_ENDIAN_ORDER, output + 60, keystream[15]); PutWord(false, LITTLE_ENDIAN_ORDER, output + 60, keystream[15]);
// If AdditiveCipherTemplate does not have an accumulated keystream // If AdditiveCipherTemplate does not have an accumulated keystream
// then it will ask OperateKeystream to XOR the plaintext with // then it will ask OperateKeystream to generate one. Optionally it
// the keystream and write it to the ciphertext buffer. // will ask for an XOR of the input with the keystream while
// writing the result to the output buffer. In all cases the
// output buffer is written. The optional part is adding the
// input buffer and keystream.
if ((operation & INPUT_NULL) != INPUT_NULL) if ((operation & INPUT_NULL) != INPUT_NULL)
xorbuf(output, input, 64); xorbuf(output, input, 64);

View File

@ -100,8 +100,11 @@ void HC256Policy::OperateKeystream(KeystreamOperation operation, byte *output, c
PutWord(false, LITTLE_ENDIAN_ORDER, out, Generate()); PutWord(false, LITTLE_ENDIAN_ORDER, out, Generate());
// If AdditiveCipherTemplate does not have an accumulated keystream // If AdditiveCipherTemplate does not have an accumulated keystream
// then it will ask OperateKeystream to XOR the plaintext with // then it will ask OperateKeystream to generate one. Optionally it
// the keystream and write it to the ciphertext buffer. // will ask for an XOR of the input with the keystream while
// writing the result to the output buffer. In all cases the
// output buffer is written. The optional part is adding the
// input buffer and keystream.
if ((operation & INPUT_NULL) != INPUT_NULL) if ((operation & INPUT_NULL) != INPUT_NULL)
xorbuf(output, input, msglen); xorbuf(output, input, msglen);
} }

View File

@ -137,8 +137,11 @@ void RabbitPolicy::OperateKeystream(KeystreamOperation operation, byte *output,
} }
// If AdditiveCipherTemplate does not have an accumulated keystream // If AdditiveCipherTemplate does not have an accumulated keystream
// then it will ask OperateKeystream to XOR the plaintext with // then it will ask OperateKeystream to generate one. Optionally it
// the keystream and write it to the ciphertext buffer. // will ask for an XOR of the input with the keystream while
// writing the result to the output buffer. In all cases the
// output buffer is written. The optional part is adding the
// input buffer and keystream.
if ((operation & INPUT_NULL) != INPUT_NULL) if ((operation & INPUT_NULL) != INPUT_NULL)
xorbuf(output, input, GetBytesPerIteration() * iterationCount); xorbuf(output, input, GetBytesPerIteration() * iterationCount);
} }
@ -235,8 +238,11 @@ void RabbitWithIVPolicy::OperateKeystream(KeystreamOperation operation, byte *ou
} }
// If AdditiveCipherTemplate does not have an accumulated keystream // If AdditiveCipherTemplate does not have an accumulated keystream
// then it will ask OperateKeystream to XOR the plaintext with // then it will ask OperateKeystream to generate one. Optionally it
// the keystream and write it to the ciphertext buffer. // will ask for an XOR of the input with the keystream while
// writing the result to the output buffer. In all cases the
// output buffer is written. The optional part is adding the
// input buffer and keystream.
if ((operation & INPUT_NULL) != INPUT_NULL) if ((operation & INPUT_NULL) != INPUT_NULL)
xorbuf(output, input, GetBytesPerIteration() * iterationCount); xorbuf(output, input, GetBytesPerIteration() * iterationCount);
} }