User Tools

Site Tools


drivity_tools

WHAT IS DRIVITY TOOLS

Drivity Tools is the multifunctional component providing almost everything needed for secure vehicle (and not just vehicle) tracking and general data security. This software component lets you easily implement LBS and generally GNSS related features including backend data exchange.

Drivity Tools includes several separate functions such as NMEA parser, LBS API, RSA and AES256 encryption, JSON parser and composer and some more. All these blocks can be used separately as dedicated software libraries, however they are integrated to each other. Finally, powerful command line utility provided as a solid demo of high level API, which is also applicable for practical usage.

Drivity Tools is basically a most valuable part of the firmware of Componentality Drivity product and also used in some other products of Componentality, being a company standard in secure data gathering, storing and exchange.

Drivity Tools is available for Windows and Linux. It also can be built on other POSIX platforms, but not yet tested there. It can be used instead of gpsd under Linux, but generally provides a lot more. And definitely it is mostly focused on security because tracking is very sensitive to private data leaks.

LICENSE

Drivity Tools is available under GPL license due to using of internal components published under this license. You must put Drivity-based code to OSS domain by default. If you intend to use your code under some other conditions, please request Componentality for appropriate permit and legal assistance.

Copyright © 2014, Componentality Oy, Konstantin A. Khait

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

WHAT DRIVITY TOOLS CONSISTS OF?

Drivity Tools component contains several parts doing separated things and being integrated to a single entity just to avoid putting extra integration job to the programmer using it.

- Restricted edition of CST middleware. Old, but still used set of components doing commonly used things like memory management and unified API provisioning. This framework is fully hidden from the applied level and shouldn't be accessed directly. CommonLibs code base becomes a replacement of CST middleware for Drivity Tools, but not yet completed

- Streaming NMEA parser. This component is standalone and can be separated from entire Drivity Tools set if required for the project. NMEA parser can be used as very light and controllable replacement for gpsd and also applied for in-app tasks related to GPS data processing. It uses C++ API, which is event-based and might be a little bit sophisticated for simple tasks

- drvloc API. Simplified non-streaming oriented API for vehicle location information management. Assumes packaging of the data to simple structures. Also contains primitive encryption API to cover easy security tasks. drvloc API is fully done in C, therefore can be precompiled to pure C projects.

- LBSAPI. Full-scale tracking API, including data gathering, packaging to JSON structures, encryption and decryption, keys management and so on. Might be used for complex tracking projects.

- drivity CLI - command line utility for most typical operations.

The high level interface is to provide the unified approach for most common things and simplify access to the useful, but complicated features. In case of more special tasks, the programmer should use lower level Drivity Tools interfaces.

COMPARISON WITH OTHER APPROACHES

SSL

Drivity Tools security approach is very similar to SSL. It also uses symmetrical data encryption with asymmetrical encryption of session key and has a comparable level of protection. The key difference Drivity Tools has no extra functions, it uses just one crypto hash algorithm (SHA1), one symmetrical encryption approach (AES256) and one asymmetrical algorithm (RSA). It also doesn't include X.509 support and third party certificates validation, which is important for Internet communication, but typically unuseful for autonomous vehicle tracking with pre-programmed keys.

gpsd

Drivity tools contains only one parser for regular text NMEA. It doesn't support proprietary GPS receiver formats as well as binary NMEA. Drivity Tools is not to be used as a universal GPS processing software, but as an easy processor for most common data format, supported by the most of receivers.

DRIVITY TOOLS COMMAND LINE INTERFACE (CLI)

Drivity Tools CLI is the client to the high level interface (LBSAPI). It performs the most common function and can be used for simple and frequently used tasks directly from the OS command line.

Usage: drivity command [arguments]

Following commands are supported:

init (node-id) - this command is to be used ones to create unique keys for the given device. As the result, command returns Base64 encoded key block containing public keys for the device to be stored in the file and shared with partner devices. It also creates private keys storage on the local machine (in /etc/drivity for Linux, C:\Drivity for Windows)

pair (remote-node-id) (file-with-remote-keys) - the command registers remote device with given name and public keys. After device is registered, all data will be encrypted using its public keys and become available for it for decoding. By default Drivity Tools makes data available to all paired devices. It makes encryption faster, but may create a big overhead if many paired devices used. For typical cases when multiple trackers communicate to a single server, this approach is fine enough. If the number of paired devices become large, it is better to use dedicated encryption commands (see below).

list - the command lists remote devices being already paired to this one.

forget (remote-node-id) removes given device from the list of paired devices. This device will not be allowed to decode data produced by the calling node anymore.

track (period) (output-folder) [(input-file)] - the command is to get NMEA from stdin or input file is passed and create a set of vehicle location records in the output folder. Records are JSON structures encrypted with RSA + AES256 and protected with encrypted SHA1 e-signature. Period specifies which interval in seconds shall be between the consequent records. These records can be delivered to paired devices for decryption

parse (record-file) - decrypts given record with location information. Dual operation to “track” except only uses a single record

+gates (gates-list-file) adds geofencing zones to the list of gates

-gates (gates-list-file) removes geofencing zones from the list of gates

gates lists geofencing zones being currently available for the device

encrypt (input-file) (output-file) [(target-id)] encrypts given file with AES256 + RSA and signs it with e-signature. If target node id is not provided, it provides encryption for all paired nodes, otherwise only for the node specified.

decrypt (input-file) (output-file) decrypts given file if it is possible for the given device

Encrypt and decrypt commands let use Drivity Tools encryption model for packaging of custom data, not just JSON-based location records.

drivity_tools.txt · Last modified: 2014/03/08 21:02 by aznamerovsky