<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>petanode</title><link>https://petanode.com/</link><description>A blog about networks and software development</description><atom:link href="https://petanode.com/rss.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2025 &lt;a href="mailto:tsv.dimitrov@gmail.com"&gt;Tsvetomir Dimitrov&lt;/a&gt; </copyright><lastBuildDate>Sun, 26 Oct 2025 16:52:36 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Random Number Generators in Crypto++</title><link>https://petanode.com/posts/cryptopp/rng/</link><dc:creator>Tsvetomir Dimitrov</dc:creator><description>&lt;div&gt;&lt;p&gt;Random number generators, or RNGs, are a fundamental part of many cryptographic algorithms, so it's
no surprise that Crypto++ provides several RNG implementations. The index of the documentation lists
the following algorithms:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://petanode.com/posts/cryptopp/rng/"&gt;Read more…&lt;/a&gt; (4 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>cryptopp</category><guid>https://petanode.com/posts/cryptopp/rng/</guid><pubDate>Sun, 26 Oct 2025 16:46:24 GMT</pubDate></item><item><title>Hashing in Crypto++</title><link>https://petanode.com/posts/cryptopp/hashing/</link><dc:creator>Tsvetomir Dimitrov</dc:creator><description>&lt;div&gt;&lt;p&gt;This posts explores the hashing algorithms available in Crypto++. We will examine how to use them
independently and how to integrate them into a pipeline. First, let's review the available
implementations. These are listed in the "Hash Functions" section of the documentation index.
Notable examples include Blake2s/2b, Keccak, and SHA3. Some algorithms, such as MD5 and MD4, are
located in the &lt;code&gt;Weak&lt;/code&gt; namespace. As the name implies, these are not secure for production use and
are included only for reference.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://petanode.com/posts/cryptopp/hashing/"&gt;Read more…&lt;/a&gt; (8 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>cryptopp</category><guid>https://petanode.com/posts/cryptopp/hashing/</guid><pubDate>Fri, 02 May 2025 15:21:44 GMT</pubDate></item><item><title>Source and Sink in Crypto++</title><link>https://petanode.com/posts/cryptopp/source-and-sink/</link><dc:creator>Tsvetomir Dimitrov</dc:creator><description>&lt;div&gt;&lt;p&gt;This post builds upon &lt;a href="https://petanode.com/posts/brief-introduction-to-cryptopp/"&gt;A Brief Introduction to
Crypto++&lt;/a&gt;. I suggest to have a quick look at it before
diving into &lt;code&gt;Source&lt;/code&gt; and &lt;code&gt;Sink&lt;/code&gt; classes.&lt;/p&gt;
&lt;p&gt;Sources and sinks are quite similar, so we will review them together. Just a refresher: a source
provides an input for a Crypto++ pipeline, while a sink terminates it by saving the result to an
output. The input and output of a pipeline are usually data containers (e.g., arrays, vectors,
strings) or files.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://petanode.com/posts/cryptopp/source-and-sink/"&gt;Read more…&lt;/a&gt; (4 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>cryptopp</category><guid>https://petanode.com/posts/cryptopp/source-and-sink/</guid><pubDate>Mon, 07 Apr 2025 15:05:26 GMT</pubDate></item><item><title>My new Crypto++ ebook</title><link>https://petanode.com/posts/cryptopp-book/</link><dc:creator>Tsvetomir Dimitrov</dc:creator><description>&lt;div&gt;&lt;p&gt;EDIT (Jun 5, 2025): Update the details about the book.&lt;/p&gt;
&lt;p&gt;My first encounter with Crypto++ was at an old job. I remember struggling to find good material
aimed at novice users. I managed to complete my tasks by reading the official documentation, the
wiki (which is currently offline), and adapting the existing Crypto++ code in our codebase. However,
I missed having a quick, beginner-friendly tutorial that explained the basics of the library and
provided short examples of how to use its various algorithms.&lt;/p&gt;
&lt;p&gt;To partially address this gap, I wrote &lt;a href="https://petanode.com/posts/brief-introduction-to-cryptopp/"&gt;a blog post&lt;/a&gt;
that outlined some Crypto++ usage guidelines and demonstrated them with a code sample. The post
garnered some interest, which inspired me to expand the idea into a book:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://petanode.gumroad.com/l/cryptopp"&gt;&lt;img alt="The book" src="https://petanode.com/cryptopp-book/cover-small.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://petanode.com/posts/cryptopp-book/"&gt;Read more…&lt;/a&gt; (2 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>cryptopp</category><guid>https://petanode.com/posts/cryptopp-book/</guid><pubDate>Mon, 07 Apr 2025 15:04:40 GMT</pubDate></item><item><title>Rust for C++ developers part 5: Option and Result</title><link>https://petanode.com/posts/rust-for-cpp-devs/pt5-option-result/</link><dc:creator>Tsvetomir Dimitrov</dc:creator><description>&lt;div&gt;&lt;p&gt;There are two interesting types in Rust which are implemented with enums (check the &lt;a href="https://petanode.com/posts/rust-for-cpp-devs/pt4-enums-destructuring-pattern-matching/"&gt;previous
post&lt;/a&gt; for more about enums).
They are &lt;code&gt;Option&lt;/code&gt; and &lt;code&gt;Result&lt;/code&gt;. Let's start with &lt;code&gt;Option&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://petanode.com/posts/rust-for-cpp-devs/pt5-option-result/"&gt;Read more…&lt;/a&gt; (9 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>rust</category><category>rust-for-cpp-devs</category><guid>https://petanode.com/posts/rust-for-cpp-devs/pt5-option-result/</guid><pubDate>Sat, 02 Mar 2024 15:08:40 GMT</pubDate></item><item><title>Rust for C++ developers part 4: Enums, destructuring and pattern matching</title><link>https://petanode.com/posts/rust-for-cpp-devs/pt4-enums-destructuring-pattern-matching/</link><dc:creator>Tsvetomir Dimitrov</dc:creator><description>&lt;div&gt;&lt;p&gt;Rust enums are similar to the ones in C++ with one subtle difference - Rust ones allow you to bundle
additional data with each variant. This feature combined with destructuring and pattern matching is
very powerful. What I find interesting is that each feature is nothing special on its own but
combining them together allows you to write very elegant code. In my opinion these are one of the
coolest features of Rust. Let's start with enums.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://petanode.com/posts/rust-for-cpp-devs/pt4-enums-destructuring-pattern-matching/"&gt;Read more…&lt;/a&gt; (9 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>rust</category><category>rust-for-cpp-devs</category><guid>https://petanode.com/posts/rust-for-cpp-devs/pt4-enums-destructuring-pattern-matching/</guid><pubDate>Wed, 21 Feb 2024 07:12:27 GMT</pubDate></item><item><title>Rust for C++ developers part 3: Ownership and Borrowing</title><link>https://petanode.com/posts/rust-for-cpp-devs/pt3-ownership-borrowing/</link><dc:creator>Tsvetomir Dimitrov</dc:creator><description>&lt;div&gt;&lt;p&gt;This is the third post from my &lt;a href="https://petanode.com/posts/rust-for-cpp-devs/"&gt;Rust for C++ developers&lt;/a&gt; series. With
references and traits covered now is a good time to learn about ownership and borrowing. Rust is a
system programming language and as such the memory management is a very important topic. I assume
you are already familiar with what stack and heap is and how it works in general. If not - you can
read &lt;a href="https://doc.rust-lang.org/book/ch04-01-what-is-ownership.html#the-stack-and-the-heap"&gt;this
section&lt;/a&gt; from
the Rust book. If you are not familiar with the references in Rust and you have missed &lt;a href="https://petanode.com/posts/rust-for-cpp-devs/pt2-ref-struct-trait/"&gt;part
2&lt;/a&gt; I strongly recommend to read it now. You need
to understand how references work in Rust to grasp this post. But before talking about borrowing
let's discuss memory ownership.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://petanode.com/posts/rust-for-cpp-devs/pt3-ownership-borrowing/"&gt;Read more…&lt;/a&gt; (12 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>rust</category><category>rust-for-cpp-devs</category><guid>https://petanode.com/posts/rust-for-cpp-devs/pt3-ownership-borrowing/</guid><pubDate>Mon, 18 Dec 2023 18:01:57 GMT</pubDate></item><item><title>Rust for C++ developers part 2: References, Structs and Traits</title><link>https://petanode.com/posts/rust-for-cpp-devs/pt2-ref-struct-trait/</link><dc:creator>Tsvetomir Dimitrov</dc:creator><description>&lt;div&gt;&lt;p&gt;This is the second post from my &lt;a href="https://petanode.com/posts/rust-for-cpp-devs/"&gt;Rust for C++ developers&lt;/a&gt; post series
and it will focus on structs, traits and some basic data structures embedded into the language.
Similar to &lt;a href="https://petanode.com/posts/rust-for-cpp-devs/pt1-basic-syntax/"&gt;part 1&lt;/a&gt; this post will continue
exploring Rust's syntax and making parallels with C++. For each topic I'll provide links to the
&lt;a href="https://doc.rust-lang.org/book/"&gt;Rust book&lt;/a&gt;. You don't need a development environment for this
post too. &lt;a href="https://play.rust-lang.org/"&gt;Rust Playground&lt;/a&gt; should be enough to run the examples and
experiment with them. Let's get started.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://petanode.com/posts/rust-for-cpp-devs/pt2-ref-struct-trait/"&gt;Read more…&lt;/a&gt; (15 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>rust</category><category>rust-for-cpp-devs</category><guid>https://petanode.com/posts/rust-for-cpp-devs/pt2-ref-struct-trait/</guid><pubDate>Sun, 17 Dec 2023 11:37:24 GMT</pubDate></item><item><title>Rust for C++ developers part 1: Basic syntax</title><link>https://petanode.com/posts/rust-for-cpp-devs/pt1-basic-syntax/</link><dc:creator>Tsvetomir Dimitrov</dc:creator><description>&lt;div&gt;&lt;p&gt;This is the first post from my &lt;a href="https://petanode.com/posts/rust-for-cpp-devs/"&gt;Rust for C++ developers&lt;/a&gt; post series
and it will focus mainly on the basic syntax. This includes variables, functions, conditional
operators and some common Rust patterns around them. I'll try to walk you through some syntactic and
conceptual similarities and differences between the two languages based on my experience. To follow
this post you don't need to setup a compiler or an editor. You can write code online at the &lt;a href="https://play.rust-lang.org/"&gt;Rust
Playground&lt;/a&gt; and it should be enough to run the examples. For each topic
discussed in the post I'll provide links to the Rust book where you can find more detailed
information. Feel free to skip them if you are in a hurry but if you have got the time it's worth to
at least skim through the sections.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://petanode.com/posts/rust-for-cpp-devs/pt1-basic-syntax/"&gt;Read more…&lt;/a&gt; (8 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>rust</category><category>rust-for-cpp-devs</category><guid>https://petanode.com/posts/rust-for-cpp-devs/pt1-basic-syntax/</guid><pubDate>Mon, 27 Nov 2023 20:16:24 GMT</pubDate></item><item><title>Rust for C++ devs</title><link>https://petanode.com/posts/rust-for-cpp-devs/</link><dc:creator>Tsvetomir Dimitrov</dc:creator><description>&lt;div&gt;&lt;p&gt;If you want to learn Rust there are a lot of great and free resources online for you. My favourite
one is &lt;a href="https://doc.rust-lang.org/book/"&gt;The Rust Programming Language&lt;/a&gt; book also known as "The Rust
Book". It's considered the official Rust tutorial and it's one of my favourite Rust books. Before
picking up Rust I had around 10 years of C++ experience. While reading the book I noticed there are
a lot of conceptual similarities between the two languages and I was thinking how nice it would be
to have Rust explained by using the knowledge I already had from C++. It would have helped me to
build an intuition for the language and how to write more idiomatic Rust code. The Rust book is
definitely good but it doesn't make any assumptions about your background. If you already know what
RAII is, how computer memory is organised, what a pointer/reference is you will find some of the
material there redundant. When you read about something you already know you ask yourself "Is this
the same as in C++ or there is a catch?" In this post I'll try to help you build intuition about how
Rust works and how idiomatic Rust code looks like by sharing code samples, providing brief
explanations and pointing you to the corresponding chapters from the Rust book to get the full
picture. Where possible I'll make parallels with C++ and point out the differences and similarities
between the two. I hope it will make your learning process a bit faster and a bit more comfortable.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://petanode.com/posts/rust-for-cpp-devs/"&gt;Read more…&lt;/a&gt; (1 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>rust-for-cpp-devs</category><guid>https://petanode.com/posts/rust-for-cpp-devs/</guid><pubDate>Mon, 27 Nov 2023 20:16:24 GMT</pubDate></item></channel></rss>