Posts

CERN’s ROOT Primer (visualization of ping responses data)

Image
ROOT is a framework for data processing, born at CERN, at the heart of the research on high-energy physics. While Python-based data processing framewords are quite trendy now, their performance could be lacking, plus ROOT could be used within a C++ application directly. It has other interesting features too, but in this post we’re going to explore the basic usage: drawing a graph and a boxplot for the ping response values (measured directly in C++ code using Boost.Asio ). The full source in available as https://gitlab.com/nuald/nuald-blogspot-com/-/blob/master/site/adoc/ping_stats.C Pinging code is straightforward and Boost.Asio documentation could explain all unfamiliar functionality. The high level flow is: Create io_context that would wait until we hit limit of requests/responses; Start sending requests and receiving responses; During send operation we create echo ICMP header and send it with the 5 seconds timeout (and start sending again in 1 second); Du...

Multicasting chat with encryption (ECDH P-256 + AES-256-CBC)

Few years ago I published simple Python sample code for the multicasting chat, and this article is a long overdue follow-up that takes that sample to a completely new level. Current IT industry is unimaginable without cybersecurity features, and trends like "zero-trust" rely on complicated crypto algorithms which could be quite overwhelming for beginners. The example C++ code I’ve published could help you to get the ideas and code snippets for your own projects. The full source code is available on Gitlab . DISCLAIMER The code is provided as is, and has issues (including code duplication) as it mostly serves as an education project, not the production-ready code that could benefit from the proper class hierarchies, edge cases handling and better code coverage. First, let’s review the main phases of the application: Parse command line options ( -v - verbose output, -e - apply encryption) Generate EC (elliptic curve, NIST P-256 in the code) k...