Skip to content

crypto user configuration api

Steffen Klassert linux-crypto 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest17 patches 2 repliesIn review
  2. v317 patches 6 repliesSuperseded
  3. v215 patches 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v116 patches8 repliesSuperseded

Changes in v4 from the cover letter

- Remove the priority field from struct crypto_user_alg and use the existing netlink attribute to send the priority value to userspace.
- Update the crconf tool according to the kernel changes.
- Don't distinguish between netlink attributes that use the same type value.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17crypto: Add a flag to identify crypto instancescrypto/algapi.c include/linux/crypto.h+6 -00 replies
2/17crypto: Export crypto_remove_spawnscrypto/algapi.c crypto/internal.h+5 -30 replies
3/17crypto: Export crypto_remove_finalcrypto/algapi.c crypto/internal.h+3 -30 replies
4/17crypto: Add userspace configuration APIcrypto/Kconfig crypto/Makefile crypto/crypto_user.c +2 more+433 -00 replies
5/17crypto: Add a report function pointer to crypto_typecrypto/crypto_user.c include/crypto/algapi.h+7 -00 replies
6/17crypto: Add userspace report for larval type algorithmscrypto/crypto_user.c include/linux/cryptouser.h+17 -00 replies
7/17crypto: Add userspace report for shash type algorithmscrypto/shash.c include/linux/cryptouser.h+28 -00 replies
8/17crypto: Add userspace report for ahash type algorithmscrypto/ahash.c+21 -00 replies
9/17crypto: Add userspace report for blkcipher type algorithmscrypto/blkcipher.c include/linux/cryptouser.h+35 -00 replies
10/17crypto: Add userspace report for ablkcipher type algorithmscrypto/ablkcipher.c+25 -00 replies
11/17crypto: Add userspace report for givcipher type algorithmscrypto/ablkcipher.c+23 -00 replies
12/17crypto: Add userspace report for aead type algorithmscrypto/aead.c include/linux/cryptouser.h+34 -01 reply
13/17crypto: Add userspace report for nivaead type algorithmscrypto/aead.c+23 -00 replies
14/17crypto: Add userspace report for pcompress type algorithmscrypto/pcompress.c include/linux/cryptouser.h+23 -00 replies
15/17crypto: Add userspace report for rng type algorithmscrypto/rng.c include/linux/cryptouser.h+26 -00 replies
16/17crypto: Add userspace report for cipher type algorithmscrypto/crypto_user.c include/linux/cryptouser.h+37 -00 replies
17/17crypto: Add userspace report for compress type algorithmscrypto/crypto_user.c+20 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 00/17] crypto user configuration api

This patchset adds a netlink based user configuration API for the crypto layer, similar to the configuration API of xfrm.

The patchset is based on the current cryptodev tree.

A userspace tool that makes use of the configuration API is available at

https://sourceforge.net/projects/crconf/files/crconf-pre2.tar.gz

With this it is possible to instantiate certain algorithms by doing

crconf add driver "cbc(aes-generic)" type 4

or

crconf add driver "cbc(aes-generic)" type 4 priority 100

To remove a (form templates build and unused) algorithm with all subsequent algorithms do

crconf del driver "cbc(aes-generic)" type 4

It is possible to update the priority of an algorithm by doing

crconf update driver "cbc(aes-generic)" type 4 priority 200

this updates the priority of this algorithm and removes all algorithms on top.

Finally it is possible to print the instantiated crypto algorithms similar to /proc/crypto by doing

crconf show all

This prints the algorithm informations of all instantiated algorithms as long as the information fits into a netlink message.

Changes from v1:

- Removed the priority update functions.
- Fix algorithm information printing when build as module.
- Update the crconf tool according to the kernel changes.

Changes from v2:

- Use one structure for creating and basic querying of algorithms.
- Send the algorithm flags to userspace, so the userspace can check for things like passed selftest, async algorithms etc.
- Update the crconf tool according to the kernel changes.
- Add some priority update functions. We need to be able to update the priority of algorithms, as we can't delete core algorithms like aes-generic. When we update the priority of an algorithm, we remove all algorithms on top.

Changes from v3:

- Remove the priority field from struct crypto_user_alg and use the existing netlink attribute to send the priority value to userspace.
- Update the crconf tool according to the kernel changes.
- Don't distinguish between netlink attributes that use the same type value.

Steffen