Giter Club home page Giter Club logo

lcm-sec's Introduction

LCMsec - Security for the Lightweight Communications and Marshalling Protocol (LCM)

LCM is a set of libraries and tools for message passing and data marshalling, targeted at real-time systems where high-bandwidth and low latency are critical. It provides a publish/subscribe message passing model and automatic marshalling/unmarshalling code generation with bindings for applications in a variety of programming languages.

This fork, LCMsec, is a security extensions for LCM. It:

  • provides confidentiality, integrity and authenticity to LCM messages
  • provides an attribute-based acces control mechanism with multicastgroup, port and channel granularity
  • aims to minimize both overhead and computational complexity - as such, LCMsec is designed to be usable in most environments in which LCM is used.
  • maintains the decentralized, peer-to-peer nature of LCM: no broker, no central instance to facilitate keyexchange
  • is scalable to many peers and capable of dealing with dynamic communication topologies (hosts leaving and joining a channel) efficiently

This is achieved with the use of:

  • a hybrid cryptosystem: a symmetric key is shared between all publishers and subscribers to a channel on a specific multicastgroup
  • No distinction between subscribers and publishers, each subscriber is also allowed to publish messages. This makes it possible to use a single shared symmetric key, and avoids issues typically associated with multicast authentication
  • A built-in, decentralized discovery protocol
  • AES/GCM or ChaChaPoly1305 as the underlying authenticated encryption algorithm.
  • The Dutta-Barua group key agreement (modified to use EC-Cryptography) to agree on the symmetric key while minimizing the number of network interactions when a publisher or subscriber joins a topic (i.e., is turned on)

For more informations please take a look at the paper on LCMsec.

Limitations of LCMsec

  • Additional dependencies are Botan and libstdc++.
  • Not yet adressed are the issues of rekeying and certificate revocation, which will be a next step.
  • Only C, C++ and Python bindings are available, Python bindings have not been tested recently
  • lcm-logger and lcm-spy are not availe
  • Only the udpm provider is available

LCMsec Quickstart guide

  • To use security features, you will need generate a root certificate and x509v3 certificate/key-pairs for each node that should communicate. Permissions are written into SAN of those certificates. For a way to generate certificates automatically, refer to examples/cpp_security/gen_certificates.py
  • The format of the SAN is a URI of the form: urn:lcmsec:gkexchg:<mcastgroup>:<port>:<channelname>:<user_id>
    • example: urn:lcmsec:gkexchg:239.255.76.67:7667:channel1:4 (for a channel)
    • for the permission to be part of a multicast group, use the special string "gkexchg_g" and omit the channelname, for instance: urn:lcmsec:gkexchg_g:239.255.76.67:7667:4
  • use lcm_create_with_security(...) (or use the c++ API in lcm-sec.hpp) to create an LCM instance that has security enabled. This call will block until the group key agreement has finished on all channels for which there are permissions in the certificate
  • At this point, just use the created lcm instance as you normally would.

An Example for an application using LCMsec can be found in examples/cpp_security folder.

Roadmap

The LCM project is active again. The current near-term plan is to:

  • Clear deprecation warnings from build for all language targets
  • Flush backlog of PRs
  • Cut a new release

Quick Links

Features

  • Low-latency inter-process communication
  • Efficient broadcast mechanism using UDP Multicast
  • Type-safe message marshalling
  • User-friendly logging and playback
  • No centralized "database" or "hub" -- peers communicate directly
  • No daemons
  • Few dependencies

Supported platforms and languages

  • Platforms:
    • GNU/Linux
      • Ubuntu (20.04 and 22.04)
      • Fedora (37)
    • macOS (11 and 12)
    • Windows (2019 and 2022) via MSYS2
  • Languages
    • C
    • C++
    • Java
    • Lua
    • MATLAB
    • Python

Unmaintained languages

The following languages are currently unmaintained. PRs for these languages are still welcome and if you are interested in maintaining them please let us know.

  • Go
  • C#/.NET

lcm-sec's People

Contributors

abachrach avatar andybarry avatar ashuang avatar aszakaly-vcc avatar bluesquall avatar cho-m avatar donkahlero avatar drmoose avatar ericcousineau-tri avatar gustafj avatar hoxell avatar ihilt avatar jbendes avatar judfs avatar jwnimmer-tri avatar kyonifer avatar m-chaturvedi avatar matt-donahoe-skydio avatar mojasp avatar mspiegel avatar mwoehlke-kitware avatar nosracd avatar patmarion avatar sammy-tri avatar severinstrobl avatar sk13 avatar tbeu avatar tderensis avatar tprk77 avatar wxmerkt avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.