aboutsummaryrefslogtreecommitdiff
path: root/internal/stupidgcm/doc.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2022-12-29 15:00:24 +0100
committerJakob Unterwurzacher2022-12-29 15:00:37 +0100
commit856ccaac10579abda5620dfc86ad6031b1076a43 (patch)
tree91c3f90cf19123ff0cd6cd86d514afb7d38c4ed6 /internal/stupidgcm/doc.go
parent99cdaa0b69e884128e8f673f96bd4d3e32743d80 (diff)
make format
Run "make format" using go version go1.19.4 linux/amd64
Diffstat (limited to 'internal/stupidgcm/doc.go')
-rw-r--r--internal/stupidgcm/doc.go36
1 files changed, 18 insertions, 18 deletions
diff --git a/internal/stupidgcm/doc.go b/internal/stupidgcm/doc.go
index 36c189b..dce82ae 100644
--- a/internal/stupidgcm/doc.go
+++ b/internal/stupidgcm/doc.go
@@ -16,13 +16,13 @@
// However, OpenSSL has optimized assembly for almost all platforms, which Go
// does not. Example for a 32-bit ARM device (Odroid XU4):
//
-// $ gocrypts -speed
-// gocryptfs v2.1-68-gedf9d4c.stupidchacha; go-fuse v2.1.1-0.20210825171523-3ab5d95a30ae; 2021-09-04 go1.16.7 linux/arm
-// AES-GCM-256-OpenSSL 56.84 MB/s (selected in auto mode)
-// AES-GCM-256-Go 16.61 MB/s
-// AES-SIV-512-Go 16.49 MB/s
-// XChaCha20-Poly1305-Go 39.08 MB/s (use via -xchacha flag)
-// XChaCha20-Poly1305-OpenSSL 141.82 MB/s
+// $ gocrypts -speed
+// gocryptfs v2.1-68-gedf9d4c.stupidchacha; go-fuse v2.1.1-0.20210825171523-3ab5d95a30ae; 2021-09-04 go1.16.7 linux/arm
+// AES-GCM-256-OpenSSL 56.84 MB/s (selected in auto mode)
+// AES-GCM-256-Go 16.61 MB/s
+// AES-SIV-512-Go 16.49 MB/s
+// XChaCha20-Poly1305-Go 39.08 MB/s (use via -xchacha flag)
+// XChaCha20-Poly1305-OpenSSL 141.82 MB/s
//
// This package is "stupid" in the sense that it only supports a narrow set of
// key- and iv-lengths, and panics if it does not like what you pass it.
@@ -33,7 +33,7 @@
// Corrupt ciphertexts never cause a panic. Instead, ErrAuth is returned on
// decryption.
//
-// XChaCha20-Poly1305
+// # XChaCha20-Poly1305
//
// The XChaCha20-Poly1305 implementation is more complicated than the others,
// because OpenSSL does not support XChaCha20-Poly1305 directly. Follow
@@ -43,16 +43,16 @@
// Fortunately, XChaCha20-Poly1305 is just ChaCha20-Poly1305 with some key+iv
// mixing using HChaCha20 in front:
//
-// key (32 bytes), iv (24 bytes)
-// |
-// v
-// HChaCha20 (provided by golang.org/x/crypto/chacha20)
-// |
-// v
-// key2 (32 bytes), iv2 (16 bytes)
-// |
-// v
-// ChaCha20-Poly1305 (OpenSSL EVP_chacha20_poly1305)
+// key (32 bytes), iv (24 bytes)
+// |
+// v
+// HChaCha20 (provided by golang.org/x/crypto/chacha20)
+// |
+// v
+// key2 (32 bytes), iv2 (16 bytes)
+// |
+// v
+// ChaCha20-Poly1305 (OpenSSL EVP_chacha20_poly1305)
//
// As HChaCha20 is very fast, XChaCha20-Poly1305 gets almost the same throughput
// as ChaCha20-Poly1305 (for 4kiB blocks).