<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mahdi Chaari</title>
    <description>The latest articles on DEV Community by Mahdi Chaari (@mahdichaari01).</description>
    <link>https://dev.to/mahdichaari01</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1039848%2F4c487575-46c7-4ea4-bc2a-7e6f7f571ffb.png</url>
      <title>DEV Community: Mahdi Chaari</title>
      <link>https://dev.to/mahdichaari01</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mahdichaari01"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>Mahdi Chaari</dc:creator>
      <pubDate>Mon, 16 Jun 2025 22:48:40 +0000</pubDate>
      <link>https://dev.to/mahdichaari01/-5b9n</link>
      <guid>https://dev.to/mahdichaari01/-5b9n</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/mahdichaari01/c-unsafe-doesnt-always-mean-dangerous-how-i-increased-performance-with-raw-pointers-2lee" class="crayons-story__hidden-navigation-link"&gt;C++, Unsafe Doesn’t Always Mean Dangerous : How I increased performance with raw pointers&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/mahdichaari01" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1039848%2F4c487575-46c7-4ea4-bc2a-7e6f7f571ffb.png" alt="mahdichaari01 profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/mahdichaari01" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Mahdi Chaari
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Mahdi Chaari
                
              
              &lt;div id="story-author-preview-content-2598330" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/mahdichaari01" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1039848%2F4c487575-46c7-4ea4-bc2a-7e6f7f571ffb.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Mahdi Chaari&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/mahdichaari01/c-unsafe-doesnt-always-mean-dangerous-how-i-increased-performance-with-raw-pointers-2lee" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jun 16 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/mahdichaari01/c-unsafe-doesnt-always-mean-dangerous-how-i-increased-performance-with-raw-pointers-2lee" id="article-link-2598330"&gt;
          C++, Unsafe Doesn’t Always Mean Dangerous : How I increased performance with raw pointers
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/cpp"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;cpp&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/opengl"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;opengl&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ffmpeg"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ffmpeg&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/mahdichaari01/c-unsafe-doesnt-always-mean-dangerous-how-i-increased-performance-with-raw-pointers-2lee" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/raised-hands-74b2099fd66a39f2d7eed9305ee0f4553df0eb7b4f11b01b6b1b499973048fe5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;3&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/mahdichaari01/c-unsafe-doesnt-always-mean-dangerous-how-i-increased-performance-with-raw-pointers-2lee#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              2&lt;span class="hidden s:inline"&gt; comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>cpp</category>
      <category>opengl</category>
      <category>ffmpeg</category>
    </item>
    <item>
      <title>C++, Unsafe Doesn’t Always Mean Dangerous : How I increased performance with raw pointers</title>
      <dc:creator>Mahdi Chaari</dc:creator>
      <pubDate>Mon, 16 Jun 2025 22:40:18 +0000</pubDate>
      <link>https://dev.to/mahdichaari01/c-unsafe-doesnt-always-mean-dangerous-how-i-increased-performance-with-raw-pointers-2lee</link>
      <guid>https://dev.to/mahdichaari01/c-unsafe-doesnt-always-mean-dangerous-how-i-increased-performance-with-raw-pointers-2lee</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR:
&lt;/h2&gt;

&lt;p&gt;When building a real-time video rendering and encoding pipeline in C++, I hit a surprising bottleneck: memory allocation. Despite using high-performance libraries like OpenGL and FFmpeg, the cost of safely copying ~5MB per frame killed my frame budget. The fix? Using raw pointers with a manually managed double buffer. It’s not idiomatic C++, but in this case, “unsafe” code—done carefully—was the only way to hit performance targets.&lt;/p&gt;




&lt;p&gt;As a person who worked in managed runtimes like NodeJs and the Golang runtime, thinking about memory management always felt like premature optimisations because the runtime, or the underlying libraries generally handled it really well. However, in C++ it is the name of the game. The language offers multiple ways to manage memory and resource lifecycles like RAII, smart pointers and manual work using raw pointers. And in general it is never a good idea to work with raw pointers due to their complexity and risk. Leaks, dangling pointers, double frees… the list is long. But sometimes, performance demands pull you back into the wild.&lt;/p&gt;

