]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: generalize ceph_x_encrypt_offset() and ceph_x_encrypt_buflen()
authorIlya Dryomov <idryomov@gmail.com>
Sat, 5 Jul 2025 09:28:21 +0000 (11:28 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 9 Feb 2026 11:29:21 +0000 (12:29 +0100)
commit0ee8bccf7396d50726c9c8dd3135fb64a9fe8426
tree0e6b617eb6faa62ab969ab2a449643e663aed13b
parentac431d597a9bdfc2ba6b314813f29a6ef2b4a3bf
libceph: generalize ceph_x_encrypt_offset() and ceph_x_encrypt_buflen()

- introduce the notion of a data offset for ceph_x_encrypt_offset()
  to allow for e.g. confounder to be prepended before the encryption
  header in the future.  For CEPH_CRYPTO_AES, the data offset is 0
  (i.e. nothing is prepended).

- adjust ceph_x_encrypt_buflen() accordingly and make it account for
  PKCS#7 padding that is used by CEPH_CRYPTO_AES precisely instead of
  just always adding 16.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/auth_x.c
net/ceph/crypto.c
net/ceph/crypto.h