User Tools

Site Tools


drivity_tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
drivity_tools [2014/03/08 20:53]
aznamerovsky
drivity_tools [2014/03/08 21:02]
aznamerovsky
Line 17: Line 17:
  
  
-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.+**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 (c) 2014, Componentality Oy, Konstantin A. Khait Copyright (c) 2014, Componentality Oy, Konstantin A. Khait
Line 24: Line 24:
  
 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 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.