go x/crypto:冻结并弃用更多软件包

f4t66c6m  于 6个月前  发布在  Go
关注(0)|答案(5)|浏览(44)

Over the years we did some significant cleanups of x/crypto packages ( #30141 , #31044 , #36646 , #44226 ).
I propose we do one last round, marking as Deprecated

  • golang.org/x/crypto/salsa20/salsa: should have been an internal package, exposes low-level components of Salsa20, it has 662 importers, but that number is deceptive: all the ones I sampled are golang.org/x/crypto forks, or a shadowsocks implementation that should have used salsa20.XORKeyStream instead
  • golang.org/x/crypto/ssh/test: should also have been internal, or really a _test.go file, it exposes some test keys, zero importers

and marking as Frozen

  • golang.org/x/crypto/curve25519 and golang.org/x/crypto/ed25519: wrappers for crypto/ecdh and crypto/ed25519 respectively
  • golang.org/x/crypto/nacl/auth and golang.org/x/crypto/nacl/sign: mostly unused NaCl APIs (21 and 73 importers), they are essentially wrappers around crypto/hmac and crypto/ed25519 respectively
  • golang.org/x/crypto/otr: implements a deprecated version of OTR, basically unused (15 importers)
  • golang.org/x/crypto/xts: implements a mode that should be only used for disk encryption and under duress, increasingly replaced by filesystem-level encryption, basically unused (10 importers)

This leaves a pretty healthy list of non-Deprecated non-Frozen packages, which would be suitable for moving into the stdlib (ignoring x509roots for a moment since it's a special snowflake).

  • golang.org/x/crypto/acme
  • golang.org/x/crypto/acme/autocert
  • golang.org/x/crypto/argon2
  • golang.org/x/crypto/bcrypt
  • golang.org/x/crypto/blake2b
  • golang.org/x/crypto/blake2s
  • golang.org/x/crypto/chacha20
  • golang.org/x/crypto/chacha20poly1305
  • golang.org/x/crypto/cryptobyte
  • golang.org/x/crypto/cryptobyte/asn1
  • golang.org/x/crypto/hkdf
  • golang.org/x/crypto/internal/wycheproof
  • golang.org/x/crypto/nacl/box
  • golang.org/x/crypto/nacl/secretbox
  • golang.org/x/crypto/ocsp
  • golang.org/x/crypto/pbkdf2
  • golang.org/x/crypto/salsa20
  • golang.org/x/crypto/scrypt
  • golang.org/x/crypto/sha3
  • golang.org/x/crypto/ssh
  • golang.org/x/crypto/ssh/agent
  • golang.org/x/crypto/ssh/knownhosts

/cc @golang/security

Packages summary

PackageImported byCurrent stateProposed state
acme496  
acme/autocert2161  
argon21037  
bcrypt15602  
blake2b2500  
blake2s255  
blowfish881DeprecatedDeprecated
bn25620DeprecatedDeprecated
cast5501DeprecatedDeprecated
chacha20258  
chacha20poly13052399  
cryptobyte647  
cryptobyte/asn1377  
curve255191916WrapperFrozen
ed255192142WrapperFrozen
hkdf2208  
internal/wycheproof-InternalInternal
md4764DeprecatedDeprecated
nacl/auth21 Frozen
nacl/box1041  
nacl/secretbox1934  
nacl/sign73 Frozen
ocsp926  
openpgp/...1897DeprecatedDeprecated
otr15NoticeFrozen
pbkdf25239  
pkcs12832FrozenFrozen
poly1305504DeprecatedDeprecated
ripemd1603531DeprecatedDeprecated
salsa20283  
salsa20/salsa662 Deprecated
scrypt2381  
sha310791  
ssh14420  
ssh/agent2236  
ssh/knownhosts590  
ssh/terminal8278DeprecatedDeprecated
ssh/test0 Deprecated
tea188DeprecatedDeprecated
twofish266DeprecatedDeprecated
x509roots/nss0  
x509roots/fallback11SubmoduleSubmodule
xtea219DeprecatedDeprecated
xts10NoticeFrozen
lztngnrs

lztngnrs1#

此建议已添加到建议项目中的活动列,并将在每周的建议审查会议上进行审查。
— rsc 建议审查组

oxalkeyp

oxalkeyp2#

Have all remaining concerns about this proposal been addressed?
Mark as Deprecated :

  • golang.org/x/crypto/salsa20/salsa: should have been an internal package, exposes low-level components of Salsa20, it has 662 importers, but that number is deceptive: all the ones I sampled are golang.org/x/crypto forks, or a shadowsocks implementation that should have used salsa20.XORKeyStream instead
  • golang.org/x/crypto/ssh/test: should also have been internal, or really a _test.go file, it exposes some test keys, zero importers

Mark as Frozen :

  • golang.org/x/crypto/curve25519 and golang.org/x/crypto/ed25519: wrappers for crypto/ecdh and crypto/ed25519 respectively
  • golang.org/x/crypto/nacl/auth and golang.org/x/crypto/nacl/sign: mostly unused NaCl APIs (21 and 73 importers), they are essentially wrappers around crypto/hmac and crypto/ed25519 respectively
  • golang.org/x/crypto/otr: implements a deprecated version of OTR, basically unused (15 importers)
  • golang.org/x/crypto/xts: implements a mode that should be only used for disk encryption and under duress, increasingly replaced by filesystem-level encryption, basically unused (10 importers)
axr492tv

axr492tv3#

Based on the discussion above, this proposal seems like a likely accept.
— rsc for the proposal review group
Mark as Deprecated :

  • golang.org/x/crypto/salsa20/salsa: should have been an internal package, exposes low-level components of Salsa20, it has 662 importers, but that number is deceptive: all the ones I sampled are golang.org/x/crypto forks, or a shadowsocks implementation that should have used salsa20.XORKeyStream instead
  • golang.org/x/crypto/ssh/test: should also have been internal, or really a _test.go file, it exposes some test keys, zero importers

Mark as Frozen :

  • golang.org/x/crypto/curve25519 and golang.org/x/crypto/ed25519: wrappers for crypto/ecdh and crypto/ed25519 respectively
  • golang.org/x/crypto/nacl/auth and golang.org/x/crypto/nacl/sign: mostly unused NaCl APIs (21 and 73 importers), they are essentially wrappers around crypto/hmac and crypto/ed25519 respectively
  • golang.org/x/crypto/otr: implements a deprecated version of OTR, basically unused (15 importers)
  • golang.org/x/crypto/xts: implements a mode that should be only used for disk encryption and under duress, increasingly replaced by filesystem-level encryption, basically unused (10 importers)
yfwxisqw

yfwxisqw4#

No change in consensus, so accepted. 🎉
This issue now tracks the work of implementing the proposal.
— rsc for the proposal review group
Mark as Deprecated :

  • golang.org/x/crypto/salsa20/salsa: should have been an internal package, exposes low-level components of Salsa20, it has 662 importers, but that number is deceptive: all the ones I sampled are golang.org/x/crypto forks, or a shadowsocks implementation that should have used salsa20.XORKeyStream instead
  • golang.org/x/crypto/ssh/test: should also have been internal, or really a _test.go file, it exposes some test keys, zero importers

Mark as Frozen :

  • golang.org/x/crypto/curve25519 and golang.org/x/crypto/ed25519: wrappers for crypto/ecdh and crypto/ed25519 respectively
  • golang.org/x/crypto/nacl/auth and golang.org/x/crypto/nacl/sign: mostly unused NaCl APIs (21 and 73 importers), they are essentially wrappers around crypto/hmac and crypto/ed25519 respectively
  • golang.org/x/crypto/otr: implements a deprecated version of OTR, basically unused (15 importers)
  • golang.org/x/crypto/xts: implements a mode that should be only used for disk encryption and under duress, increasingly replaced by filesystem-level encryption, basically unused (10 importers)
368yc8dk

368yc8dk5#

(@FiloSottile 请编辑提案以添加指向每个包的文档链接,如 [golang.org/x/crypto/ssh/test](https://pkg.go.dev/golang.org/x/crypto/ssh/test) )

相关问题