lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 25 Aug 2017 11:21:06 +0900 From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com> To: Nick Terrell <terrelln@...com> Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>, Joonsoo Kim <iamjoonsoo.kim@....com>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "minchan@...nel.org" <minchan@...nel.org>, Yann Collet <cyan@...com> Subject: Re: [PATCH] zram: add zstd to the supported algorithms list On (08/25/17 02:09), Nick Terrell wrote: [..] > > > I think using dictionaries in zram could be very interesting. We could for > > > example, take a random sample of the RAM and use that as the dictionary > > > for compression. E.g. take 32 512B samples from RAM and build a 16 KB > > > dictionary (sizes may vary). > > > > > > I'm not sure how you would pass a dictionary into the crypto compression > > > API, but I'm sure we can make something work if dictionary compression > > > proves to be beneficial enough. > > > > a dictionaty pointer can be in `struct zstd_ctx'. > > Sorry I'm not super familiar with the crypto API. How would the user > initialize the dictionary in the `struct zstd_ctx'? I guess you could > either expose the struct in some header, or provide a function that > initializes it, but that isn't generic. Does the crypto library already > have a standard way to provide extra information? not really familiar either... I was thinking about having "zstd" and "zstd_dict" crypto_alg structs - one would be !dict, the other one would allocate dict and pass it to compress/decompress zstd callbacks. "zstd" vecrsion would invoke zstd_params() passing zeros as compress and dict sizes to ZSTD_getParams(), while "zstd_dict" would invoke, lets say, zstd_params_dict() passing PAGE_SIZE-s. hm... (0, PAGE_SIZE)? to ZSTD_getParams(). just a rough idea... -ss
Powered by blists - more mailing lists