Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hardware-accelerated encryption to rosbags #1

Merged
merged 12 commits into from
Feb 22, 2018

Conversation

madsciencetist
Copy link

Start with ros#1206, in which encryption was added to rosbags upstream. An asymmetric GPG public key encrypts a symmetric AES cipher, which encrypts the data itself. To decrypt, the corresponding private key is looked up and used to decrypt the AES cipher to decrypt the data.

The Bag class is in ros_comm, the lowest-level ROS package. ros#1206 added a dependency on pluginlib and changed the Bag ABI, so it could not be added to ROS Kinetic and was instead targeted for ROS Lunar and later. We need it for Kinetic though, so @Burgos backported it to Kinetic. We will have to be careful about the ABI change. Any ros-kinetic-* package that creates a Bag object in C++ will be break. Conveniently, I don't think there are any; the only nodes/tools I know of that work with Bag objects are in this repo.

Benchmarking on my desktop, turning on encryption raised record CPU usage from 40% to 50%, which would be unacceptable given out lack of CPU headroom. @Burgos upgraded the aes_encryptor to use AES-NI hardware-accelerated AES encryption instead of the default software implementation. With AES-NI, turning on encryption only raises record CPU usage from 40% to 41%.

I created this kinetic-release branch off of tag 1.12.12, which is currently the most recently released version of ros-kinetic-ros-comm.

Copy link

@r2dkennobi r2dkennobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't find anything glaringly obvious. Would've liked to have kept the software AES option just in case but otherwise, looks good. Wish I knew more about the gpgme and openssl libraries.

- With ninja, when `_rostest_ARGS` is empty, the space right before it
gets escaped, and the command that ultimately gets executed has a
trailing slash.
- rospy.log testing fails because our ROSCONSOLE_FORMAT does not print
severity
- bag.py had a bug in get_info_str() that has been fixed upstream
- bz2 performs a few bytes better than expected, failing the rosbag
compression test
- roswtf tests had an outdated dependency list (TBH I don't understand
what this list is)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants