Share E-Book

Random Number Generators Verilog Description, Hardware Implementation and Applications ( etc.)(Z-Library)

Author Luis Gerardo de la Fraga, José David Rodríguez-Muñoz, Esteban Tlelo-Cuautle

code
Language English

Random number generation (RNG) is a key technology that is used for information security in various fields such as electronic commerce and authentication. In addition, random numbers are used in various applications such as in the generation of keys for data encryption, games, lotteries, sampling, simulations, statistical sampling, search/sort algorithms, and gambling. The classification of RNGs encompasses linear and nonlinear (chaotic) pseudo and truly random number generators, and they can be evaluated by applying statistical tests, and compared based on speed and silicon area. A pseudo-RNG (PRNG) requires a seed, which is a series of bits, which also determines its stability. Random numbers generated at a sufficiently long length can encrypt sensitive data and make it difficult for another computer or person to decrypt the data. In this manner, the challenge is the hardware implementation of a method of generating random numbers reliably. This book exploits the advantage of Field Programmable Gate Arrays (FPGAs) as reconfigurable hardware systems, to perform fast prototyping of chaos-based PRNGs. The FPGA-based PRNGs are based herein on chaotic maps and integer/fractional (hyper)-chaotic systems. Implementation details are provided from Verilog descriptions, FPGA synthesis and applications of authentication of encrypted RGB images and text. The hardware implementations are efficient and can be used for security, authentication, and Internet of Things applications.

