Lines Matching defs:mop
118 struct mppe_state *mop = (struct mppe_state *)v;
120 if (mop->stateless)
124 mop->flushnext = 1;
161 struct mppe_state *mop = (struct mppe_state *)v;
185 prefix = MPPE_ENCRYPTED | mop->cohnum;
187 if (mop->stateless ||
188 (mop->cohnum & MPPE_HEADER_FLAGMASK) == MPPE_HEADER_FLAG) {
190 log_Printf(LogDEBUG, "MPPEOutput: Key changed [%d]\n", mop->cohnum);
191 MPPEKeyChange(mop);
195 if (mop->stateless || mop->flushnext) {
198 mop->flushnext = 0;
204 mop->cohnum);
205 RC4_set_key(&mop->rc4key, mop->keylen, mop->sesskey);
213 RC4(&mop->rc4key, 2, (char *)&nproto, rp + 2);
217 RC4(&mop->rc4key, ilen, rp, rp);
219 mop->cohnum++;
220 mop->cohnum &= ~MPPE_HEADER_BITMASK;
737 struct mppe_state *mop;
744 if ((mop = MPPE_InitState(o)) == NULL) {
749 log_Printf(LogDEBUG, "MPPE: InitOutput: %d-bits\n", mop->keybits);
753 if (mop->keylen > bundle->radius.mppe.sendkeylen)
754 mop->keylen = bundle->radius.mppe.sendkeylen;
755 if (mop->keylen > sizeof mop->mastkey)
756 mop->keylen = sizeof mop->mastkey;
757 memcpy(mop->mastkey, bundle->radius.mppe.sendkey, mop->keylen);
760 GetAsymetricStartKey(MPPE_MasterKey, mop->mastkey, mop->keylen, 1,
763 GetNewKeyFromSHA(mop->mastkey, mop->mastkey, mop->keylen, mop->sesskey);
765 MPPEReduceSessionKey(mop);
769 if (!mop->stateless) {
775 mop->cohnum);
776 RC4_set_key(&mop->rc4key, mop->keylen, mop->sesskey);
779 return mop;