&lt;p&gt;I'll share a story, about how raw pointers saved my project from business unviability.&lt;br&gt;
 &lt;br&gt;
In a project I am working on, I have to Render 800 frames per second of 48GB of gpu assets then encoding them into real time video streams, all in real time, on a single powerful machine. If I can't achieve these numbers, the project dies.&lt;/p&gt;

&lt;p&gt;The rendering side uses OpenGL; the encoding side uses libav (FFmpeg). Both are highly optimised but in completely different ecosystems.&lt;/p&gt;

&lt;p&gt;At first glance, the heavy GPU work seemed like the obvious bottleneck:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rendering 4M+ triangles per frame&lt;/li&gt;
&lt;li&gt;Reading GPU memory back to the CPU&lt;/li&gt;
&lt;li&gt;Passing the frame to the encoder&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But after measuring… surprise: The bottleneck wasn’t GPU work.&lt;br&gt;
It was memory allocation.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Hidden Bottleneck: Memory Allocation
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Back to the drawing board?
&lt;/h3&gt;

&lt;p&gt;When planning the project, I did some benchmarks: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;real-time encoding can be done quickly on the separate Nvenc ship ( or apple video toolbox on Apple Silicon)&lt;/li&gt;
&lt;li&gt;Optimised rendering allows for huge gains even with large polygon count, and testing showed it could clearly meet our frame budget&lt;/li&gt;
&lt;li&gt;Encoding and rendering are done on different dies in the GPU so they can be parallelised and shouldn't affect each other&lt;/li&gt;
&lt;li&gt;we have a double buffer per stream, and since we're rendering in a round robin fashion, and since encoding is much faster than rendering, it is not possible that rendering is being blocked by the locking mechanism in place.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Looking at the estimates, putting everything together should work. But there was a problem hiding in plain sight.&lt;/p&gt;

&lt;p&gt;Both OpenGL and libav manage their own memory layouts and object lifetimes. When bridging them, the easy (and “safe”) path is to copy frame data into a newly allocated buffer for each AVFrame. &lt;/p&gt;

&lt;p&gt;That means allocating and copying ~5MB per frame, at hundreds or thousands of frames per second.&lt;br&gt;
Across multiple threads.&lt;br&gt;
While trying to maintain real-time performance.&lt;/p&gt;

&lt;p&gt;That quickly became a page-fault storm. My rendering time per frame went from 1.3ms per frame to more than double that.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Fix: Controlled Unsafe Code
&lt;/h2&gt;

&lt;p&gt;So I broke the rules.&lt;/p&gt;

&lt;p&gt;Instead of copying memory or using RAII, I created a manually-managed double buffer. Both OpenGL and libav operate on shared raw memory. I carefully coordinate access, and validate every pointer and layout match using source inspection and testing.&lt;/p&gt;

&lt;p&gt;This is what optimized code sometimes looks like in C++:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct DoubleBuffer {
    char* front;
    char* back;
    int size;
    void swap();
    char* frontBuffer();
    char* backBuffer();
    ~DoubleBuffer() {
        delete[] front;
        delete[] back;
    }
};

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The renderer writes into the front buffer.&lt;/p&gt;

&lt;p&gt;The encoder reads from the back buffer.&lt;/p&gt;

&lt;p&gt;We swap them on each frame.&lt;/p&gt;

&lt;p&gt;And we use the less-safe versions of &lt;code&gt;AVFrame&lt;/code&gt; and &lt;code&gt;Image&lt;/code&gt; that just wrap existing buffers. &lt;/p&gt;

&lt;p&gt;No allocations. No copies. Just raw throughput.&lt;br&gt;
Is it safe? Not in the traditional RAII sense.&lt;br&gt;
But it is controlled, isolated, and fast.&lt;/p&gt;

&lt;p&gt;In other higher level C++ code this feels like a crime, but reading the libraries source code, and ensuring safety through verification and understanding memory layout well is also called safety. &lt;/p&gt;

&lt;p&gt;Sometimes encapsulation leads to performance traps, to the favor of clean and easy to use interfaces. &lt;/p&gt;

