<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by DarkVolt on Medium]]></title>
        <description><![CDATA[Stories by DarkVolt on Medium]]></description>
        <link>https://medium.com/@darkvolt7?source=rss-af1224428358------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qxrsnC7GyxzW2Z3RwK-k_w.jpeg</url>
            <title>Stories by DarkVolt on Medium</title>
            <link>https://medium.com/@darkvolt7?source=rss-af1224428358------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 14:20:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@darkvolt7/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Side Channel Analysis: 101 — Complete Guide]]></title>
            <link>https://medium.com/@darkvolt7/side-channel-analysis-101-complete-guide-7e135e87176b?source=rss-af1224428358------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e135e87176b</guid>
            <category><![CDATA[side-channel-attacks]]></category>
            <category><![CDATA[hardware-hacking]]></category>
            <category><![CDATA[iot-security]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[iot-hacking]]></category>
            <dc:creator><![CDATA[DarkVolt]]></dc:creator>
            <pubDate>Mon, 24 Jun 2024 13:32:08 GMT</pubDate>
            <atom:updated>2024-06-24T16:51:02.075Z</atom:updated>
            <content:encoded><![CDATA[<h3>Side Channel Analysis: 101 — Complete Guide</h3><h4>Introduction to SCA: Hardware Hacking — Part 4</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*Z-1Pi1AbyDEDnBQpiR_Kyw.png" /></figure><p>I hope you’ve had the chance to read my previous blogs. In this post, I’ll walk you through the main part of Side Channel Analysis and some ways to find out the errors in the process of capturing traces and rectify them to get the desired results. For those who haven’t checked my previous blog, here is <a href="https://medium.com/@darkvolt7/side-channel-analysis-101-complete-guide-7bcd89d82c8b">PART-3</a></p><p>We’ve determined that the captured power traces are not providing the desired output, apart from occasional changes in the time taken for program execution.</p><p><strong>Note: I’ve updated my setup to power up the Arduino using a power supply instead of USB-TTL.</strong></p><p>Let’s modify the entire code. We shall remove serial communication and just add addition and multiplication functions.</p><pre>int Num1 = 15;<br>int Num2 = 3;<br>int Sum;<br>int Sum2;<br>int Mult;<br><br>void setup() {<br>Sum = Num1 + Num2;<br>Sum2 = Num2 + Num2;<br><br>Mult = Num1 * Num2;<br>} <br><br>Void loop(){<br>}</pre><p>If our program operates like this, capturing a trace is extremely challenging. It executes in a fraction of a second, leaving us with a narrow window to analyze the data post-capture. Moreover, it often executes outside any trigger zone.</p><p>The above program has been tested once to check if there are any errors until now. We figured out that it is operating at 5V and 0.05 Amps</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kJJz2oobnhtN0cR5DsN7Lg.jpeg" /></figure><p>Let’s establish a trigger zone by setting a Digital GPIO to HIGH and initiating our mathematical operations. This way, any power trace analysis will occur precisely during the GPIO’s transition from HIGH to LOW. To begin, I’m setting GPIO-7 to HIGH. Here is the program for it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SYoxv_mGc_l0ASaWz6VFwA.png" /><figcaption>Addition and Multiplication between HIGH and LOW of GPIO 7.</figcaption></figure><p>Would you like to take a guess how the trace looks like? Well…</p><p>Hold on. Before jumping into the trace, there are a few points that needs to be addressed. Do you remember we used a 100 ohms resistor? That is not suitable for this method. Because, when GPIO is set HIGH to execute operations, it draws a current of 0.04 or 0.05 Amps. During the program execution, we observed that the GPIO 7 in Picoscope was just stable at 5V.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c64ZXzt51Ur8pByh99-ThQ.jpeg" /><figcaption>Arduino setup with power supply and 100 ohm resistor</figcaption></figure><p>The image above shows the setup. You’ll notice a 100-ohm resistor connected between the power supply and the Arduino. Now, due to the resistor and GPIO triggering, it’s drawing 5V and 0.03 Amps. Due to this just a flat line at 5V in Picosope GPIO 7 is observed. This clearly indicates that it has no sufficient current to perform GPIO operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DlLF3mzuXjKw9jfgsy1FjA.jpeg" /><figcaption>Setup drawing 0.03 Amps</figcaption></figure><p>Adding a 56-ohm resistor to balance this. Currently, the Arduino is functioning properly, drawing 5V and 0.04 Amps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R5DYOM3al8NIcFFAPlhDBA.jpeg" /><figcaption>56 ohms resistor in setup</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MCaTHagK0FFWHC5hVIJ9dg.jpeg" /><figcaption>Final setup drawing 0.04Amps</figcaption></figure><p>So finally our setup is done and it is drawing 0.04 Amps from the supply to enable the GPIO HIGH. I can observe clear signals and traces on Picoscope. Here is the trace…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V7v6PMs3CUiBmDeONf1yQg.png" /></figure><p>Yes, The trace looks like this. You can notice in the trace that, after the GPIO goes HIGH, there are some executions for a moment and the GPIO goes LOW. It is evident in the blue color trace. The red color trace is just notifying that the Power (Voltage) is being consumed. The grey color trace completely shows the data. Which is B-D piscoscope differential probe data.</p><p>Let’s analyze the data now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K717Q7NomW_b_XX2XhiaSw.png" /><figcaption>Picoscope data between HIGH &amp; LOW of GPIO 7</figcaption></figure><p>The primary power traces are visible in grey. Upon zooming in, you’ll discern the differential power traces within the grey area.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KX8R9LypvS2oDgfLWKjgWg.png" /></figure><p>You can observe that power consumption and traces are clearly visible during addition and multiplication. Overall, it takes approximately 3.196 ms to complete the entire operation.</p><p>But what if we remove the multiplication operation? Well, you can observe the trace.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CRCzBEFDZ15LwM8qbJNM1g.png" /></figure><p>The first thing you’ll notice is the limited number of traces. Secondly, you’ll observe that the execution time has decreased to 3.186 ms.</p><p>This approach enables a detailed analysis after capturing traces. These blogs are beginner-friendly, addressing potential mistakes. I hope this has been helpful in understanding Simple Power Analysis, resistance calculations, and troubleshooting trace capture issues. In upcoming blogs, I’ll delve into Side Channel Analysis on AES, which may take some time to cover comprehensively. Here are quick links for <a href="https://medium.com/@darkvolt7/side-channel-analysis-101-complete-guide-6d9c7c98ef22"><strong>PART-1</strong></a> <a href="https://medium.com/@darkvolt7/side-channel-analysis-101-complete-guide-d421b9ca44aa"><strong>PART-2</strong> </a><a href="https://medium.com/@darkvolt7/side-channel-analysis-101-complete-guide-7bcd89d82c8b"><strong>PART-3</strong></a></p><h4>Thank you for your support and patience !!!</h4><p><strong>Please leave likes and comments. And share it with your other hacking enthusiasts</strong></p><h4>Follow me on <a href="https://x.com/darkvolt73">Twitter </a>for more updates and feel free to interact with me for queries or collaborations.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e135e87176b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Side Channel Analysis: 101 — Complete Guide]]></title>
            <link>https://medium.com/@darkvolt7/side-channel-analysis-101-complete-guide-7bcd89d82c8b?source=rss-af1224428358------2</link>
            <guid isPermaLink="false">https://medium.com/p/7bcd89d82c8b</guid>
            <category><![CDATA[iot-hacking]]></category>
            <category><![CDATA[iot-security]]></category>
            <category><![CDATA[hardware-hacking]]></category>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[side-channel-attacks]]></category>
            <dc:creator><![CDATA[DarkVolt]]></dc:creator>
            <pubDate>Mon, 24 Jun 2024 11:02:43 GMT</pubDate>
            <atom:updated>2024-06-24T16:34:50.626Z</atom:updated>
            <content:encoded><![CDATA[<h3>Side Channel Analysis: 101 — Complete Guide</h3><h4>Introduction to SCA: Hardware Hacking — Part 3</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*Z-1Pi1AbyDEDnBQpiR_Kyw.png" /></figure><p>I hope you’ve had the chance to read my previous blogs. In this post, I’ll walk you through the main part of Side Channel Analysis and other aspects to keep in mind for your testing. For those who haven’t checked my previous blog, here is <a href="https://medium.com/@darkvolt7/side-channel-analysis-101-complete-guide-d421b9ca44aa">PART-2</a></p><p>We have added a 100 ohms resistor in between USB-TTL and Arduino. Now the question arises, how do we get the power trace? Most of you people might just be attaching a probe and its GND at a voltage line that is directly going into Arduino.</p><h4>ATTENTION !!!</h4><h4>There are a few things that must be kept in mind before you go ahead and get those traces…</h4><p>If you connect the PicoScope between the Arduino’s power supply line and ground directly (single-ended measurement), you won’t get the same readings as with a differential probe setup across the 100 ohm resistor. Here’s why:</p><ul><li><strong>Single-Ended Measurement (Arduino Line to Ground)</strong>: <br> — When you connect the PicoScope between the Arduino’s power supply line (presumably the Vcc line) and GND, you’re measuring the overall voltage level between these two points.<br> — This measurement typically gives you the full supply voltage (Vcc) that the Arduino is operating at, not the voltage drop specifically across the 100 ohm resistor.</li><li><strong>Differential Measurement (Across 100 Ohm Resistor)</strong>:<br> <strong>— </strong>Using a differential probe across the 100 ohm resistor allows you to specifically measure the voltage drop (V_R) across the resistor due to the current flowing through it.<br> <strong>— </strong>This voltage drop (V_R) is directly proportional to the current flowing into the Arduino (I = V_R / R, where R = 100 ohms).<br> <strong>—</strong> Measuring V_R with a differential probe gives you a precise indication of the current consumption of the Arduino, which you can use to calculate power consumption.</li><li><strong>Difference in Readings</strong>:<br> — When you measure between the Arduino line (Vcc) and GND with PicoScope, you’re not isolating the voltage drop across the resistor. Instead, you’re measuring the overall voltage difference between Vcc and ground, which includes all components connected to that supply (not just the resistor).</li><li><strong>Accuracy and Precision</strong>:<br> — Using a differential probe across the 100 ohm resistor provides a more accurate and precise measurement of the current flowing into the Arduino, which is crucial for calculating power consumption. It eliminates common-mode noise and ground loops that can affect single-ended measurements.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qNfu9kMQC2cWRGWZAwJTkA.jpeg" /></figure><p>Since I do not have a differential probe, I have connected 2 probes across the resistor. Both the probes should be plotting at 5V. One probe will be plotting &lt; 5V because of voltage drop. You can also notice that GND is not connected. We need to adjust the mathematical operation on the Picoscope setting so that it will give us Delta between both probes.</p><blockquote>Also, You should know that we have added a resistor in series.</blockquote><p>Finally, we got what we wanted. Power traces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tCUouSyYQmf-ghbZys60fA.png" /><figcaption>2-second delay program power trace. Fig 1</figcaption></figure><p>The power trace is perfectly captured and visible. But you can notice it’s not like every other power trace. It is different. And it is getting hard to analyze the trace. Power cycles are not properly visible.</p><p>Do you notice anything odd with the power trace? Go ahead, give it a try… Okkkk… what strikes me is that the entire power trace lasts no longer than 2 seconds. We actually programmed a 4-second delay. But we don’t notice it. Strange.</p><p>Let’s modify the Arduino program and see how it gets reflected in the code. Let me modify it to 1s. And if I don’t find any proper trace, let me modify the code to just print statements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*332JNOzyyZlT_h5H0SaG2w.png" /><figcaption>1-second delay code. Fig 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*86mQBkmelJTrbH-8ccf1Zg.png" /><figcaption>1-second delay code. Fig 3</figcaption></figure><p>After reducing the program delay to 1 second, I’ve observed variability in the total execution time of the program. If you examine the power trace closely, you’ll see that it took approximately 297 ms to complete the entire program. This is quite unusual, considering there’s a 1-second delay programmed.</p><p>From the above trace (2-second delay program), it’s evident that it took around 342 ms to execute the entire program. Let’s remove the addition operation from the program. Also, remove all the functions except for the print statement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SHA2_8OlLeD04FpGN0Lusw.png" /><figcaption>power trace of removing addition function. Fig 4</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wboGrtg07mkid4M_7rfcpw.png" /><figcaption>Arduino program for just print statements. Fig 5</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*grEV0z1pLsUJdr_JKO-ROw.png" /><figcaption>power trace of just print statements. Fig 6</figcaption></figure><p>After analyzing all the power traces, the main observation is that the execution time of the program varies, But no major difference in power fluctuations or traces. The pattern is the same in every program. And the only difference is the time to execute each program. So, there must be a major flaw in the way we are capturing a trace or the way we wrote the code.</p><p>In this blog, we explored the power traces and time of execution of each program. Moving forward, we’ll delve into the remaining aspects of our analysis.</p><h3>Stay Tuned !!!</h3><p><strong>To be continued — </strong><a href="https://medium.com/@darkvolt7/side-channel-analysis-101-complete-guide-7e135e87176b"><strong>PART-4</strong></a></p><p><strong>Please leave likes and comments. And share it with your other hacking enthusiasts</strong></p><h4>Follow me on <a href="https://x.com/darkvolt73">Twitter </a>for more updates and feel free to interact with me for queries or collaborations.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7bcd89d82c8b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Side Channel Analysis: 101 — Complete Guide]]></title>
            <link>https://medium.com/@darkvolt7/side-channel-analysis-101-complete-guide-6d9c7c98ef22?source=rss-af1224428358------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d9c7c98ef22</guid>
            <category><![CDATA[side-channel-attacks]]></category>
            <category><![CDATA[iot-hacking]]></category>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[iot-security]]></category>
            <category><![CDATA[hardware-hacking]]></category>
            <dc:creator><![CDATA[DarkVolt]]></dc:creator>
            <pubDate>Sat, 22 Jun 2024 12:36:37 GMT</pubDate>
            <atom:updated>2024-06-24T13:33:58.932Z</atom:updated>
            <content:encoded><![CDATA[<h3>Side Channel Analysis: 101 — Complete Guide</h3><h4>Introduction to SCA: Hardware Hacking — Part 1</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*Z-1Pi1AbyDEDnBQpiR_Kyw.png" /></figure><h4>Greetings Everyone !!</h4><p>This can be your go-to resource for exploring the fascinating world of hardware hacking and side channel analysis. Whether you’re a cybersecurity enthusiast, a hardware engineer, or simply curious about the intricate vulnerabilities lurking within technology, this is the right place for you to learn.</p><p>Most of you have likely heard about Side-Channel Analysis (SCA) and may be curious about what it entails and how it’s performed. This is especially relevant to students, hackers from various domains, and beginners interested in IoT hacking. I’ll guide you through the process of SCA and provide a basic theoretical understanding so that you can begin implementing it yourself.</p><h4>Let’s Begin !!</h4><h3>What is Side Channel Analysis — SCA ?</h3><blockquote>Side channel analysis (SCA) refers to a class of techniques used in cryptography and security engineering to exploit unintended information leakage from a system. Unlike traditional attacks that focus on breaking cryptographic algorithms directly, side channel analysis targets the physical implementation of these algorithms, exploiting observable signals such as power consumption, electromagnetic emanations, timing variations, or even acoustic emissions. This method bypasses conventional security measures by focusing on physical characteristics rather than directly attacking cryptographic algorithms.</blockquote><p>Let’s break this down… Think about any electronic device that has components like SoC, Microprocessor (μp), or Microcontroller (μc). These devices need voltage, current, and a clock signal to carry out their instructions. They operate at specific voltage and current levels, at particular clock frequencies, and sometimes they emit electromagnetic radiation. Monitoring these parameters is crucial to achieving the desired outcomes from these devices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MfrjSaqLsLjE2F80Isx1IQ.jpeg" /><figcaption>Typical SCA setup. (Reference Image)</figcaption></figure><p>Here are some common types of side channel attacks:</p><ol><li><strong>Power Analysis</strong>: Analyzing variations in the power consumption of a device during any operations/cryptographic operations to infer information about the executed algorithm or secret keys or instructions.</li><li><strong>Electromagnetic Analysis</strong>: Monitoring electromagnetic radiation emitted by a device during cryptographic operations to derive information about internal processes.</li><li><strong>Timing Analysis</strong>: Exploiting timing differences in the execution of cryptographic operations to gain insights into the data being processed.</li><li><strong>Acoustic Analysis</strong>: Exploiting using sound waves emitted by a device to infer information about internal operations, particularly relevant in physical security scenarios.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*hU1D4SvviK-qgo8hxvfuWw.jpeg" /><figcaption>Reference image of SCA — H-Probe for Electromagnetic Analysis</figcaption></figure><p>There are 3 types of SCA in <strong>Power Analysis</strong>.</p><ul><li><strong>Simple Power Analysis (SPA):</strong> SPA involves directly correlating variations in power consumption with specific operations or instructions executed by the device. It can reveal sensitive information such as cryptographic keys.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*4H8DhmHX5uK5kYtHEFlknA.jpeg" /><figcaption>Reference Image of <strong>S</strong>imple <strong>P</strong>ower <strong>A</strong>nalysis</figcaption></figure><ul><li><strong>Differential Power Analysis (DPA) &amp; Correlation Power Analysis (CPA):</strong> DPA is a more sophisticated technique that involves statistical analysis of power consumption measurements over multiple executions of the same operation. It can extract cryptographic keys or other sensitive data by exploiting correlations between power consumption and internal data states by using different algorithm methods — <strong>Difference of Means (DoM), Hamming Weight and Hamming Distance… </strong>etc.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*hrRjJPeZs6Etg8QTcemrXg.png" /><figcaption>Reference Image of <strong>D</strong>ifferential <strong>P</strong>ower <strong>A</strong>nalysis</figcaption></figure><p>Let me demonstrate <strong>Simple Power Analysis</strong> by executing specific code on a microcontroller and analyzing the power using an oscilloscope. For this demonstration, I have chosen to use…</p><ol><li>Arduino</li><li>Picoscope</li><li>Shunt Resistor</li><li>USB to TTL</li><li>Power Supply</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*J1s2Bx_hVOhDrl6I2FTSUA.png" /><figcaption>Reference image of my setup</figcaption></figure><p>For the demonstration, we will analyze the power consumption of an Arduino during <strong>addition and multiplication operations</strong>. Understanding these basic tasks will provide insight into<strong> how cryptographic operations</strong> are executed.</p><p>I hope I summarized the theory here. Let’s continue with the practical and demo parts in the next blog. I’ll guide you through the setup and provide practical references to ensure everything is clear.</p><h3>Stay Tuned !!!</h3><p><strong>To be continued — </strong><a href="https://medium.com/@darkvolt7/side-channel-analysis-101-complete-guide-d421b9ca44aa"><strong>PART-2</strong></a></p><p><strong>Please leave likes and comments. And share it with your other hacking enthusiasts</strong></p><h4>Follow me on <a href="https://x.com/darkvolt73">Twitter </a>for more updates and feel free to interact with me for queries or collaborations.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d9c7c98ef22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Side Channel Analysis: 101 — Complete Guide]]></title>
            <link>https://medium.com/@darkvolt7/side-channel-analysis-101-complete-guide-d421b9ca44aa?source=rss-af1224428358------2</link>
            <guid isPermaLink="false">https://medium.com/p/d421b9ca44aa</guid>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[side-channel-attacks]]></category>
            <category><![CDATA[hardware-hacking]]></category>
            <category><![CDATA[iot-security]]></category>
            <category><![CDATA[iot-hacking]]></category>
            <dc:creator><![CDATA[DarkVolt]]></dc:creator>
            <pubDate>Sat, 22 Jun 2024 12:34:47 GMT</pubDate>
            <atom:updated>2024-06-24T13:37:01.041Z</atom:updated>
            <content:encoded><![CDATA[<h3>Side Channel Analysis: 101 — Complete Guide</h3><h4>Introduction to SCA: Hardware Hacking — Part 2</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*Z-1Pi1AbyDEDnBQpiR_Kyw.png" /></figure><p>I hope you’ve had the chance to read my previous blog. In this post, I’ll walk you through the setup, detailing the tools and equipment I’ve chosen, and explaining the reasons behind each selection for a clearer understanding. For those who haven’t checked my previous blog, here is <a href="https://medium.com/@darkvolt7/side-channel-analysis-101-complete-guide-6d9c7c98ef22">PART-1</a></p><p>To conduct SCA, I have considered a simple setup:</p><ul><li>Our Device Under Test (DUT) or target board is an Arduino programmed for addition and multiplication tasks.</li><li>We use a Picoscope to measure voltage and power readings.</li><li>USB-TTL adapter to monitor Rx-Tx data flow from the Arduino</li><li>Power Supply to operate the Arduino</li><li>And resistors for voltage-to-power conversion — The SHUNT resistors.</li></ul><p>First, let’s go through the Arduino code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2hnZIKloyC7p-YdGDnrADQ.png" /><figcaption>Arduino code</figcaption></figure><p>As you can observe, I’ve programmed the operations to occur over serial communication with deliberate delays before addition and multiplication. This setup enables us to observe delays alongside the addition and multiplication processes during power analysis.</p><p>When the Arduino runs this program, it consumes a specific amount of power from the power supply. I’ll review the datasheet to locate the Power Source, Voltage, and GND connections for accurate power analysis measurements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UNao-x9IaW3ofQgqmlBoEw.png" /><figcaption>Arduino Schematics from website</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gfPau9zpEUdYew2SaPA3jw.jpeg" /><figcaption>Power Lines</figcaption></figure><p>From the schematics, it’s evident that Pin-5 on the Power Line receives a direct 5V power supply. Additionally, on ZU4, Pin-7 corresponds to 5V, while Pin-8 serves as the ground (GND).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*UaJPySeUvD8c6GbEeTrB5w.png" /><figcaption>5V is evident</figcaption></figure><p>I chose to power up Arduino using USB-TTL. Monitor Rx-Tx using Putty for serial outputs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oquPdbmu1Oirf3NxyuHdbw.png" /><figcaption>Arduino output on Putty</figcaption></figure><p>I have repeatedly tested the Arduino to ensure its stability. The Device Under Test (DUT) is now stable.</p><h4>Now The Real Game Begins !!!</h4><p>Power Analysis… Specifically <strong>S</strong>imple <strong>P</strong>ower <strong>A</strong>nalysis.</p><p>We aim to analyze the power consumption of the Arduino. To achieve this, we use a Picoscope to obtain readings. However, the Picoscope can only measure voltage. Therefore, if we place the probe on Pin-7, we will consistently read 5V. This setup does not allow us to observe any fluctuations in the readings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hsj4DWNYVGI9trVKsVOLLQ.png" /><figcaption>Voltage readings on channel D (yellow color)</figcaption></figure><p>You’ll notice that Channel D, represented by the yellow trace on the scope, shows a constant 5V. This is because the Arduino continuously draws 5V. Additionally, there is some noise on that line, likely due to a partial or improper connection to the ground (GND).</p><p>You have to understand that Picoscope can only give us voltage output. Now, to get power traces, we need to add a resistor. You ask why is that? Well, it’s a basic physics formula. Ohm’s Law<br>V = I.R</p><ul><li>V — — Voltage</li><li>I — — Current</li><li>R — — Resistance</li></ul><p>The resistor you add to the voltage is called a shunt resistor. Adding a shunt resistor to the Arduino power supply input allows us to measure the current flowing into the Arduino by observing the voltage drop across the resistor. Here are the key reasons why we use a shunt resistor for power readings:</p><ol><li><strong>Current Measurement</strong>: The primary purpose of adding a shunt resistor is to measure the current consumed by the Arduino. By measuring the voltage drop across the shunt resistor (using Ohm’s law V=I×RV = I \times RV=I×R), we can calculate the current I flowing into the Arduino. This current consumption is crucial for understanding the power requirements and performance characteristics of the Arduino during different operations.</li><li><strong>Non-invasive Measurement</strong>: Placing a shunt resistor in series with the Arduino’s power supply line is a non-invasive method of measuring current. It does not require interrupting the circuit or modifying the Arduino itself, making it convenient for testing and monitoring purposes.</li><li><strong>Power Analysis</strong>: Knowing the current consumption allows us to calculate the power usage (P=V×I) of the Arduino at any given time. This information is essential for assessing power efficiency or understanding the overall power budget of a system.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*1GXZLb3UK1cDlzQCbjpnyA.png" /><figcaption>Ohm’s Law</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*n1TfLTojr4rwqo3zah4hJg.png" /><figcaption>Power</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*_-kU8y1l0JUNIXtlIaOXRg.png" /></figure><blockquote>Determining how much resistance to add to the V line is a critical question. Simply put, we should add a 100-ohm resistor. Here’s the calculation: The choice of a 100-ohm resistor is based on factors like the desired voltage drop and the current flowing through the circuit.</blockquote><p>Arduino is drawing 5V and 0.05 Amps</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*nQhrAtbT9AOg_Kbt5CBJiw.jpeg" /></figure><p>Go ahead and add a 100 ohms resistor between the Power Supply and Arduino pin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qNfu9kMQC2cWRGWZAwJTkA.jpeg" /><figcaption>Setup Image</figcaption></figure><p>Between the yellow jumper and violet jumper, there is a 100-ohm resistor. This resistor is situated between the USB-TTL (power supply) and the Device Under Test (DUT).</p><p>In this blog, we explored the significance of adding a resistor for power analysis. Moving forward, we’ll delve into the remaining aspects of our analysis. Let me not overflow you people with too much information in a single go.</p><h3>Stay Tuned !!!</h3><p><strong>To be continued — </strong><a href="https://medium.com/@darkvolt7/side-channel-analysis-101-complete-guide-7bcd89d82c8b"><strong>PART-3</strong></a></p><p><strong>Please leave likes and comments. And share it with your other hacking enthusiasts</strong></p><h4>Follow me on <a href="https://x.com/darkvolt73">Twitter </a>for more updates and feel free to interact with me for queries or collaborations.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d421b9ca44aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>