crypto: 3des - move verification out of exported routine
In preparation of moving the shared key expansion routine into the DES library, move the verification done by __des3_ede_setkey() into its callers. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:

committed by
Herbert Xu

parent
dcb15794ec
commit
4fd4be0576
@@ -348,6 +348,10 @@ static int des3_ede_x86_setkey(struct crypto_tfm *tfm, const u8 *key,
|
||||
u32 i, j, tmp;
|
||||
int err;
|
||||
|
||||
err = crypto_des3_ede_verify_key(tfm, key);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* Generate encryption context using generic implementation. */
|
||||
err = __des3_ede_setkey(ctx->enc_expkey, &tfm->crt_flags, key, keylen);
|
||||
if (err < 0)
|
||||
|
Reference in New Issue
Block a user