&lt;p&gt;In C++, "unsafe" doesn't have to mean dangerous.&lt;br&gt;
It can mean deliberate, validated, and surgical.&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>opengl</category>
      <category>ffmpeg</category>
    </item>
    <item>
      <title>An Introduction for Developers to Information Security</title>
      <dc:creator>Mahdi Chaari</dc:creator>
      <pubDate>Sat, 26 Aug 2023 12:50:37 +0000</pubDate>
      <link>https://dev.to/mahdichaari01/information-security-4lhe</link>
      <guid>https://dev.to/mahdichaari01/information-security-4lhe</guid>
      <description>&lt;h2&gt;
  
  
  Table of Content
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Introduction - Remembering the man who saved 17 million lives&lt;/li&gt;
&lt;li&gt;Information Security - Fifth dimension of warfare&lt;/li&gt;
&lt;li&gt;Cybersecurity&lt;/li&gt;
&lt;li&gt;Terminology

&lt;ul&gt;
&lt;li&gt;IT Systems Failure&lt;/li&gt;
&lt;li&gt;Vulnerability, Threat, and Control&lt;/li&gt;
&lt;li&gt;The CIA Triad&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Takeaway&lt;/li&gt;
&lt;li&gt;About the Author&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction - Remembering the man who saved 17 million lives
&lt;/h2&gt;

&lt;p&gt;In the depths of the North Atlantic on August 27, 1941, the stage was set for a pivotal moment in WWII. &lt;br&gt;
The British captured a German U-boat, U-570, and seized its Enigma machine. The Enigma machine was a device used to encrypt and decrypt messages, and its capture was a major intelligence coup for the Allies.&lt;/p&gt;

&lt;p&gt;The Enigma machine was very complex, and its encryption code changed daily. However, British mathematician Alan Turing and his team were able to break the Enigma code by exploiting a weakness in the system: every message started with the same phrase "Hail, [the Nazi's leader name]".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Xcma_Z9x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yw3j8ugollrofkldmaz7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Xcma_Z9x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yw3j8ugollrofkldmaz7.png" alt="Turing and the enigma" width="800" height="481"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With the help of the Enigma machine, the Allies were able to read German communications, which gave them a major advantage in the war. &lt;br&gt;
Today, there is a general agreement that the intelligence gathered by intercepting German communications, shortened the war by at least two years, saving an estimated 17 million lives. &lt;/p&gt;

&lt;p&gt;These events exemplify the information security workflow in action. &lt;/p&gt;

&lt;p&gt;For example, modifying encryption code serves as a &lt;strong&gt;control measure&lt;/strong&gt; to mitigate potential exposure of enigma code, thereby reducing the &lt;strong&gt;threat of interception&lt;/strong&gt;. Notably, during the war, Alan Turing &lt;strong&gt;exploited a vulnerability&lt;/strong&gt; involving repeated strings to &lt;strong&gt;attack&lt;/strong&gt; the German information system, gaining a strategic advantage.&lt;/p&gt;

&lt;p&gt;Throughout this article, I aim to provide an introduction to information security and its associated terminology.&lt;/p&gt;

&lt;h2&gt;
  
  
  Information Security - Fifth dimension of warfare
&lt;/h2&gt;

&lt;p&gt;Information security, often abbreviated as "InfoSec" refers to the practice of protecting information and data from unauthorized access, use, disclosure, disruption, modification, or destruction.&lt;br&gt;
The formalization and standardization of Information Security became imminent during the events of WWII and made a huge impact on the Cold War, which was deemed by many as an Intelligence war. &lt;br&gt;
Information operations were &lt;a href="[Information%20Operations:%20The%20Fifth%20Dimension%20of%20Warfare%20Homeland%20Security%20Digital%20Library%20https://www.hsdl.org%20%E2%80%BA%20view](https://www.hsdl.org/?view&amp;amp;did=439942)"&gt;declared&lt;/a&gt; as the 5th dimension of Warfare, along side Land, Sea, Air and Space, on April 25, 1995 by United States Department of Defense. &lt;/p&gt;

&lt;h2&gt;
  
  
  Cybersecurity
&lt;/h2&gt;

