https://codereview.appspot.com/24250044/diff/80001/src/pkg/crypto/cipher/benchmark_test.go
File src/pkg/crypto/cipher/benchmark_test.go (right):
https://codereview.appspot.com/24250044/diff/80001/src/pkg/crypto/cipher/benchmark_test.go#newcode46
src/pkg/crypto/cipher/benchmark_test.go:46: buf := make([]byte, 1023)
On 2013/12/10 23:10:28, hanwen-google wrote:
AFAICT, the stream ciphers don't have padding. Am I missing something?
Sorry, brain fart. Was thinking that this was a block mode.AFAICT, the stream ciphers don't have padding. Am I missing something?
https://codereview.appspot.com/24250044/diff/80001/src/pkg/crypto/cipher/cfb.go
File src/pkg/crypto/cipher/cfb.go (right):
https://codereview.appspot.com/24250044/diff/80001/src/pkg/crypto/cipher/cfb.go#newcode15
src/pkg/crypto/cipher/cfb.go:15: // We can precompute a larger segment
of the keystream on
On 2013/12/10 23:10:28, hanwen-google wrote:
put my name on it.
In which case I think it's ok to keep the comment as is, but to move itOn 2013/12/10 18:18:10, agl1 wrote:
Is this a TODO?
perhaps? You think I should rather remove the comment? I'm not sure I want toIs this a TODO?
put my name on it.
inside XORKeyStream.
https://codereview.appspot.com/24250044/diff/80001/src/pkg/crypto/cipher/ctr.go
File src/pkg/crypto/cipher/ctr.go (right):
https://codereview.appspot.com/24250044/diff/80001/src/pkg/crypto/cipher/ctr.go#newcode22
src/pkg/crypto/cipher/ctr.go:22: // ? do something for cipher with
blocksz > 512 ?
On 2013/12/10 23:10:28, hanwen-google wrote:
Well, you could handle it in NewCTR by making the cap of |out| equal toOn 2013/12/10 18:18:10, agl1 wrote:
delete comment?
so I can stop worrying about ultra-large blocksizes for now?delete comment?
max(streamBufferSize, block.BlockSize()).
https://codereview.appspot.com/24250044/diff/80001/src/pkg/crypto/cipher/ctr.go#newcode54
src/pkg/crypto/cipher/ctr.go:54: // why not constant time?
On 2013/12/10 23:10:28, hanwen-google wrote:
curious)On 2013/12/10 18:18:10, agl1 wrote:
because the counter values aren't secret dependent.
OK, but they are in GCM? (since gcmInc32 is constant time) (justbecause the counter values aren't secret dependent.
They're not secret in gcm either. The constant time code was probably
force of habit.
https://codereview.appspot.com/24250044/
--
---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.