Preparing report...

Report for github.com/nobuenhombre/go-crypto-gost

(v0.0.0-20220225123422-5d8e43ef86b1)

A+    Excellent!    Found 67 issues across 112 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo99%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.


golint41%

Golint is a linter for Go source code.

    • pkg/prfplus/plus.go
    • Line 18: warning: exported type PRFForPlus should have comment or be unexported (golint)
    • Line 23: warning: comment on exported function PRFPlus should be of the form "PRFPlus ..." (golint)
    • pkg/gost28147/cipher.go
    • Line 16: warning: package comment should be of the form "Package gost28147 ..." (golint)
    • Line 21: warning: exported const BlockSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported var SeqEncrypt should have comment or be unexported (golint)
    • Line 54: warning: exported type Cipher should have comment or be unexported (golint)
    • Line 60: warning: exported function NewCipher should have comment or be unexported (golint)
    • Line 79: warning: exported method Cipher.BlockSize should have comment or be unexported (golint)
    • pkg/crypto-message/oids/hash/hash.go
    • Line 23: warning: exported type Function should have comment or be unexported (golint)
    • Line 26: warning: exported const UnknownHashFunction should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: comment on exported method Function.IsActual should be of the form "IsActual ..." (golint)
    • Line 43: warning: comment on exported method Function.CryptoHash should be of the form "CryptoHash ..." (golint)
    • Line 61: warning: comment on exported method Function.New should be of the form "New ..." (golint)
    • Line 100: warning: comment on exported function Get should be of the form "Get ..." (golint)
    • pkg/crypto-message/oids/oids.go
    • Line 15: warning: exported type ID should have comment or be unexported (golint)
    • Line 18: warning: exported const Unknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 136: warning: comment on exported function GetID should be of the form "GetID ..." (golint)
    • Line 150: warning: comment on exported function Get should be of the form "Get ..." (golint)
    • internal/app/sign-gost-3410/gogost.go
    • Line 17: warning: exported function GetDigest should have comment or be unexported (golint)
    • Line 31: warning: exported function GeneratePrivateKey should have comment or be unexported (golint)
    • Line 47: warning: exported function ExtractPublicKeyGOST should have comment or be unexported (golint)
    • pkg/gogost/gogost.go
    • Line 1: warning: package comment should be of the form "Package gogost ..." (golint)
    • Line 4: warning: exported const Version should have comment or be unexported (golint)
    • pkg/crypto-message/containers/certificate/certificate.go
    • Line 26: warning: exported type Service should have comment or be unexported (golint)
    • Line 35: warning: exported type Container should have comment or be unexported (golint)
    • Line 97: warning: exported method Container.IsValidOnDate should have comment or be unexported (golint)
    • Line 108: warning: exported method Container.GetSource should have comment or be unexported (golint)
    • pkg/gost28147/ecb.go
    • Line 18: warning: exported type ECBEncrypter should have comment or be unexported (golint)
    • Line 22: warning: exported method Cipher.NewECBEncrypter should have comment or be unexported (golint)
    • Line 27: warning: exported method ECBEncrypter.CryptBlocks should have comment or be unexported (golint)
    • Line 33: warning: exported method ECBEncrypter.BlockSize should have comment or be unexported (golint)
    • Line 37: warning: exported type ECBDecrypter should have comment or be unexported (golint)
    • Line 41: warning: exported method Cipher.NewECBDecrypter should have comment or be unexported (golint)
    • Line 46: warning: exported method ECBDecrypter.CryptBlocks should have comment or be unexported (golint)
    • Line 52: warning: exported method ECBDecrypter.BlockSize should have comment or be unexported (golint)
    • pkg/gost3410/params.go
    • Line 21: warning: exported var CurveGostR34102001ParamSetcc should have comment or be unexported (golint)
    • Line 69: warning: comment on exported var CurveIdGostR34102001TestParamSet should be of the form "CurveIdGostR34102001TestParamSet ..." (golint)
    • Line 118: warning: comment on exported var CurveIdtc26gost341012256paramSetA should be of the form "CurveIdtc26gost341012256paramSetA ..." (golint)
    • Line 172: warning: comment on exported var CurveIdtc26gost341012256paramSetB should be of the form "CurveIdtc26gost341012256paramSetB ..." (golint)
    • Line 221: warning: comment on exported var CurveIdtc26gost341012256paramSetC should be of the form "CurveIdtc26gost341012256paramSetC ..." (golint)
    • Line 270: warning: comment on exported var CurveIdtc26gost341012256paramSetD should be of the form "CurveIdtc26gost341012256paramSetD ..." (golint)
    • Line 319: warning: comment on exported var CurveIdtc26gost341012512paramSetTest should be of the form "CurveIdtc26gost341012512paramSetTest ..." (golint)
    • Line 383: warning: comment on exported var CurveIdtc26gost341012512paramSetA should be of the form "CurveIdtc26gost341012512paramSetA ..." (golint)
    • Line 456: warning: comment on exported var CurveIdtc26gost341012512paramSetB should be of the form "CurveIdtc26gost341012512paramSetB ..." (golint)
    • Line 529: warning: comment on exported var CurveIdtc26gost341012512paramSetC should be of the form "CurveIdtc26gost341012512paramSetC ..." (golint)
    • Line 614: warning: comment on exported var CurveIdGostR34102001CryptoProAParamSet should be of the form "CurveIdGostR34102001CryptoProAParamSet ..." (golint)
    • Line 620: warning: comment on exported var CurveIdGostR34102001CryptoProBParamSet should be of the form "CurveIdGostR34102001CryptoProBParamSet ..." (golint)
    • Line 626: warning: comment on exported var CurveIdGostR34102001CryptoProCParamSet should be of the form "CurveIdGostR34102001CryptoProCParamSet ..." (golint)
    • Line 632: warning: comment on exported var CurveIdGostR34102001CryptoProXchAParamSet should be of the form "CurveIdGostR34102001CryptoProXchAParamSet ..." (golint)
    • Line 638: warning: comment on exported var CurveIdGostR34102001CryptoProXchBParamSet should be of the form "CurveIdGostR34102001CryptoProXchBParamSet ..." (golint)
    • Line 644: warning: comment on exported var CurveIdtc26gost34102012256paramSetA should be of the form "CurveIdtc26gost34102012256paramSetA ..." (golint)
    • Line 650: warning: comment on exported var CurveIdtc26gost34102012256paramSetB should be of the form "CurveIdtc26gost34102012256paramSetB ..." (golint)
    • Line 656: warning: comment on exported var CurveIdtc26gost34102012256paramSetC should be of the form "CurveIdtc26gost34102012256paramSetC ..." (golint)
    • Line 662: warning: comment on exported var CurveIdtc26gost34102012256paramSetD should be of the form "CurveIdtc26gost34102012256paramSetD ..." (golint)
    • Line 668: warning: comment on exported var CurveIdtc26gost34102012512paramSetTest should be of the form "CurveIdtc26gost34102012512paramSetTest ..." (golint)
    • Line 674: warning: comment on exported var CurveIdtc26gost34102012512paramSetA should be of the form "CurveIdtc26gost34102012512paramSetA ..." (golint)
    • Line 680: warning: comment on exported var CurveIdtc26gost34102012512paramSetB should be of the form "CurveIdtc26gost34102012512paramSetB ..." (golint)
    • Line 686: warning: comment on exported var CurveIdtc26gost34102012512paramSetC should be of the form "CurveIdtc26gost34102012512paramSetC ..." (golint)
    • pkg/gost34112012256/kdf.go
    • Line 23: warning: exported type KDF should have comment or be unexported (golint)
    • Line 27: warning: exported function NewKDF should have comment or be unexported (golint)
    • Line 31: warning: exported method KDF.Derive should have comment or be unexported (golint)
    • pkg/crypto-message/containers/containers.go
    • Line 9: warning: exported const Certificate should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: comment on exported type PEM should be of the form "PEM ..." (with optional leading article) (golint)
    • Line 27: warning: comment on exported type DER should be of the form "DER ..." (with optional leading article) (golint)
    • Line 34: warning: comment on exported type TrailingDataError should be of the form "TrailingDataError ..." (with optional leading article) (golint)
    • Line 47: warning: comment on exported method TrailingDataError.Is should be of the form "Is ..." (golint)
    • pkg/gost34112012256/esptree.go
    • Line 22: warning: exported type ESPTree should have comment or be unexported (golint)
    • Line 28: warning: exported function NewESPTree should have comment or be unexported (golint)
    • Line 40: warning: exported method ESPTree.DeriveCached should have comment or be unexported (golint)
    • Line 55: warning: exported method ESPTree.Derive should have comment or be unexported (golint)
    • pkg/gost3410/vko2012.go
    • Line 25: warning: comment on exported method PrivateKey.KEK2012256 should be of the form "KEK2012256 ..." (golint)
    • Line 39: warning: comment on exported method PrivateKey.KEK2012512 should be of the form "KEK2012512 ..." (golint)
    • pkg/gost341194/hash.go
    • Line 16: warning: package comment should be of the form "Package gost341194 ..." (golint)
    • Line 28: warning: exported const BlockSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported var SboxDefault should have comment or be unexported (golint)
    • Line 57: warning: exported type Hash should have comment or be unexported (golint)
    • Line 66: warning: exported function New should have comment or be unexported (golint)
    • Line 72: warning: exported method Hash.Reset should have comment or be unexported (golint)
    • Line 84: warning: exported method Hash.BlockSize should have comment or be unexported (golint)
    • Line 88: warning: exported method Hash.Size should have comment or be unexported (golint)
    • Line 248: warning: exported method Hash.Sum should have comment or be unexported (golint)
    • pkg/mgm/mode.go
    • Line 16: warning: package comment should be of the form "Package mgm ..." (golint)
    • Line 26: warning: exported type Mul should have comment or be unexported (golint)
    • Line 30: warning: exported type MGM should have comment or be unexported (golint)
    • Line 43: warning: exported function NewMGM should have comment or be unexported (golint)
    • Line 70: warning: exported method MGM.NonceSize should have comment or be unexported (golint)
    • Line 74: warning: exported method MGM.Overhead should have comment or be unexported (golint)
    • Line 193: warning: exported method MGM.Seal should have comment or be unexported (golint)
    • Line 210: warning: exported method MGM.Open should have comment or be unexported (golint)
    • pkg/gost34112012512/hash.go
    • Line 16: warning: package comment should be of the form "Package gost34112012512 ..." (golint)
    • Line 27: warning: exported const BlockSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported function New should have comment or be unexported (golint)
    • pkg/gost3413/padding.go
    • Line 16: warning: package comment should be of the form "Package gost3413 ..." (golint)
    • Line 19: warning: exported function PadSize should have comment or be unexported (golint)
    • Line 29: warning: exported function Pad1 should have comment or be unexported (golint)
    • Line 37: warning: exported function Pad2 should have comment or be unexported (golint)
    • Line 43: warning: exported function Pad3 should have comment or be unexported (golint)
    • pkg/gost3410/edwards.go
    • Line 22: warning: exported method Curve.IsEdwards should have comment or be unexported (golint)
    • Line 26: warning: exported method Curve.EdwardsST should have comment or be unexported (golint)
    • Line 49: warning: comment on exported function XY2UV should be of the form "XY2UV ..." (golint)
    • Line 72: warning: comment on exported function UV2XY should be of the form "UV2XY ..." (golint)
    • pkg/crypto-message/services/sign/sign.go
    • Line 13: warning: exported type Service should have comment or be unexported (golint)
    • Line 17: warning: exported type Config should have comment or be unexported (golint)
    • Line 19: warning: exported function New should have comment or be unexported (golint)
    • Line 23: warning: exported method Config.Sign should have comment or be unexported (golint)
    • pkg/gost34112012256/tlstree.go
    • Line 22: warning: exported type TLSTreeParams should have comment or be unexported (golint)
    • Line 25: warning: exported var TLSGOSTR341112256WithMagmaCTROMAC should have comment or be unexported (golint)
    • Line 57: warning: exported type TLSTree should have comment or be unexported (golint)
    • Line 65: warning: exported function NewTLSTree should have comment or be unexported (golint)
    • Line 76: warning: exported method TLSTree.DeriveCached should have comment or be unexported (golint)
    • Line 94: warning: exported method TLSTree.Derive should have comment or be unexported (golint)
    • pkg/gost3410/public.go
    • Line 24: warning: exported type PublicKey should have comment or be unexported (golint)
    • Line 30: warning: exported function NewPublicKey should have comment or be unexported (golint)
    • Line 46: warning: exported method PublicKey.Raw should have comment or be unexported (golint)
    • Line 56: warning: exported method PublicKey.VerifyDigest should have comment or be unexported (golint)
    • Line 112: warning: exported method PublicKey.Equal should have comment or be unexported (golint)
    • Line 112: warning: receiver name our should be consistent with previous receiver name pub for PublicKey (golint)
    • pkg/crypto-message/oids/algorithm/public-key-algorithm/public-key-algorithm.go
    • Line 14: warning: exported type PublicKeyAlgorithm should have comment or be unexported (golint)
    • Line 17: warning: exported const UnknownAlgorithm should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: comment on exported method PublicKeyAlgorithm.IsActual should be of the form "IsActual ..." (golint)
    • Line 34: warning: comment on exported method PublicKeyAlgorithm.GetFamily should be of the form "GetFamily ..." (golint)
    • Line 70: warning: comment on exported function Get should be of the form "Get ..." (golint)
    • pkg/prfplus/gost.go
    • Line 16: warning: package comment should be of the form "Package prfplus ..." (golint)
    • Line 27: warning: exported type PRFIPsecPRFPlusGOSTR34112012 should have comment or be unexported (golint)
    • Line 29: warning: exported function NewPRFIPsecPRFPlusGOSTR34112012256 should have comment or be unexported (golint)
    • Line 33: warning: exported function NewPRFIPsecPRFPlusGOSTR34112012512 should have comment or be unexported (golint)
    • Line 37: warning: exported method PRFIPsecPRFPlusGOSTR34112012.BlockSize should have comment or be unexported (golint)
    • Line 41: warning: exported method PRFIPsecPRFPlusGOSTR34112012.Derive should have comment or be unexported (golint)
    • pkg/gost28147/mac.go
    • Line 23: warning: exported var SeqMAC should have comment or be unexported (golint)
    • Line 29: warning: exported type MAC should have comment or be unexported (golint)
    • Line 39: warning: comment on exported method Cipher.NewMAC should be of the form "NewMAC ..." (golint)
    • Line 59: warning: exported method MAC.Reset should have comment or be unexported (golint)
    • Line 64: warning: exported method MAC.BlockSize should have comment or be unexported (golint)
    • Line 68: warning: exported method MAC.Size should have comment or be unexported (golint)
    • Line 86: warning: exported method MAC.Sum should have comment or be unexported (golint)
    • pkg/mgm/mul64.go
    • Line 20: warning: exported const Mul64MaxBit should have comment or be unexported (golint)
    • Line 22: warning: exported var R64 should have comment or be unexported (golint)
    • pkg/gost3410/curve.go
    • Line 31: warning: exported type Curve should have comment or be unexported (golint)
    • Line 56: warning: exported function NewCurve should have comment or be unexported (golint)
    • Line 91: warning: exported method Curve.PointSize should have comment or be unexported (golint)
    • Line 137: warning: exported method Curve.Exp should have comment or be unexported (golint)
    • Line 156: warning: exported method Curve.Equal should have comment or be unexported (golint)
    • Line 156: warning: receiver name our should be consistent with previous receiver name c for Curve (golint)
    • pkg/gost28147/cfb.go
    • Line 18: warning: exported type CFBEncrypter should have comment or be unexported (golint)
    • Line 23: warning: exported method Cipher.NewCFBEncrypter should have comment or be unexported (golint)
    • Line 32: warning: exported method CFBEncrypter.XORKeyStream should have comment or be unexported (golint)
    • Line 50: warning: exported type CFBDecrypter should have comment or be unexported (golint)
    • Line 55: warning: exported method Cipher.NewCFBDecrypter should have comment or be unexported (golint)
    • Line 64: warning: exported method CFBDecrypter.XORKeyStream should have comment or be unexported (golint)
    • pkg/gost28147/ctr.go
    • Line 18: warning: exported type CTR should have comment or be unexported (golint)
    • Line 24: warning: exported method Cipher.NewCTR should have comment or be unexported (golint)
    • Line 33: warning: exported method CTR.XORKeyStream should have comment or be unexported (golint)
    • pkg/gost3412128/cipher.go
    • Line 16: warning: package comment should be of the form "Package gost3412128 ..." (golint)
    • Line 20: warning: exported const BlockSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 190: warning: exported type Cipher should have comment or be unexported (golint)
    • Line 194: warning: exported method Cipher.BlockSize should have comment or be unexported (golint)
    • Line 198: warning: exported function NewCipher should have comment or be unexported (golint)
    • Line 225: warning: exported method Cipher.Encrypt should have comment or be unexported (golint)
    • Line 237: warning: exported method Cipher.Decrypt should have comment or be unexported (golint)
    • pkg/gost3410/private.go
    • Line 26: warning: exported type PrivateKey should have comment or be unexported (golint)
    • Line 31: warning: exported function NewPrivateKey should have comment or be unexported (golint)
    • Line 47: warning: exported function GenPrivateKey should have comment or be unexported (golint)
    • Line 55: warning: exported method PrivateKey.Raw should have comment or be unexported (golint)
    • Line 61: warning: exported method PrivateKey.PublicKey should have comment or be unexported (golint)
    • Line 69: warning: exported method PrivateKey.SignDigest should have comment or be unexported (golint)
    • Line 112: warning: exported method PrivateKey.Sign should have comment or be unexported (golint)
    • Line 116: warning: exported method PrivateKey.Public should have comment or be unexported (golint)
    • Line 124: warning: exported type PrivateKeyReverseDigest should have comment or be unexported (golint)
    • Line 128: warning: exported method PrivateKeyReverseDigest.Public should have comment or be unexported (golint)
    • Line 132: warning: exported method PrivateKeyReverseDigest.Sign should have comment or be unexported (golint)
    • Line 139: warning: exported type PrivateKeyReverseDigestAndSignature should have comment or be unexported (golint)
    • Line 143: warning: exported method PrivateKeyReverseDigestAndSignature.Public should have comment or be unexported (golint)
    • Line 147: warning: exported method PrivateKeyReverseDigestAndSignature.Sign should have comment or be unexported (golint)
    • pkg/crypto-message/oids/algorithm/algorithm.go
    • Line 8: warning: exported type Family should have comment or be unexported (golint)
    • Line 11: warning: exported const FamilyRSA should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: comment on exported type UnsupportedAlgorithmError should be of the form "UnsupportedAlgorithmError ..." (with optional leading article) (golint)
    • Line 30: warning: comment on exported method UnsupportedAlgorithmError.Is should be of the form "Is ..." (golint)
    • pkg/gost34112012256/hash.go
    • Line 16: warning: package comment should be of the form "Package gost34112012256 ..." (golint)
    • Line 27: warning: exported const BlockSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported function New should have comment or be unexported (golint)
    • pkg/crypto-message/containers/private-key/private-key.decoder.go
    • Line 22: warning: exported const Length should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported function DecodeDER should have comment or be unexported (golint)
    • Line 69: warning: exported function DecodePEM should have comment or be unexported (golint)
    • Line 84: warning: exported function DecodePEMFile should have comment or be unexported (golint)
    • internal/pkg/gost34112012/hash.go
    • Line 16: warning: package comment should be of the form "Package gost34112012 ..." (golint)
    • Line 28: warning: exported const BlockSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 290: warning: exported type Hash should have comment or be unexported (golint)
    • Line 305: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 326: warning: exported method Hash.Reset should have comment or be unexported (golint)
    • Line 339: warning: exported method Hash.BlockSize should have comment or be unexported (golint)
    • Line 343: warning: exported method Hash.Size should have comment or be unexported (golint)
    • Line 359: warning: exported method Hash.Sum should have comment or be unexported (golint)
    • Line 436: warning: exported method Hash.MarshalBinary should have comment or be unexported (golint)
    • Line 452: warning: exported method Hash.UnmarshalBinary should have comment or be unexported (golint)
    • pkg/gost341264/cipher.go
    • Line 16: warning: package comment should be of the form "Package gost341264 ..." (golint)
    • Line 24: warning: exported const BlockSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported type Cipher should have comment or be unexported (golint)
    • Line 33: warning: exported function NewCipher should have comment or be unexported (golint)
    • Line 50: warning: exported method Cipher.BlockSize should have comment or be unexported (golint)
    • Line 54: warning: exported method Cipher.Encrypt should have comment or be unexported (golint)
    • Line 74: warning: exported method Cipher.Decrypt should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!