No description
- Go 87.6%
- Assembly 12.1%
- C 0.3%
The initial window (2 MiB) and maximum packet size (32 KiB) that a channel advertises to its peer have been compile-time constants since the package was written. Flow control bounds the throughput of a channel to roughly window / RTT, so a single channel, and with it any SFTP session built on top of it, cannot exceed about 20 MiB/s over a 100 ms link no matter how much bandwidth is available. OpenSSH uses the same defaults, but programs built on this package have had no way to raise them short of patching a vendored copy, which is what rclone resorted to (https://github.com/pkg/sftp/issues/158). Add ChannelWindowSize and ChannelMaxPacketSize to Config, so clients and servers can choose the values advertised on every channel they open or accept. Zero keeps the current defaults. SetDefaults raises the window to at least one packet and clamps the packet size to what a transport packet can carry, so no configuration can stall a channel or produce packets the transport rejects. The values only affect the direction in which the configured side receives; the other direction is governed by whatever the peer advertises. BenchmarkChannelThroughput, one channel over a pipe with a simulated 20 ms round trip time, on an Apple M4: window=2MiB 94.83 MB/s window=16MiB 765.79 MB/s Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> |
||
|---|---|---|
| acme | ||
| argon2 | ||
| bcrypt | ||
| blake2b | ||
| blake2s | ||
| blowfish | ||
| bn256 | ||
| cast5 | ||
| chacha20 | ||
| chacha20poly1305 | ||
| cryptobyte | ||
| curve25519 | ||
| ed25519 | ||
| hkdf | ||
| internal | ||
| md4 | ||
| nacl | ||
| ocsp | ||
| otr | ||
| pbkdf2 | ||
| pkcs12 | ||
| poly1305 | ||
| ripemd160 | ||
| salsa20 | ||
| scrypt | ||
| sha3 | ||
| ssh | ||
| tea | ||
| twofish | ||
| x509roots | ||
| xtea | ||
| xts | ||
| .gitattributes | ||
| .gitignore | ||
| codereview.cfg | ||
| CONTRIBUTING.md | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| PATENTS | ||
| README.md | ||
Go Cryptography
This repository holds supplementary Go cryptography packages.
Report Issues / Send Patches
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/crypto.
The main issue tracker for the crypto repository is located at https://go.dev/issues. Prefix your issue with "x/crypto:" in the subject line, so it is easy to find.
Note that contributions to the cryptography package receive additional scrutiny due to their sensitive nature. Patches may take longer than normal to receive feedback.