User manual
Version: v4.5.2
1
set_cypherKey * ~/ key_file
Listing 16.1: Setting the key into the fusionTrack.
2. Wait for ‘
--> OK
’ to be displayed; Boot the device in application firmware by switching off and after
5 s on again
or
by running the ‘
reset * 1
’ command;
The key file can be generated from an hexadecimal number on a Linux command line with the following:
1
perl -e 'print pack "H*", "12345678901234567890123456789012" ' > key_file
Listing 16.2: Generating the key file.
Any write action performed by the
atnet
software will de-
stroy the stored key.
16.3
Checking the fusionTrack device
The Atracsys SDK allows to check if the connected fusionTrack device is correctly configured. The key and
challenge setting and the result getting are handled via options (see Section 8.1). The key must first be set
in the SDK using the ‘Set cypher key’ option: it is a binary option, which content must be 16 bytes long.
Then, challenges can be requesting using the ‘Request challenge’ binary option, which content must be
8 bytes long. It will fail if no key has previously been set or if the last request was performed less than 1 s
ago. Finally, the integer ‘Challenge result’ option allows to check wether the two encrypted challenges (i.e.
the one computed by the fusionTrack device and the SDK) are the same, in which case a
1
is returned, or
not, in which case a
0
is returned. A full example is shown on Listing 16.3.
1
/* The uploaded file contains "This is my key !!", which translates into
2
* 0x54 0x68 0x69 0x73 0x20 0x69 0x73 0x20 0x6d 0x79 0x20 0x6b 0x65 0x79 0x21 0x21 in ASCII.
3
* lib is a valid library handle , sn the serial number of an enumerated device .
4
* setKeyId , requestChallengeId and checkChallengeId are the option IDs of the
5
* `Set cypher key ', `Request challenge ' and `Challenge result ' options
6
* respectively .
7
*/
8
9
ftkBuffer buffer ;
10
buffer .reset ();
11
buffer .data[ 0x0u ] = 0x54;
12
buffer .data[ 0x1u ] = 0x68;
13
buffer .data[ 0x2u ] = 0x69;
14
buffer .data[ 0x3u ] = 0x73;
15
buffer .data[ 0x4u ] = 0x20;
16
buffer .data[ 0x5u ] = 0x69;
17
buffer .data[ 0x6u ] = 0x73;
18
buffer .data[ 0x7u ] = 0x20;
19
buffer .data[ 0x8u ] = 0x6d;
20
buffer .data[ 0x9u ] = 0x79;
21
buffer .data[ 0xau ] = 0x20;
22
buffer .data[ 0xbu ] = 0x6b;
23
buffer .data[ 0xcu ] = 0x65;
24
buffer .data[ 0xdu ] = 0x79;
25
buffer .data[ 0xeu ] = 0x21;
Atracsys / 2020-06-17 / 16:48:00
88 / 113