&lt;p&gt;People often confuse &lt;em&gt;CyberSec&lt;/em&gt; and &lt;em&gt;InfoSec&lt;/em&gt;, and given the emphasis we put on digitalization and how our world has become dependent on technology you can't really blame them. More often than not, &lt;strong&gt;information IS digital data&lt;/strong&gt;. However, people involved in the software development process may benefit from the distinction.&lt;br&gt;
Cybersecurity is concerned with securing different critical systems and sensitive information from &lt;strong&gt;unwanted&lt;/strong&gt; access, meaning using the systems in ways that were not supposed to be allowed.&lt;br&gt;
In more technical terms, cybersecurity protects against failures. For example, a failure to hide user-sensitive information or a failure to stop malicious actors from controlling sensitive resources, etc.&lt;/p&gt;

&lt;p&gt;For a developer, understanding the technical terms and the basic foundational concepts used in cybersecurity, is very valuable, because it gives them an understanding of the abstractions they are using ( in the form of libraries, and API calls ... ). &lt;br&gt;
In the next section, we're going to discuss some basic terminology from &lt;em&gt;InfoSec&lt;/em&gt; and &lt;em&gt;CyberSec&lt;/em&gt; which can be helpful when reading documentation and specifications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Terminology
&lt;/h2&gt;

&lt;h3&gt;
  
  
  IT Systems Failure
&lt;/h3&gt;

&lt;p&gt;An IT system failure is an event in which an IT system does not function as intended. &lt;/p&gt;

&lt;p&gt;These failures can be best understood when viewed from the perspective of the intersection of these two dimensions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Impact&lt;/strong&gt;: Catastrophic vs Harmless. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intent&lt;/strong&gt;: Malicious vs Non-malicious. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--i9gTtbkL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e1b41mu741n5v48e61zd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i9gTtbkL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e1b41mu741n5v48e61zd.png" alt="Image description" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By modeling failures in this way, we can see that they can fall into any of the four quadrants of the spectrum. The specific controls and strategies used to manage IT system failures depend on the type of failure.&lt;/p&gt;

&lt;p&gt;Non-malicious failures are either physical failures such as hardware failures, natural disasters ... or either caused by human error. When designing systems, it is important to consider non-malicious failures and to evaluate their impact on the overall functioning of the system.&lt;/p&gt;

&lt;p&gt;Malicious failures, on the other hand, are caused by intentional actions, such as cyberattacks. It is important to always assume that your system is under attack, no matter its scale. &lt;/p&gt;

&lt;p&gt;To demonstrate how failures can vary on the impact spectrum, imagine a hacker targeting a company's Information System. If the hacker gains access to an internal administrative endpoint, it's a &lt;strong&gt;malicious&lt;/strong&gt; failure to secure internal resources. Depending on the outcome:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; It can be &lt;strong&gt;Harmless&lt;/strong&gt;: The internal APIs are protected by a firewall from public access. The security team can detect this unwanted access and patch the non-critical issue and no harm is done to the system and data. &lt;/li&gt;
&lt;li&gt;or &lt;strong&gt;Catastrophic&lt;/strong&gt;: The internal APIs are not protected against external access, the hacker successfully gains access to internal information.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Vulnerability, Threat, and Control
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Threats are blocked or prevented from being actualized by controlling vulnerabilities&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Vulnerability&lt;/strong&gt;: is a flaw in a system resulting from bad design or false assumptions. They weaken the overall security of the system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Threat&lt;/strong&gt;: is a potential event or action that may result in a system failure. Threats are facilitated by vulnerabilities to do any combination of the following harmful acts: 

