14 years, 4 months ago
(2010-11-19 20:32:53 UTC)
#3
http://codereview.appspot.com/3183043/diff/2001/src/pkg/crypto/cipher/cfb.go
File src/pkg/crypto/cipher/cfb.go (right):
http://codereview.appspot.com/3183043/diff/2001/src/pkg/crypto/cipher/cfb.go#...
src/pkg/crypto/cipher/cfb.go:19: func NewCFB(block Block, iv []byte, decrypt
bool) Stream {
On 2010/11/19 19:58:59, rsc wrote:
> I'd rather have NewCFBEncrypter and NewCFBDecrypter like the others. Even if
> they just call this (unexported) function internally, it's more consistent and
> also avoids the "what does this bool mean?" problem when reading or writing
> calls to NewCFB.
Done.
http://codereview.appspot.com/3183043/diff/2001/src/pkg/crypto/cipher/ocfb.go
File src/pkg/crypto/cipher/ocfb.go (right):
http://codereview.appspot.com/3183043/diff/2001/src/pkg/crypto/cipher/ocfb.go...
src/pkg/crypto/cipher/ocfb.go:16: // feedback mode using the given Block, and
the blockSize + 2 bytes of
On 2010/11/19 19:58:59, rsc wrote:
> It says "the blockSize + 2 bytes of ciphertext prefix"
> but blockSize is not defined and more significantly
> I don't understand what "the prefix" is. Looks like it
> has something to do with randData?
I've taken out the comment about the size of the prefix and simply said that
it's initial amount of ciphertext. It's rather that case that, if you're using a
block cipher mode, you need to know its properties and the function comments are
only a guide to the knowledgeable.
Issue 3183043: code review 3183043: crypto/cipher: add CFB and OCFB mode.
(Closed)
Created 14 years, 4 months ago by agl1
Modified 14 years, 4 months ago
Reviewers:
Base URL:
Comments: 5