libgocryptfs/internal
Jakob Unterwurzacher 5046962634 speed: add bEncrypt helper, reuse dst buffer
The bEncrypt helper massively deduplicates the code,
and reusing the dst buffer gives higher performance,
and that's what gocryptfs does in normal operation via
sync.Pool.

$ benchstat old.txt new.txt
name             old time/op   new time/op    delta
StupidGCM-4       6.24µs ± 1%    4.65µs ± 0%  -25.47%  (p=0.008 n=5+5)
GoGCM-4           4.90µs ± 0%    4.10µs ± 0%  -16.44%  (p=0.008 n=5+5)
AESSIV-4          26.4µs ± 0%    25.6µs ± 0%   -2.90%  (p=0.008 n=5+5)
Xchacha-4         5.76µs ± 0%    4.91µs ± 0%  -14.79%  (p=0.008 n=5+5)
StupidXchacha-4   7.24µs ± 1%    5.48µs ± 0%  -24.33%  (p=0.008 n=5+5)

name             old speed     new speed      delta
StupidGCM-4      656MB/s ± 1%   880MB/s ± 0%  +34.15%  (p=0.008 n=5+5)
GoGCM-4          835MB/s ± 0%  1000MB/s ± 0%  +19.68%  (p=0.008 n=5+5)
AESSIV-4         155MB/s ± 0%   160MB/s ± 0%   +2.99%  (p=0.008 n=5+5)
Xchacha-4        711MB/s ± 0%   834MB/s ± 0%  +17.35%  (p=0.008 n=5+5)
StupidXchacha-4  565MB/s ± 1%   747MB/s ± 0%  +32.15%  (p=0.008 n=5+5)
2021-09-07 18:14:05 +02:00
..
configfile Unbreak hyperlinks broken by go mod v2 conversion 2021-08-30 11:31:01 +02:00
contentenc Unbreak hyperlinks broken by go mod v2 conversion 2021-08-30 11:31:01 +02:00
cryptocore -speed: add XChaCha20-Poly1305-OpenSSL 2021-09-07 18:14:05 +02:00
ctlsocksrv go mod: declare module version v2 2021-08-23 15:05:15 +02:00
ensurefds012 Unbreak hyperlinks broken by go mod v2 conversion 2021-08-30 11:31:01 +02:00
exitcodes Add support for FIDO2 tokens 2020-09-12 18:06:54 +02:00
fido2 go mod: declare module version v2 2021-08-23 15:05:15 +02:00
fusefrontend fusefrontend: remove leftover Printf 2021-08-30 11:39:44 +02:00
fusefrontend_reverse go mod: declare module version v2 2021-08-23 15:05:15 +02:00
inomap go mod: declare module version v2 2021-08-23 15:05:15 +02:00
nametransform Unbreak hyperlinks broken by go mod v2 conversion 2021-08-30 11:31:01 +02:00
openfiletable go mod: declare module version v2 2021-08-23 15:05:15 +02:00
pathiv go mod: declare module version v2 2021-08-23 15:05:15 +02:00
readpassword go mod: declare module version v2 2021-08-23 15:05:15 +02:00
siv_aead cryptocore: add NonceSize to AEADTypeEnum 2021-08-23 22:10:23 +02:00
speed speed: add bEncrypt helper, reuse dst buffer 2021-09-07 18:14:05 +02:00
stupidgcm stupidgcm: use aead_seal for gcm as well 2021-09-07 18:14:05 +02:00
syscallcompat Unbreak hyperlinks broken by go mod v2 conversion 2021-08-30 11:31:01 +02:00
tlog tlog: switch from golang.org/x/crypto/ssh/terminal to golang.org/x/term 2021-08-19 07:38:56 +02:00