Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\crypto\des.c Create Date:2022-07-28 06:47:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:des3_ede_expand_key

Proto:int des3_ede_expand_key(struct des3_ede_ctx *ctx, const u8 *key, unsigned int keylen)

Type:int

Parameter:

TypeParameterName
struct des3_ede_ctx *ctx
const u8 *key
unsigned intkeylen
826  pe = expkey
829  If keylen != DES3_EDE_KEY_SIZE Then Return -EINVAL
832  err = RFC2451:* For DES-EDE3, there is no known need to reject weak or* complementation keys
833  If err && err != -ENOKEY Then Return err
836  Encryption key expansion* RFC2451: Weak key checks SHOULD be performed.* FIPS 74:* Keys having duals are keys which produce all zeros, all ones, or* alternating zero-one patterns in the C and D registers after Permuted* Choice 1 has operated on the key.
836  pe += DES_EXPKEY_WORDS
836  key += DES_KEY_SIZE
837  Decryption key expansion* No weak key checking is performed, as this is only used by triple DES
837  pe += DES_EXPKEY_WORDS
837  key += DES_KEY_SIZE
838  Encryption key expansion* RFC2451: Weak key checks SHOULD be performed.* FIPS 74:* Keys having duals are keys which produce all zeros, all ones, or* alternating zero-one patterns in the C and D registers after Permuted* Choice 1 has operated on the key.
840  Return err