Re: [cryptoapi/sysfs] display cipher details in sysfs

From: Andreas Happe
Date: Tue Sep 07 2004 - 09:45:27 EST


On Mon, Sep 06, 2004 at 08:49:30PM +0200, Michal Ludvig wrote:
> I really like the patch - I wanted to do quite the same so thanks that you
> saved me some work ;-)

thanks ;).

> On Wed, 1 Sep 2004, Andreas Happe wrote:
> > the attached patch creates a /sys/cryptoapi/<cipher-name>/ hierarchie

BTW: the latest incarnation of the patch uses /sys/class/crypto/<cipher-name>.

> I'd prefer to have the algorithms grouped by "type" ("cipher", "digest",
> "compress")? Then the apps could easily see only the algos that thay are
> interested in...

jup, but the seqfile code in proc.c would get a lot more uglier. If we could
drop proc.c this wouldn´t be a problem.

> There could eventually be a separate crypto/sysfs.c, couldn't?

check the patch ;). There's already a sysfs.c with the sysfs-centric
stuff.

> Few notes:
> - - some algorithms allow only discrete set of keysizes (e.g. AES can do
> 128b, 192b and 256b). Can we instead of min/max have a file 'keysize' with
> either:
> minsize-maxsize
> or
> size1,size2,size3
> ?
>
> - - ditto for blocksize?

how would you implement this in the crypto_alg struture? The sysfs/procfs
integration isn't that problem.

> - - With the future support for hardware crypto accelerators it
> might be possible to have more modules loaded providing the same
> algorithm. They may have different priorities and one would be treated as
> "default". Then I expect the syntax of 'module' file to change from a
> simple module name to something like:
> # modname:prio:type:whatever
> aes:0:generic:
> aes_i586:1:optimized:
> padlock:2:hardware:default

Isn't this against the "one value per file" - sysfs rule.

> Michal Ludvig

--Andreas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/