&lt;ul&gt;
&lt;li&gt;fabrication (e.g.: creation of fake accounts)&lt;/li&gt;
&lt;li&gt;Modification (e.g.: adding money to a bank account)&lt;/li&gt;
&lt;li&gt;interception (e.g.: reading sensitive information)&lt;/li&gt;
&lt;li&gt;interruption (e.g.: overloading critical systems)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Control&lt;/strong&gt;: also called countermeasure, is a measure or action taken to reduce the likelihood or impact of a threat. Controls can be technical, such as firewalls and intrusion detection systems, or non-technical, such as security awareness training.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This model helps us identify the weaknesses of a system, evaluate their impact, and make calculated decisions on how to solve them.&lt;br&gt;
To illustrate this concept, imagine encountering a &lt;strong&gt;vulnerability&lt;/strong&gt; within a critical dependency of our system. In assessing the potential &lt;strong&gt;threat&lt;/strong&gt; presented by this vulnerability, the security team undertakes a thorough evaluation. Let's consider the example of the &lt;a href="https://en.wikipedia.org/wiki/ReDoS"&gt;ReDoS&lt;/a&gt; vulnerability. ReDoS is a flaw often found in specific regex engines, triggering an infinite loop when certain characters are encountered. This loop, if triggered, can lead to system crashes and potential disruptions. In instances where the conditions for the &lt;strong&gt;vulnerability&lt;/strong&gt; to be exploited are rare or improbable, the security team may determine that the associated &lt;strong&gt;threat&lt;/strong&gt; is of negligible concern. Consequently, the necessity of implementing additional &lt;strong&gt;controls&lt;/strong&gt; might be deemed unnecessary.&lt;/p&gt;

&lt;h3&gt;
  
  
  The CIA Triad
&lt;/h3&gt;

&lt;p&gt;While the previous model gave a vulnerability assessment strategy, this model defines a set of system requirements, that, when met, the information system is deemed secure, according to the ISO Standard.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;confidentiality&lt;/strong&gt;: property that information is not made available or disclosed to unauthorized individuals, entities, or processes&lt;br&gt;
&lt;strong&gt;integrity&lt;/strong&gt;: property of accuracy and completeness&lt;br&gt;
&lt;strong&gt;availability&lt;/strong&gt;: property of being accessible and usable on demand by an authorized entity&lt;br&gt;
&lt;strong&gt;information security&lt;/strong&gt;: preservation of confidentiality, integrity and availability of information&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;- &lt;a href="https://www.iso.org/obp/ui/en/#iso:std:iso-iec:27000:ed-5:v1:en:~:text=3.28-,information%20security,-preservation%20of%20confidentiality"&gt;ISO/IEC 27000:2018&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--REdV1V1e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://upload.wikimedia.org/wikipedia/commons/c/c5/CIAJMK1209-en.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--REdV1V1e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://upload.wikimedia.org/wikipedia/commons/c/c5/CIAJMK1209-en.svg" alt="CIA triad" width="496" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Information systems are composed of three main portions: hardware ( physical machines and devices ), software ( applications and services ), and communication ( networks and protocols ). Each component has its own industry standard for ensuring information security.&lt;/p&gt;

&lt;p&gt;For instance, networks and telecom engineers ensure the secure transmission of information between endpoints through means of encryption, etc. This eliminates the &lt;strong&gt;interception&lt;/strong&gt; threat ensuring &lt;strong&gt;confidentiality&lt;/strong&gt;.&lt;br&gt;
CPU designers, on the other hand, have integrated hardware level execution modes: kernel mode, and user mode to help protect the system from the &lt;strong&gt;threat&lt;/strong&gt; of malicious code gaining access to critical system resources. This helps achieve all three &lt;strong&gt;CIA&lt;/strong&gt; properties.&lt;br&gt;
Software security experts, for example, have developed digital signatures, which can be understood as an encrypted stamp of authentication, that the receiving end can use to verify the &lt;strong&gt;integrity&lt;/strong&gt; of a message.&lt;/p&gt;




&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;Information security is a complex and ever-changing field. By understanding the different ways that systems can fail, how vulnerabilities can be exploited, and what properties make a system secure, we can build a mental model of information security.&lt;br&gt;
Each system component can be viewed as a layer of security, and each person involved in the information system lifecycle has a specific role to play in ensuring the security of the system.&lt;br&gt;
This mental model can help us make informed security decisions, and build secure systems that are resilient to attack.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;About the Author:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Greetings! I'm Mahdi Chaari, a software engineering student with a keen interest in both software and hardware. I love diving into complex projects and figuring out how they work, with a particular focus on enhancing the developer experience. &lt;br&gt;
I have an experience in full-stack web development. Currently, I'm hacking on security and DevOps.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>infosec</category>
      <category>development</category>
      <category>softwareengineering</category>
    </item>
  </channel>
</rss>
