Message ID | 20191012043850.340957-1-ebiggers@kernel.org |
---|---|
Headers | show |
Series | crypto: sparc - convert to skcipher API | expand |
From: Eric Biggers <ebiggers@kernel.org> Date: Fri, 11 Oct 2019 21:38:47 -0700 > I've compiled this patchset, and the conversion is very similar to that > which has been done for many other crypto drivers. But I don't have the > hardware to test it, nor are SPARC64 crypto opcodes supported by QEMU. > So I really need someone with the hardware to test it. You can do so by > setting: Eric, I'll try to test this for you over the weekend.
On Sat, Oct 12, 2019 at 08:16:41AM +0300, Anatoly Pugachev wrote: > On Sat, Oct 12, 2019, 07:47 Eric Biggers <ebiggers@kernel.org> wrote: > > > This series converts the glue code for the SPARC64 crypto opcodes > > implementations of AES, Camellia, DES, and 3DES modes from the > > deprecated "blkcipher" API to the "skcipher" API. This is needed in > > order for the blkcipher API to be removed. > > > > I've compiled this patchset, and the conversion is very similar to that > > which has been done for many other crypto drivers. But I don't have the > > hardware to test it, nor are SPARC64 crypto opcodes supported by QEMU. > > So I really need someone with the hardware to test it. You can do so by > > setting: > > > > CONFIG_CRYPTO_AES_SPARC64=y > > CONFIG_CRYPTO_CAMELLIA_SPARC64=y > > CONFIG_CRYPTO_DES_SPARC64=y > > # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set > > CONFIG_DEBUG_KERNEL=y > > CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y > > CONFIG_CRYPTO_AES=y > > CONFIG_CRYPTO_CAMELLIA=y > > CONFIG_CRYPTO_DES=y > > CONFIG_CRYPTO_CBC=y > > CONFIG_CRYPTO_CTR=y > > CONFIG_CRYPTO_ECB=y > > > > Then boot and check for crypto self-test failures by running > > 'dmesg | grep alg'. > > > > If there are test failures, please also check whether they were already > > failing prior to this patchset. > > > > Eric Biggers (3): > > crypto: sparc/aes - convert to skcipher API > > crypto: sparc/camellia - convert to skcipher API > > crypto: sparc/des - convert to skcipher API > > > > arch/sparc/crypto/aes_glue.c | 310 +++++++++---------- > > arch/sparc/crypto/camellia_glue.c | 217 ++++++------- > > arch/sparc/crypto/des_glue.c | 499 ++++++++++++++---------------- > > crypto/Kconfig | 5 +- > > 4 files changed, 468 insertions(+), 563 deletions(-) > > > > Eric, I could provide you with sparc hardware access or test (as compile > and boot) this patch set , but not earlier than the begining of next week. > > Would it be possible to implement test suite for for this crypto opcodes > somewhere under tools/testing/selftests/ ?! > Looks like David was the first volunteer :-) But feel free to test it too. The crypto subsystem already has self-tests for all these algorithms which run at boot time (or at module load time if they're built as loadable modules). They just need to be enabled in the kconfig; see above. Self-test failures are reported in dmesg and in /proc/crypto. - Eric
On Fri, Oct 11, 2019 at 09:38:47PM -0700, Eric Biggers wrote: > This series converts the glue code for the SPARC64 crypto opcodes > implementations of AES, Camellia, DES, and 3DES modes from the > deprecated "blkcipher" API to the "skcipher" API. This is needed in > order for the blkcipher API to be removed. Not knowing much about the API: do you have an explanation of what the difference is and why it matters? > arch/sparc/crypto/aes_glue.c | 310 +++++++++---------- > arch/sparc/crypto/camellia_glue.c | 217 ++++++------- > arch/sparc/crypto/des_glue.c | 499 ++++++++++++++---------------- > crypto/Kconfig | 5 +- > 4 files changed, 468 insertions(+), 563 deletions(-) At least it removes more code than it adds, which always is a good thing.
On Tue, Oct 15, 2019 at 01:11:38AM -0700, Christoph Hellwig wrote: > On Fri, Oct 11, 2019 at 09:38:47PM -0700, Eric Biggers wrote: > > This series converts the glue code for the SPARC64 crypto opcodes > > implementations of AES, Camellia, DES, and 3DES modes from the > > deprecated "blkcipher" API to the "skcipher" API. This is needed in > > order for the blkcipher API to be removed. > > Not knowing much about the API: do you have an explanation of what the > difference is and why it matters? > They're all APIs for length-preserving encryption algorithms, but the skcipher API has some improvements, such as: - a much less confusing name - better type safety (skcipher_alg, crypto_skcipher, etc. instead of crypto_alg, crypto_tfm, etc.) - optional support for asynchronous operation (like "ablkcipher") - optional support per request-contexts (like "ablkcipher") - simpler scatterlist walks for some algorithms The skcipher API was introduced in 2015 to replace blkcipher and ablkcipher, and most implementations and almost all API users were converted. But some implementations weren't converted, so the crypto subsystem still has to carry all the blkcipher and ablkcipher compatibility code, as well as all documentation for blkcipher and ablkcipher. This is really confusing for people working with the crypto API, and bad for testing as there's no easy way to test {,a}blkcipher on x86, arm, or arm64 anymore. So, Ard and I are finishing the conversions so that blkcipher and ablkcipher can finally be removed. - Eric
On Sat, Oct 12, 2019 at 7:47 AM Eric Biggers <ebiggers@kernel.org> wrote: > > This series converts the glue code for the SPARC64 crypto opcodes > implementations of AES, Camellia, DES, and 3DES modes from the > deprecated "blkcipher" API to the "skcipher" API. This is needed in > order for the blkcipher API to be removed. > > I've compiled this patchset, and the conversion is very similar to that > which has been done for many other crypto drivers. But I don't have the > hardware to test it, nor are SPARC64 crypto opcodes supported by QEMU. > So I really need someone with the hardware to test it. You can do so by > setting: > > CONFIG_CRYPTO_AES_SPARC64=y > CONFIG_CRYPTO_CAMELLIA_SPARC64=y > CONFIG_CRYPTO_DES_SPARC64=y > # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set > CONFIG_DEBUG_KERNEL=y > CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y > CONFIG_CRYPTO_AES=y > CONFIG_CRYPTO_CAMELLIA=y > CONFIG_CRYPTO_DES=y > CONFIG_CRYPTO_CBC=y > CONFIG_CRYPTO_CTR=y > CONFIG_CRYPTO_ECB=y > > Then boot and check for crypto self-test failures by running > 'dmesg | grep alg'. > > If there are test failures, please also check whether they were already > failing prior to this patchset. Eric, just a quick report. Attached /proc/crypto files before and after patch applied. As i can see there's no selftests failure , kernel boots normally. Thanks. name : md5 driver : md5-sparc64 module : md5_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 16 name : sha512 driver : sha512-sparc64 module : sha512_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize : 128 digestsize : 64 name : sha384 driver : sha384-generic module : sha512_generic priority : 100 refcnt : 1 selftest : passed internal : no type : shash blocksize : 128 digestsize : 48 name : sha512 driver : sha512-generic module : sha512_generic priority : 100 refcnt : 1 selftest : passed internal : no type : shash blocksize : 128 digestsize : 64 name : sha384 driver : sha384-sparc64 module : sha512_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize : 128 digestsize : 48 name : sha256 driver : sha256-sparc64 module : sha256_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 32 name : sha224 driver : sha224-sparc64 module : sha256_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 28 name : sha1 driver : sha1-sparc64 module : sha1_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 20 name : crc32c driver : crc32c-sparc64 module : crc32c_sparc64 priority : 300 refcnt : 4 selftest : passed internal : no type : shash blocksize : 1 digestsize : 4 name : gcm(aes) driver : gcm_base(ctr(aes-generic),ghash-generic) module : kernel priority : 100 refcnt : 2 selftest : passed internal : no type : aead async : no blocksize : 1 ivsize : 12 maxauthsize : 16 geniv : <none> name : gcm(aes) driver : gcm_base(ctr-aes-sparc64,ghash-generic) module : kernel priority : 200 refcnt : 1 selftest : passed internal : no type : aead async : no blocksize : 1 ivsize : 12 maxauthsize : 16 geniv : <none> name : jitterentropy_rng driver : jitterentropy_rng module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0 name : cbc(camellia) driver : cbc(camellia-generic) module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 16 min keysize : 16 max keysize : 32 ivsize : 16 chunksize : 16 walksize : 16 name : cbc(camellia) driver : cbc-camellia-sparc64 module : kernel priority : 300 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 16 min keysize : 16 max keysize : 32 ivsize : 16 chunksize : 16 walksize : 16 name : ecb(camellia) driver : ecb(camellia-generic) module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 16 min keysize : 16 max keysize : 32 ivsize : 0 chunksize : 16 walksize : 16 name : ecb(camellia) driver : ecb-camellia-sparc64 module : kernel priority : 300 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 16 min keysize : 16 max keysize : 32 ivsize : 0 chunksize : 16 walksize : 16 name : camellia driver : camellia-sparc64 module : kernel priority : 300 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 16 min keysize : 16 max keysize : 32 name : cbc(des3_ede) driver : cbc(des3_ede-generic) module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 8 min keysize : 24 max keysize : 24 ivsize : 8 chunksize : 8 walksize : 8 name : cbc(des3_ede) driver : cbc-des3_ede-sparc64 module : kernel priority : 300 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 8 min keysize : 24 max keysize : 24 ivsize : 8 chunksize : 8 walksize : 8 name : ecb(des3_ede) driver : ecb(des3_ede-generic) module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 8 min keysize : 24 max keysize : 24 ivsize : 0 chunksize : 8 walksize : 8 name : ecb(des3_ede) driver : ecb-des3_ede-sparc64 module : kernel priority : 300 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 8 min keysize : 24 max keysize : 24 ivsize : 0 chunksize : 8 walksize : 8 name : cbc(des) driver : cbc(des-generic) module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 8 min keysize : 8 max keysize : 8 ivsize : 8 chunksize : 8 walksize : 8 name : cbc(des) driver : cbc-des-sparc64 module : kernel priority : 300 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 8 min keysize : 8 max keysize : 8 ivsize : 8 chunksize : 8 walksize : 8 name : ecb(des) driver : ecb(des-generic) module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 8 min keysize : 8 max keysize : 8 ivsize : 0 chunksize : 8 walksize : 8 name : ecb(des) driver : ecb-des-sparc64 module : kernel priority : 300 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 8 min keysize : 8 max keysize : 8 ivsize : 0 chunksize : 8 walksize : 8 name : des3_ede driver : des3_ede-sparc64 module : kernel priority : 300 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 8 min keysize : 24 max keysize : 24 name : des driver : des-sparc64 module : kernel priority : 300 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 8 min keysize : 8 max keysize : 8 name : ctr(aes) driver : ctr(aes-generic) module : kernel priority : 100 refcnt : 2 selftest : passed internal : no type : skcipher async : no blocksize : 1 min keysize : 16 max keysize : 32 ivsize : 16 chunksize : 16 walksize : 16 name : ctr(aes) driver : ctr-aes-sparc64 module : kernel priority : 300 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 1 min keysize : 16 max keysize : 32 ivsize : 16 chunksize : 16 walksize : 16 name : cbc(aes) driver : cbc(aes-generic) module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 16 min keysize : 16 max keysize : 32 ivsize : 16 chunksize : 16 walksize : 16 name : cbc(aes) driver : cbc-aes-sparc64 module : kernel priority : 300 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 16 min keysize : 16 max keysize : 32 ivsize : 16 chunksize : 16 walksize : 16 name : ecb(aes) driver : ecb(aes-generic) module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 16 min keysize : 16 max keysize : 32 ivsize : 0 chunksize : 16 walksize : 16 name : ecb(aes) driver : ecb-aes-sparc64 module : kernel priority : 300 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 16 min keysize : 16 max keysize : 32 ivsize : 0 chunksize : 16 walksize : 16 name : aes driver : aes-sparc64 module : kernel priority : 300 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 16 min keysize : 16 max keysize : 32 name : ghash driver : ghash-generic module : kernel priority : 100 refcnt : 3 selftest : passed internal : no type : shash blocksize : 16 digestsize : 16 name : stdrng driver : drbg_nopr_hmac_sha256 module : kernel priority : 207 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0 name : stdrng driver : drbg_nopr_hmac_sha512 module : kernel priority : 206 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0 name : stdrng driver : drbg_nopr_hmac_sha384 module : kernel priority : 205 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0 name : stdrng driver : drbg_nopr_hmac_sha1 module : kernel priority : 204 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0 name : stdrng driver : drbg_pr_hmac_sha256 module : kernel priority : 203 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0 name : stdrng driver : drbg_pr_hmac_sha512 module : kernel priority : 202 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0 name : stdrng driver : drbg_pr_hmac_sha384 module : kernel priority : 201 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0 name : stdrng driver : drbg_pr_hmac_sha1 module : kernel priority : 200 refcnt : 1 selftest : passed internal : no type : rng seedsize : 0 name : stdrng driver : ansi_cprng module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : rng seedsize : 48 name : lzo-rle driver : lzo-rle-scomp module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : scomp name : lzo-rle driver : lzo-rle-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : compression name : lzo driver : lzo-scomp module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : scomp name : lzo driver : lzo-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : compression name : crct10dif driver : crct10dif-generic module : kernel priority : 100 refcnt : 2 selftest : passed internal : no type : shash blocksize : 1 digestsize : 2 name : crc32c driver : crc32c-generic module : kernel priority : 100 refcnt : 2 selftest : passed internal : no type : shash blocksize : 1 digestsize : 4 name : camellia driver : camellia-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 16 min keysize : 16 max keysize : 32 name : aes driver : aes-generic module : kernel priority : 100 refcnt : 2 selftest : passed internal : no type : cipher blocksize : 16 min keysize : 16 max keysize : 32 name : des3_ede driver : des3_ede-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 8 min keysize : 24 max keysize : 24 name : des driver : des-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 8 min keysize : 8 max keysize : 8 name : sha224 driver : sha224-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 28 name : sha256 driver : sha256-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 32 name : sha1 driver : sha1-generic module : kernel priority : 100 refcnt : 2 selftest : passed internal : no type : shash blocksize : 64 digestsize : 20 name : md5 driver : md5-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 16 name : ecb(cipher_null) driver : ecb-cipher_null module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 1 min keysize : 0 max keysize : 0 ivsize : 0 chunksize : 1 walksize : 1 name : digest_null driver : digest_null-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : shash blocksize : 1 digestsize : 0 name : compress_null driver : compress_null-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : compression name : cipher_null driver : cipher_null-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 1 min keysize : 0 max keysize : 0 name : cbc(camellia) driver : cbc-camellia-sparc64 module : camellia_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : blkcipher blocksize : 16 min keysize : 16 max keysize : 32 ivsize : 16 geniv : <default> name : ecb(camellia) driver : ecb-camellia-sparc64 module : camellia_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : blkcipher blocksize : 16 min keysize : 16 max keysize : 32 ivsize : 0 geniv : <default> name : camellia driver : camellia-sparc64 module : camellia_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 16 min keysize : 16 max keysize : 32 name : cbc(des3_ede) driver : cbc-des3_ede-sparc64 module : des_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : blkcipher blocksize : 8 min keysize : 24 max keysize : 24 ivsize : 8 geniv : <default> name : ecb(des3_ede) driver : ecb-des3_ede-sparc64 module : des_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : blkcipher blocksize : 8 min keysize : 24 max keysize : 24 ivsize : 0 geniv : <default> name : des3_ede driver : des3_ede-sparc64 module : des_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 8 min keysize : 24 max keysize : 24 name : cbc(des) driver : cbc-des-sparc64 module : des_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : blkcipher blocksize : 8 min keysize : 8 max keysize : 8 ivsize : 8 geniv : <default> name : ecb(des) driver : ecb-des-sparc64 module : des_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : blkcipher blocksize : 8 min keysize : 8 max keysize : 8 ivsize : 0 geniv : <default> name : des driver : des-sparc64 module : des_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 8 min keysize : 8 max keysize : 8 name : des3_ede driver : des3_ede-generic module : des_generic priority : 100 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 8 min keysize : 24 max keysize : 24 name : des driver : des-generic module : des_generic priority : 100 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 8 min keysize : 8 max keysize : 8 name : ctr(aes) driver : ctr-aes-sparc64 module : aes_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : blkcipher blocksize : 1 min keysize : 16 max keysize : 32 ivsize : 16 geniv : <default> name : cbc(aes) driver : cbc-aes-sparc64 module : aes_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : blkcipher blocksize : 16 min keysize : 16 max keysize : 32 ivsize : 16 geniv : <default> name : ecb(aes) driver : ecb-aes-sparc64 module : aes_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : blkcipher blocksize : 16 min keysize : 16 max keysize : 32 ivsize : 0 geniv : <default> name : aes driver : aes-sparc64 module : aes_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 16 min keysize : 16 max keysize : 32 name : md5 driver : md5-sparc64 module : md5_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 16 name : sha512 driver : sha512-sparc64 module : sha512_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize : 128 digestsize : 64 name : sha384 driver : sha384-sparc64 module : sha512_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize : 128 digestsize : 48 name : sha256 driver : sha256-sparc64 module : sha256_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 32 name : sha224 driver : sha224-sparc64 module : sha256_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 28 name : sha1 driver : sha1-sparc64 module : sha1_sparc64 priority : 300 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 20 name : crc32c driver : crc32c-generic module : crc32c_generic priority : 100 refcnt : 1 selftest : passed internal : no type : shash blocksize : 1 digestsize : 4 name : crc32c driver : crc32c-sparc64 module : crc32c_sparc64 priority : 300 refcnt : 5 selftest : passed internal : no type : shash blocksize : 1 digestsize : 4 name : pkcs1pad(rsa,sha256) driver : pkcs1pad(rsa-generic,sha256) module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : akcipher name : lzo-rle driver : lzo-rle-scomp module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : scomp name : lzo-rle driver : lzo-rle-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : compression name : lzo driver : lzo-scomp module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : scomp name : lzo driver : lzo-generic module : kernel priority : 0 refcnt : 33 selftest : passed internal : no type : compression name : crct10dif driver : crct10dif-generic module : kernel priority : 100 refcnt : 2 selftest : passed internal : no type : shash blocksize : 1 digestsize : 2 name : aes driver : aes-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 16 min keysize : 16 max keysize : 32 name : sha224 driver : sha224-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 28 name : sha256 driver : sha256-generic module : kernel priority : 100 refcnt : 257 selftest : passed internal : no type : shash blocksize : 64 digestsize : 32 name : sha1 driver : sha1-generic module : kernel priority : 100 refcnt : 259 selftest : passed internal : no type : shash blocksize : 64 digestsize : 20 name : md5 driver : md5-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : shash blocksize : 64 digestsize : 16 name : ecb(cipher_null) driver : ecb-cipher_null module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : skcipher async : no blocksize : 1 min keysize : 0 max keysize : 0 ivsize : 0 chunksize : 1 walksize : 1 name : digest_null driver : digest_null-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : shash blocksize : 1 digestsize : 0 name : compress_null driver : compress_null-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : compression name : cipher_null driver : cipher_null-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : cipher blocksize : 1 min keysize : 0 max keysize : 0 name : rsa driver : rsa-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : akcipher name : dh driver : dh-generic module : kernel priority : 100 refcnt : 1 selftest : passed internal : no type : kpp
On Fri, Oct 11, 2019 at 09:38:47PM -0700, Eric Biggers wrote: > This series converts the glue code for the SPARC64 crypto opcodes > implementations of AES, Camellia, DES, and 3DES modes from the > deprecated "blkcipher" API to the "skcipher" API. This is needed in > order for the blkcipher API to be removed. > > I've compiled this patchset, and the conversion is very similar to that > which has been done for many other crypto drivers. But I don't have the > hardware to test it, nor are SPARC64 crypto opcodes supported by QEMU. > So I really need someone with the hardware to test it. You can do so by > setting: > > CONFIG_CRYPTO_AES_SPARC64=y > CONFIG_CRYPTO_CAMELLIA_SPARC64=y > CONFIG_CRYPTO_DES_SPARC64=y > # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set > CONFIG_DEBUG_KERNEL=y > CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y > CONFIG_CRYPTO_AES=y > CONFIG_CRYPTO_CAMELLIA=y > CONFIG_CRYPTO_DES=y > CONFIG_CRYPTO_CBC=y > CONFIG_CRYPTO_CTR=y > CONFIG_CRYPTO_ECB=y > > Then boot and check for crypto self-test failures by running > 'dmesg | grep alg'. > > If there are test failures, please also check whether they were already > failing prior to this patchset. > > Eric Biggers (3): > crypto: sparc/aes - convert to skcipher API > crypto: sparc/camellia - convert to skcipher API > crypto: sparc/des - convert to skcipher API > > arch/sparc/crypto/aes_glue.c | 310 +++++++++---------- > arch/sparc/crypto/camellia_glue.c | 217 ++++++------- > arch/sparc/crypto/des_glue.c | 499 ++++++++++++++---------------- > crypto/Kconfig | 5 +- > 4 files changed, 468 insertions(+), 563 deletions(-) All applied. Thanks.