CANedge2 Docs, Release FW 01.04.02
5. Derive shared symmetric key using HMAC-SHA256 with “config” as data and shared secret as key.
Use the first 16 bytes of the output
6. Encode user public key (used by the device to calculate the same shared symmetric key for decryp-
tion)
7. Set the encoded user public key in the device configuration file
8. Use AES-128 CTR to encrypt protected fields using the symmetric key. The resulting initialization
vector (iv) and cipher text (ct) are concatenated (iv + ct), base64 encoded and stored in the
configuration file
Note:
The symmetric key shall match the public key set by the user in the configuration and protected
fields shall be encrypted with this symmetric key
Note:
By storing the symmetric key it is possible to change specific protected fields - without updating
the user public key (and in turn all other protected fields)
Encryption tools
Tools are provided with the CANedge for use in encrypting secure fields - see the CANedge Intro.
Example Python code
You can batch-encrypt passwords across multiple devices using e.g. Python. Below we provide a basic
code sample to illustrate how Python can be used to encrypt plain-text data. The example code is tested
with
Python 3.7.2
and requires the
pycryptodome
crypto library:
Python example code
0.4.2 Logging
This page documents the
logging
configuration
0.4.2.1 Configuration file fields
This section is autogenerated from the Rule Schema file.
File
file
File split size (1 to 512 MB)
file.properties.split_size
Log file split size in MB. When the file split size is reached a new file is created and the logging continues.
Closed log files can be pushed to a server if WiFi is available. Small split sizes may reduce performance.
type:
integer
default:
50
minimum:
1
maximum:
512
16
CONTENTS