bcachefs: use library APIs for ChaCha20 and Poly1305
authorEric Biggers <ebiggers@google.com>
Wed, 2 Apr 2025 04:33:33 +0000 (21:33 -0700)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 6 Apr 2025 23:33:53 +0000 (19:33 -0400)
commit4bf4b5046de0ef7f9dc50f3a9ef8a6dcda178a6d
tree3d60c5ee7f32d122d91f246abff05b37e4db7762
parent1ec94a9f6dd870a4d9c799d26e440c8f6b6268d2
bcachefs: use library APIs for ChaCha20 and Poly1305

Just use the ChaCha20 and Poly1305 libraries instead of the clunky
crypto API.  This is much simpler.  It is also slightly faster, since
the libraries provide more direct access to the same
architecture-optimized ChaCha20 and Poly1305 code.

I've tested that existing encrypted bcachefs filesystems can be continue
to be accessed with this patch applied.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/Kconfig
fs/bcachefs/bcachefs.h
fs/bcachefs/btree_node_scan.c
fs/bcachefs/checksum.c
fs/bcachefs/checksum.h
fs/bcachefs/io_read.c
fs/bcachefs/super.c