diff --git a/drbg/ctr_drbg.go b/drbg/ctr_drbg.go index 5f0d23c..97bd238 100644 --- a/drbg/ctr_drbg.go +++ b/drbg/ctr_drbg.go @@ -34,8 +34,6 @@ type CtrDrbg struct { func NewCtrDrbg() *CtrDrbg { var c = new(CtrDrbg) - // Security strength for AES-256 as per SP800-57, 5.6.1 - c.strength = 256 return c } @@ -59,6 +57,9 @@ func (c *CtrDrbg) Init(entropy, personalization []byte) bool { return false } + // Security strength for AES-256 as per SP800-57, 5.6.1 + c.strength = 256 + lsz = len(entropy) if lsz > SeedLen { lsz = SeedLen diff --git a/hash/sha3/doc.go b/hash/sha3/doc.go index a0ee3ae..7bad1c2 100644 --- a/hash/sha3/doc.go +++ b/hash/sha3/doc.go @@ -63,4 +63,4 @@ // They produce output of the same length, with the same security strengths // against all attacks. This means, in particular, that SHA3-256 only has // 128-bit collision resistance, because its output length is 32 bytes. -package sha3 // import "golang.org/x/crypto/sha3" +package sha3 // import "github.com/henrydcase/nobs/hash/sha3"