Sylvain Rochet
210a2ccfdf
PPP, MSCHAP, MPPE: shared identical mppe_sha1_pad* between MSCHAP and MPPE
2015-04-18 18:51:45 +02:00
Sylvain Rochet
74054ea907
PPP, MPPE, struct ppp_mppe_state to typedef
...
We usually handle "typedefed" struct in lwIP, and I agree this is a cleaner
approach. Replaced struct ppp_mppe_state to ppp_mppe_state.
2015-04-18 14:54:25 +02:00
Sylvain Rochet
f79bc03360
PPP, MPPE, optimized struct ppp_mppe_state size
2015-04-18 13:41:38 +02:00
Sylvain Rochet
3f2e8ebcdf
PPP, MPPE, merged mppe_comp_init() and mppe_decomp_init() into mppe_init()
...
Removing a bit of redundancy and previous artefact of a generic kernel
interface. Exporting mppe_init() instead of mppe_comp_init() plus
mppe_decomp_init().
2015-04-18 00:48:26 +02:00
Sylvain Rochet
a1fe83c070
PPP, MPPE, remove dead code
2015-04-18 00:43:24 +02:00
Sylvain Rochet
879c94b01e
PPP, MPPE, removed mppe_alloc() and mppe_free()
...
We are going to use statically allocated struct ppp_mppe_state through PPP PCB,
removed now useless mppe_alloc() and mppe_free().
Merged mppe_alloc() key copy to mppe_init().
2015-04-18 00:33:57 +02:00
Sylvain Rochet
da40445d75
PPP, MPPE, changed API to use struct ppp_mppe_state* instead of void*
...
Now that struct ppp_mppe_state is exported, change MPPE API to use
struct ppp_mppe_state* instead of void*, we don't need that to be generic.
2015-04-18 00:26:15 +02:00
Sylvain Rochet
6235e1ae57
PPP, MPPE, moved struct ppp_mppe_state from mppe.c to mppe.h
...
In order to be able to use struct ppp_mppe_state statically allocated,
export struct ppp_mppe_state.
2015-04-18 00:15:52 +02:00
Sylvain Rochet
3618432107
PPP, MPPE, reworked mppe_rekey()
...
Moved sha1_context from struct ppp_mppe_state to stack, we don't need it past
mppe_rekey(). Moved shared MEMCPY() outside initial_key if block.
2015-04-18 00:02:49 +02:00
Sylvain Rochet
f1cba8a0ea
PPP, MPPE, merged get_new_key_from_sha() to mppe_rekey()
...
get_new_key_from_sha() is only used in mppe_rekey(), merged
2015-04-17 23:53:22 +02:00
Sylvain Rochet
caf9fc5687
PPP, MPPE, adapt compressor to use pbuf
...
mppe_compress() now takes a pointer to a pbuf pointer and re-use the
passed buffer for MPPE "compression".
2015-04-16 22:23:57 +02:00
Sylvain Rochet
dc93c2afec
PPP, MPPE, removed address, control and protocol from compressor input
...
Our PPP stack deals with packet without address and control byte nor 2-byte
protocol field, improved mppe_compress() so we don't have to worry about
them.
2015-04-14 22:56:46 +02:00
Sylvain Rochet
9164c4f309
PPP, MPPE, removed address, control and protocol from compressor output
...
Our PPP stack deals with packet without address and control byte nor 2-byte
protocol field, improved mppe_compress() so we don't have to worry about
them.
2015-04-14 22:56:41 +02:00
Sylvain Rochet
421582d747
PPP, MPPE, using err_t return for mppe_decompress
2015-04-12 21:09:15 +02:00
Sylvain Rochet
ab1606a0f6
PPP, MPPE, adapt decompressor to use pbuf
...
mppe_decompress() now takes a pointer to a pbuf pointer and re-use the
passed buffer for MPPE "decompression". Removed sub protocol handling
which can be shared among all decompressors in ppp.c
2015-04-12 21:04:22 +02:00
Sylvain Rochet
5f0e261f2d
PPP, MPPE, handle packets in decompressor without address and control nor protocol
...
Our PPP stack deals with packet without address and control byte nor 2-byte
protocol field, improved mppe_decompress() so we don't have to worry about
them.
2015-04-12 18:41:21 +02:00
Sylvain Rochet
89d666155d
PPP, MPPE, fixed mppe_rekey()
...
Oops, it was introduced when porting to PolarSSL ARC4.
2015-04-12 01:27:05 +02:00
Sylvain Rochet
4d6d65ee33
PPP, MPPE, fixed SHA1 padding
...
SHA1 padding is 40 byte, not 256 byte. Rekeying is done for each
packet in stateless mode, ensure speedness using static table for padding.
2015-04-11 23:57:47 +02:00
Sylvain Rochet
7285459375
PPP, MPPE, exported MPPE functions
2015-03-29 12:19:33 +02:00
Sylvain Rochet
52b7ebd4e7
PPP, MPPE, fixed compiler warnings
2015-03-29 12:19:33 +02:00
Sylvain Rochet
ea6f624b58
PPP, MPPE. fixed port mistake on SHA1 computation
2015-03-29 12:19:33 +02:00
Sylvain Rochet
3cf3b78192
PPP, MPPE, commented-in Linux interface calls structure
2015-03-29 12:19:33 +02:00
Sylvain Rochet
cdc2d034de
PPP, MPPE, temporarily replaced kzalloc() with malloc()
2015-03-29 12:19:32 +02:00
Sylvain Rochet
cd8a17d644
PPP, MPPE, removed useless Linux stuff
2015-03-29 12:19:32 +02:00
Sylvain Rochet
57e3e7f150
PPP, MPPE, improved SHA1 padding
...
Don't allocate 512 bytes of RAM for padding. Reduce overall padding
size to 64, therefore using stack instead of RAM or ROM.
2015-03-29 12:19:32 +02:00
Sylvain Rochet
c759639603
PPP, MPPE, removed "compression" stats
...
We don't need "compression" stats on a encryption protocols, as commented
"Since every frame grows by MPPE_OVHD + 2 bytes, this is always going
to look bad ... and the longer the link is up the worse it will get."
2015-03-29 12:19:32 +02:00
Sylvain Rochet
a6c101aeb8
PPP, MPPE, removed now useless setup_sg() function
2015-03-29 12:19:32 +02:00
Sylvain Rochet
7ea8a754c1
PPP, MPPE, using our ARC4 instead of Linux crypto ARC4
2015-03-29 12:19:32 +02:00
Sylvain Rochet
f9ae65acd8
PPP, MPPE, added build macro if MPPE is not enabled
2015-03-29 12:19:32 +02:00
Sylvain Rochet
cfd930cae7
PPP, MPPE, using our SHA1 instead of Linux crypto sha1
2015-03-29 12:19:32 +02:00
Sylvain Rochet
0b7e3610ac
PPP, MPPE, using lwIP ERR_BUF instead of Linux DECOMP_ERROR error type
2015-03-29 12:19:32 +02:00
Sylvain Rochet
10946e7669
PPP, MPPE, removed a bit more Linux stuff
2015-03-29 12:19:32 +02:00
Sylvain Rochet
2dcd8c2729
PPP, MPPE, removed include we don't have
2015-03-29 12:19:32 +02:00
Sylvain Rochet
0810384555
PPP, MPPE, replaced printk() to PPPDEBUG()
2015-03-29 12:19:32 +02:00
Sylvain Rochet
434fb1e0da
PPP, MPPE, fixed path to mppe.h
2015-03-29 12:19:32 +02:00
Sylvain Rochet
435a0b98ac
PPP, MPPE, cleaning license notice
...
We only need to keep the BSD license part in lwIP, cleaning the part which
is only relevant for the Linux kernel.
2015-03-29 12:19:32 +02:00
Sylvain Rochet
05eda236cc
PPP, MPPE, import unmodified Linux MPPE encoder/decoder
...
This file, which is an unmodified copy of Linux MPPE encoder/decoder, is
licensed under a dual License BSD/GPL model. It was previously in the
pppd source tree and it was removed because this is merged into the Linux
kernel.
2015-03-29 12:19:32 +02:00