golang / crypto
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 12% duplication:
    • 34,650 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 4,182 duplicated lines
  • 334 duplicates
system12% (4,182 lines)
Duplication per Extension
go9% (2,447 lines)
s23% (1,735 lines)
Duplication per Component (primary)
chacha20poly130529% (746 lines)
salsa2042% (581 lines)
ed2551921% (567 lines)
blake2s38% (472 lines)
ssh5% (359 lines)
blake2b21% (283 lines)
chacha2019% (209 lines)
argon226% (150 lines)
curve2551914% (142 lines)
openpgp3% (133 lines)
bn2567% (104 lines)
acme3% (97 lines)
pkcs1216% (88 lines)
internal6% (68 lines)
sha34% (56 lines)
cast57% (34 lines)
nacl16% (30 lines)
otr1% (26 lines)
xts17% (12 lines)
md47% (9 lines)
ripemd1605% (9 lines)
cryptobyte1% (7 lines)
scrypt0% (0 lines)
xtea0% (0 lines)
ocsp0% (0 lines)
tea0% (0 lines)
twofish0% (0 lines)
bcrypt0% (0 lines)
pbkdf20% (0 lines)
poly13050% (0 lines)
blowfish0% (0 lines)
ROOT0% (0 lines)
hkdf0% (0 lines)

Duplication Between Components (50+ lines)

G blake2b blake2b blake2s blake2s blake2b--blake2s 370 argon2 argon2 argon2--blake2b 76

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 334 duplicates...
Size#FoldersFilesLinesCode
194 x 2 ed25519/internal/edwards25519
ed25519/internal/edwards25519
edwards25519.go
edwards25519.go
1209:1415 (14%)
1533:1739 (14%)
view
144 x 2 salsa20/salsa
salsa20/salsa
salsa208.go
salsa20_ref.go
31:198 (87%)
33:200 (78%)
view
97 x 2 blake2s
blake2s
s
blake2s_386.s
blake2s_amd64.s
8:113 (24%)
8:113 (23%)
view
64 x 2 salsa20/salsa
salsa20/salsa
hsalsa20.go
salsa208.go
33:103 (55%)
31:101 (39%)
view
64 x 2 salsa20/salsa
salsa20/salsa
hsalsa20.go
salsa20_ref.go
33:103 (55%)
33:103 (34%)
view
54 x 2 salsa20/salsa
salsa20/salsa
s
salsa20_amd64.s
salsa20_amd64.s
666:719 (6%)
728:781 (6%)
view
48 x 2 blake2b
blake2s
blake2x.go
blake2x.go
105:174 (50%)
105:175 (50%)
view
42 x 2 ed25519/internal/edwards25519
ed25519/internal/edwards25519
edwards25519.go
edwards25519.go
1372:1415 (3%)
1651:1694 (3%)
view
42 x 2 ed25519/internal/edwards25519
ed25519/internal/edwards25519
edwards25519.go
edwards25519.go
1327:1370 (3%)
1696:1739 (3%)
view
42 x 2 ed25519/internal/edwards25519
ed25519/internal/edwards25519
edwards25519.go
edwards25519.go
1327:1370 (3%)
1372:1415 (3%)
view
42 x 2 ed25519/internal/edwards25519
ed25519/internal/edwards25519
edwards25519.go
edwards25519.go
1161:1207 (3%)
1483:1529 (3%)
view
42 x 2 ed25519/internal/edwards25519
ed25519/internal/edwards25519
edwards25519.go
edwards25519.go
1651:1694 (3%)
1696:1739 (3%)
view
38 x 2 argon2
blake2b
s
blamka_amd64.s
blake2b_amd64.s
10:50 (17%)
26:66 (15%)
view
37 x 2 curve25519/internal/field/_asm
curve25519/internal/field/_asm
fe_amd64_asm.go
fe_amd64_asm.go
86:130 (18%)
192:236 (18%)
view
24 x 2 chacha20poly1305
chacha20poly1305
s
chacha20poly1305_amd64.s
chacha20poly1305_amd64.s
902:925 (1%)
2171:2194 (1%)
view
23 x 2 internal/poly1305
internal/poly1305
sum_amd64.go
sum_ppc64le.go
11:47 (100%)
11:47 (100%)
view
23 x 2 chacha20poly1305
chacha20poly1305
s
chacha20poly1305_amd64.s
chacha20poly1305_amd64.s
1093:1117 (<1%)
2379:2403 (<1%)
view
21 x 2 blake2b
blake2s
blake2b.go
blake2s.go
208:236 (12%)
178:206 (14%)
view
20 x 2 chacha20poly1305
chacha20poly1305
s
chacha20poly1305_amd64.s
chacha20poly1305_amd64.s
880:899 (<1%)
2149:2168 (<1%)
view
20 x 2 chacha20poly1305
chacha20poly1305
s
chacha20poly1305_amd64.s
chacha20poly1305_amd64.s
1388:1407 (<1%)
2607:2626 (<1%)
view
Duplicated Units
The list of top 6 duplicated units.
See data for all 6 unit duplicates...
Size#FoldersFilesLinesCode
48 x 2 blake2s
blake2b
blake2x.go
blake2x.go
113:171 
113:170 
view
20 x 2 blake2s
blake2b
blake2x.go
blake2x.go
50:72 
50:72 
view
20 x 2 internal/poly1305
internal/poly1305
sum_ppc64le.go
sum_amd64.go
20:40 
20:40 
view
9 x 3 chacha20poly1305
nacl/secretbox
nacl/sign
chacha20poly1305.go
secretbox.go
sign.go
89:98 
62:71 
81:90 
view
7 x 2 ed25519/internal/edwards25519
ed25519/internal/edwards25519
edwards25519.go
edwards25519.go
672:680 
708:716 
view
6 x 2 internal/poly1305
internal/poly1305
sum_ppc64le.go
sum_amd64.go
42:48 
42:48 
view