Skip to contentSkip to conversation

des_s390: use generic weak key check

PATCH In review Jan Glauber 1 participant 1 message May 20, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 des_s390: use generic weak key check

Get rid of the des_s390 specific key check module and use the generic DES weak key check instead. Also use the generic DES header and remove the weak key check in 3DES mode, as RFC2451 mentions that the DES weak keys are not relevant for 3DES.

---
 arch/s390/crypto/Makefile        |    2 
 arch/s390/crypto/crypto_des.h    |   18 -----
 arch/s390/crypto/des_check_key.c |  132 ---------------------------------------
 arch/s390/crypto/des_s390.c      |   47 +++++--------
 4 files changed, 21 insertions(+), 178 deletions(-)
arch/s390/crypto/Makefile +1 -1
@@ -5,6 +5,6 @@
 obj-$(CONFIG_CRYPTO_SHA1_S390) += sha1_s390.o sha_common.o
 obj-$(CONFIG_CRYPTO_SHA256_S390) += sha256_s390.o sha_common.o
 obj-$(CONFIG_CRYPTO_SHA512_S390) += sha512_s390.o sha_common.o
-obj-$(CONFIG_CRYPTO_DES_S390) += des_s390.o des_check_key.o
+obj-$(CONFIG_CRYPTO_DES_S390) += des_s390.o
 obj-$(CONFIG_CRYPTO_AES_S390) += aes_s390.o
 obj-$(CONFIG_S390_PRNG) += prng.o
arch/s390/crypto/crypto_des.h deleted +0 -18
@@ -1,18 +0,0 @@
-/*
- * Cryptographic API.
- *
- * Function for checking keys for the DES and Tripple DES Encryption
- * algorithms.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
-#ifndef __CRYPTO_DES_H__
-#define __CRYPTO_DES_H__
-
-extern int crypto_des_check_key(const u8*, unsigned int, u32*);
-
-#endif //__CRYPTO_DES_H__
arch/s390/crypto/des_check_key.c deleted +0 -132

132 lines not on this page · raw message

arch/s390/crypto/des_s390.c +20 -27

127 lines not on this page · raw message