# Analysis of Lightweight Cryptographic Algorithms on IoT Hardware Platform +
## 3 Method and Experimental Setup
### Methodology
Furthermore, for the Raspberry Pi platform, the metrics.hlibrary includes the exporting of the result in \".csv\" (a mode of extension file) in one hit for all studied algorithms in speed measures that would help significantly in any re-benchmarking of the algorithms when needed. Meanwhile, \".csv\" exporting cannot work for the Arduino platform in programming. A software tool as an add-on for Microsoft Excel is used called PLX-DAQ [38]. Parallax Data Acquisition tool (PLX-DAQ) is a software that drops the numbers into columns as they arrive from the PC's serial port and it has the following features: \(\bullet\) Plot or graph data as it arrives in real-time using Microsoft Excel. \(\bullet\) Record up to 26 columns of data. \(\bullet\) Mark data with real time (hh:mm:ss) or seconds since reset. \(\bullet\) Read/write any cell on a worksheet. \(\bullet\) Baud rates up to 128K. Besides that, PLX-DAQ has shown a significant benefit in measuring power and graphical observation of it. * Power Connection: Power (energy) is measured through the use of the Adafruit INA219 [39] current sensor. This measuring process requires another Arduino board to read the sensor data of measuring that is fed from the load to the platforms (Arduino UNO and Raspberry Pi). The second Arduino board is used as a current-voltage monitor. The monitoring process is combined by PLX-DAQ software tool through EXCEL with the necessary Arduino programming. The circuit connection is shown in Figure 1.
* Hardware Platform: We used two different hardware platforms in this study for comparison and benchmarking purposes:
* ATMEGA328P is a single-chip microcontroller of the megaAVR family with an 8-bit RISC processor core architecture. It is used in basic Arduino boards, such as Arduino UNO. * Raspberry Pi 3 Model B V1.2 is the third generation of Raspberry Pi. * Ammeter (power measurement) used: Power (energy) is measured through the use of the Adafruit INA219 current sensor. One advantage about this sensor is that it is inserted on the \"high side\" of the circuit instead of the ground side, which is how many of those voltage and current display modules are wired. That makes it ideal for use as a voltage and current display. It operates on a power supply of 5 volts, which can be supplied by the Arduino UNO too. * Methodology for conducting the performance analysis The methodology for conducting a performance analysis of lightweight cryptographic algorithms implemented on a Raspberry Pi or Arduino UNO can involve the following steps: 1. Selection of algorithms: Identify and select a set of lightweight cryptographic algorithms that are relevant to the application and that can be implemented on a Raspberry Pi/UNO. 2. Implementation: Implement the selected algorithms on a Raspberry Pi/UNO using a programming language such as Python or C. Data collection: Collect performance data by running the implemented algorithms on the Raspberry Pi and measuring the execution time and memory usage for each algorithm. 3. Data analysis: Analyze the collected data to determine which algorithms are the most efficient and secure for the given application. This may involve comparing the execution time and memory usage of the algorithms, as well as analyzing any security weaknesses or vulnerabilities in the algorithms. Figure 1: INA219 wiring with the second Arduino board. * Optimization: Based on the analysis, optimize the implementation of the chosen algorithm to minimize resource usage and increase security. Reporting: Prepare a report detailing the performance analysis and optimization results, including any recommendations for further research or improvement. The whole process is illustrated below: