Circular CAN IDs list with dynamic compression and CAN context dynamic changing
of IDs -> Cyber Security: Suppression of CAN messages
- use CAN & CAN FD
- use r0,r1/res reserved bits from Control Field
- use a simple arithmetic compression algorithm (better than RLE based on Calkin
Wilf tree)
- ECU with freeze frame data buffers which will store the IDs of an ECU which leave
or enter the communication
- security mechanism guaranteed by the fact that IDs are changed dynamic with the
context of the bus
Implies changes only the SW CAN task.
Compress only messages with a very long sequence of bits with the same value (ie
64 bits of 0 will be compressed by using the value of the fraction obtained visiting the Calkin-Wilf tree so 1/63; 1/63 will be stored using 7 bits for 1 and 7 bits for 63 -
so 14 instead 64).
Such messages will have the CAN ControlField reserved bits set at the beginning
with a fixed value which can be in time also changed via a known swapping values
mechanism.
Also the layout of bits inside such message can be circular shifted with the same
value.
63 will mean that after a sequence of 63 messages which can be again compressed
each ECU will swap using a circular mechanism the IDs for their messages.
All ECU will have the arbitration phase done more complex - each ECU will know the
real ID but using an array will store the new values.
At the begging of communication the values like 63 will be very frequent because
most of delault/init values from DBCs are with min/max values.
I.e. Motor message will have at the beginning in the DBC the CAN ID 0x10.
After 63 messages that can be compressed each ECU so also the Motor ECU will
circular shift all values of IDs with 1 position (or 63 positions).
Instead of sending the value 0x10 the Motor ECU will send it's message with a new
ID - eg 0x0F or 0x11 it depends on the direction chosen to be used for circular
shifting.
The value 63 will be used like a new XOR mask with all the bytes from each message
also CRC bits also stuffing bits, till a new value will be determined from a message
that can be again compressed.
When an ECU wants go PowerReducion it will just stop communication at the CAN
level transmission.
When an ECU want to restore from PowerReduction in the CAN communication will
send a special message with initial ID from DBC and last known ID known after last
circular shift of IDs for 2/3 times.
At this moment all ECU will receive this message and will re-init the process with
last known values of IDs -> IDs shifted with the last number of compression done,
known by the ECU that wants to re-enter into the communication.
The compression mechanism will allow each ECU to have time for something else
and the remaining bits can be filled with random values.
In this way the message i.e. 0x10 will be very difficult to be falsified and an
injected 0x10 message will not be interpreted like a valid ID due to the changed ID
arbitration mechanism.
Assures dynamic security - IDs changed dynamically also XOR datas using the
context from the bus.
Can be applied directly from the moment when a new battery is installed in a car and
this process will start with the ECUs which does not have relation with Klemme_15 -
key position.
CAN task and arbitration should be changed - in order to be done on the idexes
of the messages array and not using the values stored there - but sending these
values.
Using circular lists of IDs the values can be mathematical determined and not
necessary searched inside this array.
Saturday, May 12, 2018
Define a Transport Protocol over CAN/ FD for compressing the useful data
Define a Transport Protocol over CAN/ FD for compressing the useful data.
This should be a simple and fast algorithm for both compression/decompression
methods.
From the CAN message structure one of the bits r0 / r1 from the "Control Field" -
bits which "are reserved for future use" - can be used in order to memo if the data
can or cannot be compressed.
https://www.google.ro/search?q=vector+can+protocol+reference+chart
+pdf&biw=1920&bih=979&tbm=isch&tbo=u&source=univ&sa=X&sqi=2&ved=0CEIQsARqFQoTCIvTusjkrcgCFYcYLAodvTUIDg#%3A
In case the data can be compressed then for these message a new byte structure
should be defined.
The first byte of each CAN message should be used in order to memo if the values
can/cannot be compressed and other information all these only for the partial data
not for the cases when a complete message can be compressed in this case this first
byte will store part of the compressed data.
A 1-bit CAN signal can be set in order to show if the values that should be packed in
a message can/cannot be compressed with this algorithm.
A new bit should be used in order to specify if all data from a message or only a part
of it can be compressed.
In case of only a part of message can be compressed 3 bits + 3 bits should be again
used for storing the byte & bit position + a new byte for storing the length of the
compressed sequence.
The algorithm can be an arithmetic method based only on additions - the
compression and substraction - the decompression method.
This algorithm can use the Calkin-Wilf Tree paths(like input from original CAN data)
and generate fractions like compressed information.
This algorithm can be used and produces fractions with nominator and denominator
with less bits that the original path from the tree only for messages with many
0x00/0xFF or paths that can be found on the exterior of the Calkin-Wilf Tree. For
the sequence of bits that form the paths from the interior of this tree so path or
sequence of bits like 010101010101.. there is no gain achieved by this compression
method.
Using this fast & simple compression/decompression algorithm also the CAN
arbitration phase can be changed in order to take into account if the compressed
data are completely finished or not.
In case the compressed data was sent and it's length is less than 8 bytes during
the remaining bits that remained - so not relevant, a new arbitration phase can be
started and some speed of the entire communication can also be gained in such
cases.
Also using a compression method for the CAN data an other approach can be the
possibility to add multiplexed values so new signals on the positions gained with the
compression.
ECU can decompress and send at Vehicle CAN the un-compressed messages.
In this way the overall communication between ECUs can be increased in speed.
This should be a simple and fast algorithm for both compression/decompression
methods.
From the CAN message structure one of the bits r0 / r1 from the "Control Field" -
bits which "are reserved for future use" - can be used in order to memo if the data
can or cannot be compressed.
https://www.google.ro/search?q=vector+can+protocol+reference+chart
+pdf&biw=1920&bih=979&tbm=isch&tbo=u&source=univ&sa=X&sqi=2&ved=0CEIQsARqFQoTCIvTusjkrcgCFYcYLAodvTUIDg#%3A
In case the data can be compressed then for these message a new byte structure
should be defined.
The first byte of each CAN message should be used in order to memo if the values
can/cannot be compressed and other information all these only for the partial data
not for the cases when a complete message can be compressed in this case this first
byte will store part of the compressed data.
A 1-bit CAN signal can be set in order to show if the values that should be packed in
a message can/cannot be compressed with this algorithm.
A new bit should be used in order to specify if all data from a message or only a part
of it can be compressed.
In case of only a part of message can be compressed 3 bits + 3 bits should be again
used for storing the byte & bit position + a new byte for storing the length of the
compressed sequence.
The algorithm can be an arithmetic method based only on additions - the
compression and substraction - the decompression method.
This algorithm can use the Calkin-Wilf Tree paths(like input from original CAN data)
and generate fractions like compressed information.
This algorithm can be used and produces fractions with nominator and denominator
with less bits that the original path from the tree only for messages with many
0x00/0xFF or paths that can be found on the exterior of the Calkin-Wilf Tree. For
the sequence of bits that form the paths from the interior of this tree so path or
sequence of bits like 010101010101.. there is no gain achieved by this compression
method.
Using this fast & simple compression/decompression algorithm also the CAN
arbitration phase can be changed in order to take into account if the compressed
data are completely finished or not.
In case the compressed data was sent and it's length is less than 8 bytes during
the remaining bits that remained - so not relevant, a new arbitration phase can be
started and some speed of the entire communication can also be gained in such
cases.
Also using a compression method for the CAN data an other approach can be the
possibility to add multiplexed values so new signals on the positions gained with the
compression.
ECU can decompress and send at Vehicle CAN the un-compressed messages.
In this way the overall communication between ECUs can be increased in speed.
Subscribe to:
Posts (Atom)