/* Key Derivation, from RFC 3078, RFC 3079. Equivalent to Get_Key() for MS-CHAP as described in RFC 3079.  */
static void get_new_key_from_sha(struct ppp_mppe_state *state)
/* Key Derivation, from RFC 3078, RFC 3079. Equivalent to Get_Key() for MS-CHAP as described in RFC 3079.  */
static void get_new_key_from_sha(struct ppp_mppe_state *state)
{
	struct hash_desc desc;
	struct scatterlist sg[4];
	unsigned int nbytes;
	sg_init_table(sg, 4);
	nbytes = setup_sg(&sg[0], state->master_key, state->keylen);
	nbytes += setup_sg(&sg[1], sha_pad->sha_pad1,
			   sizeof(sha_pad->sha_pad1));
	nbytes += setup_sg(&sg[2], state->session_key, state->keylen);
	nbytes += setup_sg(&sg[3], sha_pad->sha_pad2,
			   sizeof(sha_pad->sha_pad2));
	desc.tfm = state->sha1;
	desc.flags = 0;
	crypto_hash_digest(&desc, sg, nbytes, state->sha1_digest);
}