Format PDF
Size 14.9 MB
7
Views
0
Downloads
0.00
Total Donations
(First 20 pages)

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Page 1
Luis Gerardo de la Fraga José David Rodríguez-Muñoz Esteban Tlelo-Cuautle Random Number Generators Verilog Description, Hardware Implementation and Applications
Page 2
Random Number Generators
Page 3
Luis Gerardo de la Fraga • José David Rodríguez-Muñoz • Esteban Tlelo-Cuautle Random Number Generators Verilog Description, Hardware Implementation and Applications
Page 4
Luis Gerardo de la Fraga Department of Computer Science CINVESTAV-IPN Mexico City, Mexico Esteban Tlelo-Cuautle Department of Electronics INAOE Tonantzintla, Puebla, Mexico José David Rodríguez-Muñoz Department of Electronics INAOE Tonantzintla, Puebla, Mexico ISBN 978-3-031-82864-5 ISBN 978-3-031-82865-2 (eBook) https://doi.org/10.1007/978-3-031-82865-2 © The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Switzerland AG 2025 This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. This Springer imprint is published by the registered company Springer Nature Switzerland AG The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland If disposing of this product, please recycle the paper.
Page 5
Luis Gerardo de la Fraga wants to dedicate this book to his family. To all the time and love that we share and permits the time to write books. José David Rodríguez-Muñoz wants to dedicate this book to his family and friends, who encouraged and supported him unconditionally throughout this project. Their encouragement, friendship, and company were fundamental to the completion of this work. Esteban Tlelo-Cuautle wants to express his gratitude to his beloved family.
Page 6
Preface Random number generation (RNG) is a key technology that is used for informa- tion security in various fields such as electronic commerce and authentication. In addition, random numbers are used in various applications such as in the generation of keys for data encryption, games, lotteries, sampling, simulations, statistical sampling, search/sort algorithms, and gambling. The classification of RNGs encompasses linear and nonlinear (chaotic) pseudo and truly random number generators, and they can be evaluated by applying statistical tests, and compared based on speed and silicon area. A pseudo-RNG (PRNG) requires a seed, which is a series of bits, which also determines its stability. Random numbers generated at a sufficiently long length can encrypt sensitive data and make it difficult for another computer or person to decrypt the data. In this manner, the challenge is the hardware implementation of a method of generating random numbers reliably. This book exploits the advantage of Field Programmable Gate Arrays (FPGAs) as reconfigurable hardware systems, to perform fast prototyping of chaos-based PRNGs. The FPGA-based PRNGs are based herein on chaotic maps and integer/fractional (hyper)-chaotic systems. Implementation details are provided from Verilog descriptions, FPGA synthesis and applications of authentication of encrypted RGB images and text. The hardware implementations are efficient and can be used for security, authentication, and Internet of Things applications. Mexico City, México Luis Gerardo de la Fraga Tonantzintla, Mexico José David Rodríguez-Muñoz Tonantzintla, Mexico Esteban Tlelo-Cuautle 2025 vii
Page 7
Acknowledgments José David Rodríguez-Muñoz thanks CONAHCyT-Mexico for the scholarships to pursue a master of science degree at Instituto Nacional de Astrofísica, Optica y Electrónica (INAOE). Esteban Tlelo-Cuautle thanks CONAHCyT/Mexico for the support for a sabbat- ical leave at CINVESTAV-Mexico through the program: Apoyos complementarios para estancias sabáticas vinculadas a la consolidación de grupos de investigación 2023. ix
Page 8
Contents 1 Introduction to the Design and Implementation of PRNGs Based on Chaotic Maps and Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 True and Pseudo-Random Number Generators . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Chaos and Cryptography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4 Generation of Pseudo-Random Numbers with Available Software. . . 6 1.5 Hardware Implementation of Pseudo-Random Number Generators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2 Numerical Methods to Approximate Integer-/Fractional-Order Chaotic Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2 Numerical Methods for Integer-/Fractional-Order Chaotic Systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.2.1 Numerical Methods for Integer-Order Chaotic Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.2.2 Numerical Methods for Fractional-Order Chaotic Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.3 Chaotic Systems with Self-Excited and Hidden Attractors . . . . . . . . . . . 23 2.3.1 Chaotic Systems with Self-Excited Attractors . . . . . . . . . . . . . . . 23 2.3.2 Chaotic Systems with Multistability and Hidden Attractors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.4 Fractional-Order Chaotic Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3 Verilog Descriptions of Digital Blocks to Synthesize Chaotic Maps and Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 xi
Page 9
xii Contents 3.2 Verilog Descriptions of Arithmetic Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 3.2.1 Parallel-Input, Parallel-Output (PIPO) Register . . . . . . . . . . . . . 38 3.2.2 Adder and Subtractor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.2.3 Multiplication Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 3.2.4 Description of a Single Constant Multiplier . . . . . . . . . . . . . . . . . 45 3.3 Verilog Descriptions of Other Combinational and Sequential Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 3.3.1 Multiplexer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 3.3.2 Decoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 3.3.3 Type-D Flip-Flop with Enable Pin . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 3.3.4 Ascending Binary Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 3.3.5 Bidirectional Binary Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 3.3.6 Finite-State Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 3.3.7 Random Access Memory (RAM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 3.3.8 Read-Only Memory (ROM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 3.3.9 Register-Based Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 3.3.10 Multiplier Accumulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 3.3.11 Multiplier-Multiplexed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 3.4 Verilog Description of a 2D Chaotic Map and 3D Lorenz System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 3.4.1 Verilog Description of the 3D Lorenz System . . . . . . . . . . . . . . . 65 3.4.2 Fixed-Point Notation for Lorenz System . . . . . . . . . . . . . . . . . . . . . 65 3.4.3 Block and Verilog Descriptions of the Constants Multiplying Variables for Lorenz System . . . . . . . . . . . . . . . . . . . . 66 3.4.4 Block and Verilog Description of the 3D Lorenz System . . . 71 3.4.5 Block and Verilog Descriptions of a 2D Chaotic Map. . . . . . . 73 3.4.6 Selection of the Fixed-Point Format . . . . . . . . . . . . . . . . . . . . . . . . . . 73 3.4.7 Block and Verilog Descriptions of the Control of the Equations of the 2D Sprott Map . . . . . . . . . . . . . . . . . . . . . . . . . . 74 3.4.8 Block and Verilog Description of the 2D Sprott Map . . . . . . . 78 3.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 4 Statistical Tests for PRNGs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 4.1 NIST Randomness Test Suite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 4.1.1 How to Use NIST Test Suite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 4.2 TestU01 Test Suite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 4.2.1 TestU01 Test Suite on Floating Point Numbers in [0, 1) . . . . 88 4.3 Dieharder Test Suite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 4.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 5 PRNGs Based on Chaotic Maps and 3D, 4D, and 5D Chaotic Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Page 10
Contents xiii 5.2 PRNG Based on a 2D Sprott Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 5.3 FPGA Synthesis of a PRNG Based on 2D Sprott Map . . . . . . . . . . . . . . . 100 5.3.1 PRNG from Chaotic Time Series by Applying mod256 . . . . 101 5.3.2 Verilog Description of a PRNG Based on the 2D Sprott Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 5.3.3 PRNG Based on 2D Chaotic Map: FPGA Implementation and Experimental Results . . . . . . . . . . . . . . . . . . . 105 5.4 PRNG Based on Chaotic Maps Without Fixed Points . . . . . . . . . . . . . . . . 107 5.4.1 PRNG Based on the Chaotic Map Without Fixed Points nfp2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 5.4.2 PRNG Based on the Chaotic Map Without Fixed Points nfp1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 5.4.3 PRNG Based on the Chaotic Map Without Fixed Points nfp1 Implemented with Floating-Point Numbers . . . . 114 5.5 PRNG Based on the 3D Lorenz System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 5.5.1 Verilog Description of a PRNG Based on the 3D Lorenz System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 5.5.2 FPGA Implementation and Experimental Results . . . . . . . . . . . 123 5.6 PRNG Based on a 4D Hyperjerk System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 5.6.1 Time Series, Attractors, and Fixed-Point Format . . . . . . . . . . . . 126 5.6.2 Block and Verilog Description of a PRNG Based on the 4D Hyperjerk System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 5.6.3 PRNG Based on a 4D Hyperjerk System: FPGA Implementation and Experimental Results . . . . . . . . . . . . . . . . . . . 132 5.7 PRNG Based on a 5D Chaotic System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 5.7.1 Time Series, Attractors, and Fixed-Point Selection . . . . . . . . . . 135 5.7.2 Block and Verilog Description of a 5D Chaotic System. . . . . 135 5.7.3 PRNG Based on a 5D Chaotic System: FPGA Implementation and Experimental Results . . . . . . . . . . . . . . . . . . . 139 5.8 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 6 PRNG Based on Fractional-Order Chaotic Systems . . . . . . . . . . . . . . . . . . . . . 145 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 6.2 Block Description of a Fractional-Order 1D Memristive Time-Delay Chaotic System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 6.2.1 Selection of the Fixed-Point Format . . . . . . . . . . . . . . . . . . . . . . . . . . 148 6.2.2 Block Description of the Fractional Memristive System . . . . 148 6.3 Verilog Descriptions of the Fractional-Order Memristive System with Time Delay. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 6.3.1 Verilog Description of the Memory_XT Block . . . . . . . . . . . . . . 150 6.3.2 Verilog Description of the FUNC_FXT and Counter_STP Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 6.3.3 Verilog Description of the FUNC_PSI Block . . . . . . . . . . . . . . . . 154 6.3.4 Verilog Description of FUNC_S1 Block . . . . . . . . . . . . . . . . . . . . . 155
Page 11
xiv Contents 6.3.5 Verilog Description of FSM_FR Block . . . . . . . . . . . . . . . . . . . . . . 156 6.3.6 Verilog Descriptions of SUM and Short Memory Blocks . . . 157 6.3.7 Verilog Description of Block FRAC_MEM_TD_EQU . . . . . 163 6.4 Synthesis of a PRNG Based on a Fractional-Order Memristive System with Time Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 6.4.1 Time Series and Attractors Simulated within Matlab. . . . . . . . 164 6.4.2 PRNG from Chaotic Time Series by Applying mod256 . . . . 167 6.4.3 Verilog Description of a PRNG and Simulation Results . . . . 167 6.5 PRNG Based on Fractional-Order Chaotic System: FPGA Implementation and Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 6.5.1 Experimental Time Series and Chaotic Attractor . . . . . . . . . . . . 171 6.5.2 Experimental Generation of Binary Strings . . . . . . . . . . . . . . . . . . 172 6.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 7 Chaos-Based Encryption and Authentication of RGB Images . . . . . . . . . . 177 7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 7.2 Secure Communication System Using Chaos-Based PRNGs . . . . . . . . 178 7.3 Authentication of RGB Images. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 7.3.1 Hash Function Based on the Pseudo Dot Product . . . . . . . . . . . 180 7.3.2 Operation of the Authentication Stage . . . . . . . . . . . . . . . . . . . . . . . 181 7.4 Verilog Descriptions of the System for Authentication of Encrypted RGB Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 7.5 Verilog Simulation and FPGA Implementation Results. . . . . . . . . . . . . . . 186 7.6 System for Text Authentication and Encryption . . . . . . . . . . . . . . . . . . . . . . . 188 7.7 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Page 12
Chapter 1 Introduction to the Design and Implementation of PRNGs Based on Chaotic Maps and Systems 1.1 Introduction Nowadays, it is well known and accepted that the word chaos is often taken as synonymous of the word disorder or unpredictability. The book titled Philosophy of complex systems [1] provides some philosophical comments related to the determinism chaos theory, paying emphasis that the word determinism can be associated to the dynamics of particular chaotic systems. However, the authors mention that determinism chaos of scientists has a very different meaning. For example, a geographical system, whose evolution obeys laws, is indeed chaotic. As the name of this theory indicates, the first law expresses the fact that a deterministic system may produce unpredictable long-term results. This law was discovered by the meteorologist E. Lorenz in 1963, whose main contribution was published in the work titled Deterministic nonperiodic flow [2], where it is claimed that finite systems of deterministic ordinary nonlinear differential equations may be designed to represent forced dissipative hydrodynamic flow. Currently, one can find a huge number of numerical methods to solve or approximate the solution of those differential equations, which can be identified with trajectories in phase space. E. Lorenz demonstrated that for those systems with bounded solutions, nonperiodic solutions are ordinarily unstable with respect to small modifications, so that slightly differing initial states can evolve into considerably different states. Another important contribution introduced in [2] is that systems with bounded solutions are shown to possess bounded numerical solutions. The authors in [1] mention that indeed, the unpredictability of chaotic systems only seems to be evident over the long term. It is therefore possible to make short- term predictions. However, depending on the type of chaotic physical phenomena, the long term, as with the short term, depends upon the system studied. The long term in the context of the solar system encompasses billions of years, while the long term for the Icelandic Low does not, in fact, exceed a few days. The conclusion from the work introduced by E. Lorenz is that unpredictable behavior of chaotic systems © The Author(s), under exclusive license to Springer Nature Switzerland AG 2025 L. G. de la Fraga et al., Random Number Generators, https://doi.org/10.1007/978-3-031-82865-2_1 1
Page 13
2 1 Introduction to the Design and Implementation of PRNGs Based on Chaotic. . . has two origins: nonlinearity and sensitivity to initial conditions. Henceforth, one of the main characteristics associated to chaotic behavior is that the solution of a nonlinear system should be highly sensitive to initial conditions. This main property of any type of chaotic system be discrete as chaotic maps or continuous is the butterfly effect, very widely known and associated with its discoverer, E. Lorenz. The butterfly effect is defined as the simple fluttering of a butterfly’s wings, which, highly amplified by a feedback effect, may change radically both the division of air masses and centers of action—depressions and anticyclones—across the globe. Chaos theory describes the qualities of the point at which stability moves to instability or order moves to disorder. For example, unlike the behavior of a pen- dulum, which adheres to a predictable pattern, a chaotic system does not settle into a predictable pattern due to its nonlinear processes. Examples of chaotic systems include the mathematical models of chaotic oscillators implemented with electronic devices, as the ones described in Chaps. 2, 5, and 6, in this book. Henceforth, since the main property of chaotic systems is associated to the characteristic that they are highly sensitive to initial conditions, then this book shows the application of chaotic maps and chaotic systems of integer and fractional order [3], to the design of random number generators (RNGs). As there exist two main types of RNGs, namely, true and pseudo-RNGs, this book shows the design of PRNGs. For instance, the hardware synthesis of this type of chaos-based PRNGs requires the use of arithmetic and sequential digital blocks, which can be described under Verilog codes, as detailed in Chap. 3. However, the binary sequences that are generated must be validated to be random. This process can be performed through the verification of the binary strings as shown in Chap. 4, where one can see guidelines to perform TestU01 and NIST statistical tests for chaotic binary sequences. The reference [1] states that advances in chaos theory and its mathematics are owed to physicist and mathematician Jules Henri Poincare (1854–1912), who used topological techniques to visualize mathematics. One can also find evidences that chaos mathematicians in the 1960s would map the trajectories, for example, of a simple pendulum. Nowadays, it is well known that the map or depiction can be described in the phase space, corresponding to the coordinates of the movement. For instance, a simple pendulum swing would have a two-dimensional phase space of velocity and angle. Once the movement is represented or mapped on the coordinates, a pattern appears. This pattern is called an attractor, and for chaotic systems the phase space among plotting their state variables is known as strange attractors. In recent decades, however, a diversity of systems have been studied that behave unpredictably despite their seeming simplicity and the fact that the forces involved are governed by well-understood physical laws. The common element in these systems is a very high degree of sensitivity to initial conditions and to the way in which they are set in motion. This is an important characteristic and justification of why chaotic maps and systems can be used to generate random binary strings, whose randomness can be verified by performing statistical tests, as TestU01 and NIST, which are described in Chap. 4. Another important hot and new topic that combines chaotic behavior with intelligence has been presented in [4], where one can appreciate the potential of
Page 14
1.2 True and Pseudo-Random Number Generators 3 machine learning algorithms in addressing reliability and security by developing chaos-based encryption systems, which can be useful in secure communication applications, as in resource-constrained devices, such as wearable devices. This opens a new challenge on the development of modern applications in the search of machine learning techniques for understanding chaotic dynamical systems and improving signal synchronization. In the same direction, the open challenge that is related to the randomness of chaotic binary strings is the development of applications based on machine learning techniques to anticipate and mitigate attacks on chaos-based secure communication and transmission systems. These and other topics related to the generation of binary random sequences are a challenge that is more hard to accomplish when the chaotic maps or systems must be implemented on electronic devices, as shown in this book. In [5], one can find examples of designing chaotic systems using integrated circuit technology, discrete devices, field-programmable analog arrays (FPAAs), microcontrollers, and field-programmable gate arrays (FPGAs). Due to the advan- tages for fast verification and prototyping, this book is focused on the synthesis of PRNGs based on chaotic maps and systems, using FPGAs. In this manner, the experimental FPGA implementations of chaotic maps and integer-order chaotic systems are described in Chap. 5. Chapter 6 shows the FPGA implementation of a PRNG when using a fractional-order chaotic system. The FPGA implementations of the PRNGs based on chaotic maps and systems guarantee the randomness of the binary strings, so that a slight change in the value of the initial condition of the state variables produces a vast impact on the values of the binary strings. An application for the authentication of color images encrypted by chaos-based PRNGs is presented in Chap. 7, where the transmission system is implemented on FPGAs. 1.2 True and Pseudo-Random Number Generators A truly or true random number generator (TRNG) is a system that generates sequences of bits that are indistinguishable of noise with a uniform distribution. One example is given as follows: If a TRNG generates 16 bits every time step, then a TRNG of real numbers within the interval [0, 1). can be created by dividing every sequence of 16 bits by the number 216 − 1., which in binary representation is composed by sixteen consecutive ones. Basically, a TRNG can be generated by using a physical source of noise, such as thermal noise, the state of free oscillators, or chaos [6–8]. A pseudo-random number generator (PRNG) is a deterministic system, which will always generate the same sequence of binary numbers given the same seed. The generated sequence is called pseudo-random, because it seems statistically random—the sequence cannot be distinguished of a uniform distribution noise— but the same sequence can be generated exactly by using the same seed. In general, this seed can be an integer number, or the initial state values for a chaotic system [9–11]. In this manner, as a PRNG is a deterministic system, then it can be created
Page 15
4 1 Introduction to the Design and Implementation of PRNGs Based on Chaotic. . . with the use of a computer. In our point of view, a PRNG is a software or hardware system that uses chaos as a source of entropy for the generation of the pseudo- random binary sequences. It is for this reason that this book is devoted to provide a very deep study on how to design PRNGs based on chaotic maps or integer- and fractional-order chaotic systems. The authors in [12] mention that the typical TRNG structure can be divided into five modules: 1. An analog random signal is obtained from the entropy source. 2. A module that performs sampling and the process of quantifying the random signal. 3. A module for the analog-to-digital conversion of the analog signal to output the random number sequence. 4. The sequence obtained at this time does not necessarily satisfy the uniform distribution, and it needs to be processed. 5. A module to validate the binary strings through a random number test suite. A very effective technique to process a binary sequence is the bit counting redundancy reduction technique, which has been used in [13]. The process can be summarized as follows: The original binary sequence is divided in blocks of 5 bits, and then a new bit for a new sequence is generated by applying the XOR logic operation on the 5 bits of each block. This technique was also applied in [9] to create PRNGs from different types of one-dimensional (1D) chaotic maps. One can agree with the concept that a binary sequence can be considered random, if it is computationally difficult for an observer with reasonable computational resources at their disposal, to predict it. Or in other words, the binary sequence cannot be distinguished from noise. In the side of applications based on chaotic maps or systems, a mathematical proof does not exist where the generated binary sequences are random. Instead, statistical tests are used to prove if a very long binary sequence is random or not. Among the currently available statistical tests, this book revises two of them that are more used, namely, NIST and TestU01 tests [14, 15]. The former comes from the National Institute of Standards and Technology https://www.nist.gov/director/ pao/nist-general-information, which is an agency of the United States Department of Commerce whose mission is to promote American innovation and industrial competitiveness. The second statistical test suite is the TestU01, which is a software library, implemented in the ANSI C language, that offers a collection of utilities for the empirical randomness testing of RNGs https://simul.iro.umontreal.ca/testu01/ tu01.html. These statistical test suites are described in detail in Chap. 4, taking, as case study, binary sequences generated from chaotic systems. A PRNG is essential to develop applications in engineering areas such as to improve the behavior of optimization algorithms with heuristics. Some of those algorithms are heuristics well known from a couple of decades, such as genetic algorithm, differential evolution, and particle swarm optimization, among much other evolutionary and swarm algorithms, which perform a guided (intelligent)
Page 16
1.3 Chaos and Cryptography 5 search. In fact, the intelligent search is a much better approach compared to the brute force or random search approaches. There is an approach in statistics called Monte Carlo, where the acknowledge is acquired randomly (or pseudo-randomly). As shown in [4], PRNGs can also be used to improve machine learning applications. Indeed, in those applications a PRNG is essential. Basically, PRNGs are used to select randomly the element to train and to test a machine learning algorithm. It can be appreciated that there are many more applications that need RNGs. Some of the most known are, for example, [6]: entertainment, where lotteries and gambling machines are all based on the use of random numbers, video games that use random numbers to influence intelligence heuristics or to vary game play, music and graphics composition by interweaving content with random bits, complex scientific and financial models that use random numbers for simulation, artificial intelligence applications that require random data to determine classification accu- racy or neural network behavior, and software manufacturers that use random data to test programs and algorithms to detect bugs, equation-solving, cryptography, digital signatures, protected communication protocols, and so on. 1.3 Chaos and Cryptography The two scientific areas of chaos and cryptography lie in the fact that the systems used in cryptography work on a finite set, while those applied in chaos have meaning only on a continuum [16]. This has been a big problem in chaos systems, where, as an example, it is not possible to define the exact size of the keys, even if the key is used with parameter values of real numbers. On the other hand and as it will be explained in this book, if a PRNG is implemented in fixed-point arithmetic [9–11], then it is possible to define the exact size of the key. The authors in [16] present a good description of the three most common cryptographic objects (called also primitives): 1. Block-encryption algorithms (private-key algorithms) 2. Pseudo-random number generators (additive stream ciphers) 3. Cryptographic hash functions A PRNG is the basic primitive to define block-encryption algorithms, cryp- tographic hash functions, and even keyed hash functions [17]. For instance, a private-key algorithm can be built with a chaos-based PRNG if the two involved persons in a communication channel share the key, being the key the initial state of the map or chaotic oscillator, and then the message is XORed with the sequence produced by the PRNG; the receiver can decode the message producing the pseudo- sequence of bytes with the PRNG and the same key and XOR the pseudo-random sequence with the coded message to obtain the text (decrypted) message.
Page 17
6 1 Introduction to the Design and Implementation of PRNGs Based on Chaotic. . . A hash is a small quantity of bytes that can be used as a digital signature for a document: If the document is sent over the Internet, the calculated hash on the received node must be equal to the original or sent hash. However, if both the send and received hashes are not equal, then it can be concluded that the document has been compromised during its transmission. For this reason, it is commonly accepted that a keyed hash function [17], as its name suggest, can add a key to calculate the hash, and then it can be used for both, to check the integrity and authenticate a message. At the present time, the notion of cryptographic security has no counterpart in chaos theory, and the cryptographic security of a chaos-derived encryption algorithm can be checked only by means of crypto-tools. 1.4 Generation of Pseudo-Random Numbers with Available Software The goal of this book is the design of PRNGs based on chaotic maps and integer- and fractional-order chaotic systems. However, this section is devoted to describe how a pseudo-random binary sequence can be generated with publicly available cryptography software. To do this task, one can apply software tools, such as a software package called OpenSSL and the software that is a family of lightweight cryptographic algorithms called ASCOM. As shown in Chap. 4, the generated sequences can be analyzed with the NIST and TestU01 statistical suite tests, just as examples of sequences that already are known to be cryptographically secure. The software package OpenSSL [18] is a cryptography toolkit implementing the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) network protocols and related cryptography standards required by them. OpenSSL is the layer of software that allows secure communications between or among computers or networks, tablets, or smartphones, over the Internet. Using OpenSSL guarantees that online buy transactions will be completed, and that credit card numbers will be not stolen while those buys are made. OpenSSL is available for any operating system. In fact, it is already included in any device that is connected to the Internet. OpenSSL can manage keys and encrypt and decrypt messages with different cyphers, among other abilities. An advantage of using OpenSSL is that one file with 100 millions of pseudo- random bits can be generated with the command openssl rand -out a.bin 12500000 where the output file is a.bin, and it gives the number of bytes instead the number of bits to be generated. Executing the NIST and TestU01 statistical test suites on the a.bin file, they give the results shown in Table 1.1, where it can be appreciated that all statistical tests passed. Some considerations on the statistical tests are as follows: For 100 sequences, a test pass if the proportion value is greater than 96, with a p-value
Page 18
1.4 Generation of Pseudo-Random Numbers with Available Software 7 Table 1.1 Results of applying the three TestU01 tests and fifteen NIST statistical tests on 100 sequences of 106 . bits generated with the OpenSSL software Test name p-value Proportion 1 Rabbit All 40 tests passed – 2 Alphabit All 17 tests passed – 3 Block Alphabit All 6 repetitions of – Alphabit tests passed 4 Frequency 99 0.048716 5 BlockFrequency 99 0.383827 6 CumulativeSums 99 0.734931 7 Runs 100 0.867692 8 LongestRun 100 0.574903 9 Rank 100 0.045675 10 FFT 99 0.719747 11 NonOverlappingTemplate 99 0.489748 12 OverlappingTemplate 100 0.978072 13 Universal 99 0.779188 14 ApproximateEntropy 100 0.249284 15 RandomExcursions 99 0.449323 16 RandomExcursionsVariant 100 0.403272 17 LinearComplexity 97 0.514124 18 Serial 100 0.030184 greater than or equal to 0.01, and also the statistics of the p-values must have a uniform distribution. Therefore, if the p-value given in Table 1.1 is equal or greater than 0.0001, it can be concluded that the test pass [14, Chap. 4.2]. The software that is a family of lightweight cryptographic algorithms called ASCOM is also a family of authenticated encryption and hashing algorithms designed to be lightweight and easy to implement, even with added countermeasures against side-channel attacks. In this case, a side-channel attack can be implemented with the working algorithm in hardware, where the power consumption can reveal the key used. ASCOM has been selected as a new standard for lightweight cryptography in the NIST Lightweight Cryptography competition (2019–2023) [19, 20]. The publicly available software of ASCOM [19] uses the interface ECRYPT Benchmarking of Cryptographic Systems (eBACS). As an example, the encryption function in C program language can be coded as follows: int crypto_aead_encrypt( unsigned char *cmsg, unsigned long long *clen, const unsigned char *m, unsigned long long mlen, const unsigned char *ad, unsigned long long adlen, const unsigned char *nsec, const unsigned char *nonce, const unsigned char *key
Page 19
8 1 Introduction to the Design and Implementation of PRNGs Based on Chaotic. . . where the instruction unsigned char *cmsg is associated to the encrypted mes- sage and the instruction const unsigned char *m associated to the text message. Similar to the generation of random binary strings by executing the software package OpenSSL [18], in this case the binary strings are generated by applying the software ASCOM. The example consists of generating a block of 16 bytes that is used to encrypt a message of also 16 bytes, but consisting of only zeros. The nonce values must be different to produce different encrypted blocks. To perform statistical tests, 100 binary sequences of 106 . bits each one were generated by executing the C code given in Listing 1.1. Afterwards, the TestU01 and NIST statistical test suites were applied to the 100 binary sequences, in which statistical results are given in Table 1.2. Listing 1.1 C code to generate random bytes with ASCOM 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 #include "api.h" 5 #include "crypto_aead.h" 6 7 /** This function calculates the nonce, 8 Converts ’i’ value to a string **/ 9 void calculate_nonce( unsigned char *v, int i ) 10 { 11 int k, c, r; 12 13 k = 0; 14 while( k < 16) { 15 c = i/256; 16 r = i - 256*c; 17 18 v[k] = r; 19 i = c; 20 k++; 21 if( i < 256 ) { 22 v[k] = i; 23 break; 24 } 25 } 26 } 27 28 int main( ) 29 { 30 #define NSIZE 64 31 FILE *fp; 32 /** 16 bytes the size of the key and the nonce **/ 33 unsigned char key[CRYPTO_KEYBYTES] = {0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5}; 34 unsigned char nonce[CRYPTO_NPUBBYTES] = { 0x00 }; 35 unsigned char msg[NSIZE] = { 0x00 }; 36 unsigned char* ad = NULL; 37 unsigned char ct[NSIZE+CRYPTO_ABYTES]; // 64+16 bytes
Page 20
1.5 Hardware Implementation of Pseudo-Random Number Generators 9 38 unsigned long long mlen, adlen; 39 unsigned long long clen, mlen2; 40 int i, func_ret; 41 42 mlen = NSIZE; 43 adlen = 0; 44 45 if( (fp=fopen("a.bin", "w" )) == NULL ) { 46 fprintf( stderr, "ERROR: can’t open output file\n" ); 47 exit(1); 48 } 49 // blocks of size 64*8 = 512 bits **/ 50 for( i = 0; i<195314; i++ ) { 51 calculate_nonce( nonce, i ); 52 if ((func_ret = crypto_aead_encrypt(ct, &clen, msg, mlen, ad, adlen, NULL, 53 nonce, key)) != 0) { 54 fprintf(fp, "crypto_aead_encrypt returned <%d>\n", func_ret 55 exit(2); 56 } 57 if ( fwrite ( ct, 1, NSIZE, fp) != NSIZE ) { 58 fprintf ( stderr, "ERROR: writing file: %s\n", "a.bin" ); 59 exit(3); 60 } 61 62 } 63 64 fclose( fp ); 65 return 0; 66 } The goal of this book is also oriented to infer that the future of cryptographic chaotic research must be more focused to design efficient software and hardware that can offer better security services. 1.5 Hardware Implementation of Pseudo-Random Number Generators In the recent days, one can find a huge number of topologies for the design of chaotic maps and systems using electronic devices. They range from using discrete devices that are commercially available, such as amplifiers and microcontrollers, and also those using modern complementary-metal-oxide-semiconductor (CMOS) integrated circuit technology. This book is devoted to show the synthesis of PRNGs based on chaotic maps and integer- and fractional-order chaotic systems by using FPGAs. However, one can also find PRNGs implemented on field-programmable analog arrays (FPAAs). The following paragraphs briefly describe some of the most recent electronic implementations of chaotic systems and PRNGs.
The above is a preview of the first 20 pages. Register to read the complete e-book.

Recommended for You

Loading recommended books...
Failed to load, please try again later

Tip the Site

Scan the WeChat Pay or Alipay code to tip. No login required.

WeChat Pay
Alipay
Back to List