All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v1 0/1] *** crypto: AF_ALG: add compression support ***
@ 2017-04-13 18:34 Abed Kamaluddin
  2017-04-13 18:34 ` [RFC PATCH v1 1/1] crypto: algif_compression - User-space interface for compression Abed Kamaluddin
  2017-04-14  8:32 ` [RFC PATCH v1 0/1] *** crypto: AF_ALG: add compression support *** Herbert Xu
  0 siblings, 2 replies; 12+ messages in thread
From: Abed Kamaluddin @ 2017-04-13 18:34 UTC (permalink / raw)
  To: herbert, linux-crypto; +Cc: akamaluddin, pathreya, machalla

Hi Herbert,

This patch adds compression support to the AF_ALG interface exported by the 
kernel crypto API. By extending AF_ALG, all compression algorithms of types 
scomp and acomp, which the kernel crypto API allows access to, are now also
accessible from userspace.

The new compression interface has been tested with both kernel software
deflate(scomp) and HW accelerated ThunderX deflate(scomp) using the zpipe
example application provided by zlib.

The user-space side would look similar to hash/cipher implementations.

struct sockaddr_alg sa = {
    .salg_family = AF_ALG,
    .salg_type = "compression",
    .salg_name = "deflate"
};

The operations supported are ALG_OP_DECOMPRESS and ALG_OP_COMPRESS. This
interface is synchronous and handles one request at a time. The data for
compression/decompression is read in sendmsg and all operations are carried
out and completed in recvmsg.

This interface can utilize full deflate functionality provided by kernel.
However to achieve complete zlib functionality in user space, the acomp
interface needs to be modified and provide api's to pass context and additional
data between the kernel user and algorithm as has been pointed on a different
thread.

Patches have been generated on top of "kernel/git/herbert/crypto-2.6.git" repo.

Abed Kamaluddin (1):
  crypto: algif_compression - User-space interface for compression

 crypto/Kconfig              |  11 ++
 crypto/Makefile             |   1 +
 crypto/algif_compression.c  | 272 ++++++++++++++++++++++++++++++++++++++++++++
 include/uapi/linux/if_alg.h |   2 +
 4 files changed, 286 insertions(+)
 create mode 100644 crypto/algif_compression.c

-- 
2.7.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-04-21 19:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-13 18:34 [RFC PATCH v1 0/1] *** crypto: AF_ALG: add compression support *** Abed Kamaluddin
2017-04-13 18:34 ` [RFC PATCH v1 1/1] crypto: algif_compression - User-space interface for compression Abed Kamaluddin
2017-04-14  4:19   ` PrasannaKumar Muralidharan
2017-04-17  1:31   ` Eric Biggers
2017-04-18 10:12   ` Stephan Müller
2017-04-21 15:42     ` abed mohammad kamaluddin
2017-04-21 15:50       ` Stephan Müller
2017-04-21 16:07         ` abed mohammad kamaluddin
2017-04-14  8:32 ` [RFC PATCH v1 0/1] *** crypto: AF_ALG: add compression support *** Herbert Xu
2017-04-20  7:09   ` abed mohammad kamaluddin
2017-04-20  8:00     ` Herbert Xu
2017-04-20 14:39       ` abed mohammad kamaluddin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.