one-to-cloud one-time pad data encryption: introducing

8
Technological University Dublin Technological University Dublin ARROW@TU Dublin ARROW@TU Dublin Conference papers School of Electrical and Electronic Engineering 2017-06-20 One-to-Cloud One-Time Pad Data Encryption: Introducing Virtual One-to-Cloud One-Time Pad Data Encryption: Introducing Virtual Prototyping with PSpice Prototyping with PSpice Paul Tobin Technological University Dublin, [email protected] Lee Tobin University College Dublin, [email protected] Roberto Gandia Blanquer DR Flowcode, Roberto.Gandia@flowcad.de See next page for additional authors Follow this and additional works at: https://arrow.tudublin.ie/engscheleart Part of the Computer and Systems Architecture Commons, Data Storage Systems Commons, Digital Circuits Commons, Digital Communications and Networking Commons, Electrical and Computer Engineering Commons, Hardware Systems Commons, and the Other Computer Engineering Commons Recommended Citation Recommended Citation Tobin, P. et al. (2017) One-to-Cloud One-Time Pad Data encryption: Introducing Virtual Prototyping with PSpice. ISSC 2017 Institute of Technology, Tralee and Cork Institute of Technology, June 20--21. This Conference Paper is brought to you for free and open access by the School of Electrical and Electronic Engineering at ARROW@TU Dublin. It has been accepted for inclusion in Conference papers by an authorized administrator of ARROW@TU Dublin. For more information, please contact [email protected], [email protected]. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 4.0 License

Upload: others

Post on 15-Apr-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: One-to-Cloud One-Time Pad Data Encryption: Introducing

Technological University Dublin Technological University Dublin

ARROW@TU Dublin ARROW@TU Dublin

Conference papers School of Electrical and Electronic Engineering

2017-06-20

One-to-Cloud One-Time Pad Data Encryption: Introducing Virtual One-to-Cloud One-Time Pad Data Encryption: Introducing Virtual

Prototyping with PSpice Prototyping with PSpice

Paul Tobin Technological University Dublin, [email protected]

Lee Tobin University College Dublin, [email protected]

Roberto Gandia Blanquer DR Flowcode, [email protected]

See next page for additional authors

Follow this and additional works at: https://arrow.tudublin.ie/engscheleart

Part of the Computer and Systems Architecture Commons, Data Storage Systems Commons, Digital

Circuits Commons, Digital Communications and Networking Commons, Electrical and Computer

Engineering Commons, Hardware Systems Commons, and the Other Computer Engineering Commons

Recommended Citation Recommended Citation Tobin, P. et al. (2017) One-to-Cloud One-Time Pad Data encryption: Introducing Virtual Prototyping with PSpice. ISSC 2017 Institute of Technology, Tralee and Cork Institute of Technology, June 20--21.

This Conference Paper is brought to you for free and open access by the School of Electrical and Electronic Engineering at ARROW@TU Dublin. It has been accepted for inclusion in Conference papers by an authorized administrator of ARROW@TU Dublin. For more information, please contact [email protected], [email protected].

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 4.0 License

Page 2: One-to-Cloud One-Time Pad Data Encryption: Introducing

Authors Authors Paul Tobin, Lee Tobin, Roberto Gandia Blanquer DR, Michael McKeever, and Jonathan Blackledge

This conference paper is available at ARROW@TU Dublin: https://arrow.tudublin.ie/engscheleart/252

Page 3: One-to-Cloud One-Time Pad Data Encryption: Introducing

ISSC 2017 Institute of Technology, Tralee and Cork Institute of Technology, June 20–21

One-to-Cloud One-Time Pad Data encryption:Introducing Virtual Prototyping with PSpice

P. Tobin, L. Tobin, R. Gandia Blanquer, M. McKeever, J. Blackledge

School of Electrical and Electronic EngineeringDublin Institute of Technology, Ireland

E-mail: [email protected] [email protected]

[email protected] [email protected]

[email protected]

Abstract In this paper, we examine the design and application of a one-time pad encryption sys-tem for protecting data stored in the Cloud. Personalising security using a one-time pad generator atthe client-end protects data from break-ins, side-channel attacks and backdoors in public encryptionalgorithms. The one-time pad binary sequences were obtained from modified analogue chaos oscilla-tors initiated by noise and encoded client data locally. Specific “one-to-Cloud” storage applicationsreturned control back to the end user but without the key distribution problem normally associatedwith one-time pad encryption. Development of the prototype was aided by “Virtual Prototyping”in the latest version of Cadence OrCAD PSpice c©. This addition allows the prototype simulationschematic to be connected to an actual microcontroller in real time using device model interfacing forbi-directional communication.

Keywords —One-time pads, chaos, noise, one-to-Cloud, PSpice, virtual prototyping, de-vice model interfacing, microcontroller.

I Introduction: Cloud computing

Lack of confidence in Cloud security led to the de-velopment of a one-time pad (OTP) random bi-nary generator for encoding data locally in theCloud. This encoder provides control and secu-rity for “one-to-Cloud” storage applications whichhave no OTP key distribution problems. Personal-ising encryption, in addition to public encryptionalgorithms such as the Advanced Encryption Stan-dard (AES), provides a layer of extra protection.However, many Cloud security issues are mainlyside-channel and other less sophisticated attackswhich justify this approach, despite AES encryp-tion being present. If the rules for OTP encodingare obeyed then decoding the encrypted data isimpossible without the original OTP [1].

The prototype uses standard chaos oscillatorsmodified with analogue delays and initialised withnoise from an FM data receiver. These novel ad-

ditions increased the entropy of the final OTP.Cadence OrCAD PSpice c© v 17.2 now allows ex-porting data to MATLAB R© for further processing.Also, virtual prototyping (VP) connects the simu-lation schematic to a microcontroller in real timeusing device model interface (DMI). This interfaceuses C/C++ code to establish bi-directional com-munication between the Arduino microcontrollerand the schematic. The OTP from the microcon-troller is exclusively OR-gated with the data in aJavascript application which adds additional en-tropy to the encoded output.

a) Structure of the Paper

In Section I, we explain how a OTP system pro-tected conversations between heads of state dur-ing WWII and in the sixties. Applications for theOTP prototype generator explain how it protectsdata stored in the Cloud but with no key distribu-tion problems. Section II outlines the design of the

Page 4: One-to-Cloud One-Time Pad Data Encryption: Introducing

analogue chaos oscillator and threshold circuits. InSection III, we introduce a JavaScript applicationfor processing the OTP and data. Section IV de-tails how the encoder was tested and simulatedusing PSpice virtual prototyping and conclusionsand future work are in Section V.

b) A brief history of the One-Time Pad

In previous papers [2], [3], we explained the ra-tionale for using OTP encryption to secure datastored in the Cloud. Cloud traffic and security is-sues will grow exponentially [4], [5] and we arguewhy personalising encryption is necessary beforeusing systems such as OneDrive, Google Drive,Dropbox, etc.

Churchill and Roosevelt used a OTP systemcalled SIGSALY in WWII to mask conversationsabout war strategy [6], [7], [8], and a ‘Hotline’OTP between Kennedy and Khrushchev duringthe sixties Cuban crisis. These systems which pro-tected World peace were large (SIGSALY weighed55 tonnes) and had key distribution problems.For example, SIGSALY recorded the OTP key onvinyl and was flown across the Atlantic, hence thekey distribution problem. These factors effectivelyconsigned the OTP to history - until now.

c) OTP Prototype Overview

The block diagram in Figure 1 presents anoverview of the encoder showing chaos sources ini-tialised by noise. The OTP and data are ex-

Fig. 1: A OTP encryption system.

clusively OR-gated (modulo two arithmetic) ina JavaScript application and the encoded datastored in the Cloud. Here, the client encryptsdata at one location and then carries the OTP(the “Sneakernet” method) to decode data fromthe Cloud at another location. For example, a bar-rister bringing legal case documents in ring binderfiles to court may replace them with a OTP andan Android device for storing the downloaded files.Similarly, medical scans transported between thedoctor’s surgery and the hospital, are replaced bythe OTP. Figure 2 demonstrates how a barristerin court may download encoded case documenta-tion to an Android device and decode it using theOTP key. This method creates a secure paperless

court case [9] and also gives excellent documentsearch capabilities. Losing the OTP in transit willnot create security issues, and hence client confi-dentiality is protected.

Fig. 2: A “one-to-Cloud” encoder legal application.

II Chaos Cryptography

Claude Shannon, in his 1945 and 1949 papers [10][11], discussed chaos stretching and folding mech-anisms and compared topological (ergodic) mix-ing to confusion in cryptography, and diffusion tosensitivity to initial conditions (SIC). Chaos os-cillators may be implemented using analogue ordigital systems, however, binary sequences fromdigital chaos oscillators will have a finite cyclelength and hence will not be truly random. Forthis reason, the team chose analogue chaos oscil-lators which produce signals with an infinite num-ber of states and the prototype may be classifiedas a true random number generator (TRNG) [12].Noise from a detuned FM data receiver initialisedanalogue Lorenz and Chua chaos sources and whenthresholded correctly, generate non-repeating cy-cle length random OTP sequences.

a) The Lorenz chaotic oscillator

A second-order non-linear differential equationmodelled Edward Lorenz’s chaotic oscillator pub-lished in a 1963 paper [14]. For electronic imple-mentation, the second-order equation was replacedby three coupled first-order equations in (1).

x(t) = −P∫ tt0{x(t)− y(t)}dt

y(t) = −∫ tt0{−Rx(t) + y(t) + x(t)z(t)}dt

z(t) = −∫ tt0{Bz(t)− x(t)y(t)}dt

(1)

Lorenz used B = 2.666, Prandtl P = 10, R = 28,but slightly different values were determined ex-perimentally which improved the OTP entropy. Abrief history of chaos and electronic designs maybe examined in [13].

b) Threshold circuit design

The OTP entropy was increased by choosing thetwo analogue thresholds as the fixed points (FP)shown in the 3-D Lorenz strange attractor in Fig-ure 3. The path of v(x ) v(y) and v(z ) circu-

Page 5: One-to-Cloud One-Time Pad Data Encryption: Introducing

late around these points of equilibrium in a ran-dom fashion and was the choice for generatingthe binary ‘ones’ and ‘zeroes’. The attractor has

Fig. 3: The 3-D strange attractor and Poincare section.

a Poincare section cutting the vertical v(z ) axisthrough the FPs. We chose the threshold voltagelevels to generate ‘ones’ and ‘zeroes’ as the FP xy coordinates at the lobe centres of the attractor.These were calculated by solving (1) for x = y toyield:

FP1,2 = {+√B(P − 1),−

√B(P − 1), (R− 1)}

(2)

The FPs for the standard Lorenz parameters are ±8.485 V, for z equal to 27 V, but scaling by ten fornormal electronic signal amplitude, modifies theFPs to FP1,2 to ± 0.8485 V, as shown in Figure3.

c) The delayed Lorenz oscillator

A heuristic experimental approach improved therandomness of the prototype by adding an ana-logue delay to the polar z signal in the Lorenzchaos source. This modified the original equationsas:

x(t) = −10∫ tt0{x(t)− y(t)}dt

y(t) = −∫ tt0{−28x(t) + y(t) + x(t)z(t− τ)}dt

z(t) = −∫ tt0{2.666z(t− τ)− x(t)y(t)}dt

(3)

The idea to add a delay was inspired by the factthat chaotic maps such the logistic and Henon [15],have more noise-like outputs and make better ran-dom number generators but are harder to imple-ment electronically. The analogue delay used aPade approximation technique rather than a sam-ple and hold design, and the z-transform, definedin [16], expresses an analogue delay, τ , as:

z = esτ =esτ/2

e−sτ/2≈ 1 + sτ/2

1− sτ/2(4)

The transfer function for the operational amplifierdelay shown in Figure 4, is:

VoutVin

= − sCdRd

1 + sCdRd(5)

Comparing (4) to (5), yields a delay, τ =0.5*CdRd = 0.5 us.

d) The Chua chaotic oscillator

Three first-order coupled equations in (6) modelthe Chua analogue chaos oscillator. In 1983, LeonChua created a new chaos oscillator system try-ing to prove the Lorenz oscillator was chaotic.The standard Chua oscillator consists of a parallel-tuned circuit and connected across it is a ’Chuadiode’, a segmented negative resistance formedfrom operational amplifiers. A comprehensive pa-per on this is [17]. However, we used a differentapproach using AD633 four-quadrant multipliersfor the nonlinear cubic term in (6) [18]. A Padedelay was also added to the y signal line.

x(t) = −∫ tt0{−2.7x(t)− 2.4y(t) + 3.95x(t)3}dt

y(t) = −∫ tt0{4.167x(t)− y(t− τ)− 7.083z(t)}dt

z(t) = −∫ tt0{2.099y(t)}dt

(6)

e) Generating the One-Time Pads

The OTP is generated by thresholding the chaossignals at the value of the two FPs. The thresh-old design converted the Lorenz bipolar x signalto polar form by adding 4 V DC using a potentialdivider. The LM339 comparator reference voltageis Vref = 1.24 V and another potential divider setsthe threshold voltages to the FP values calculatedas ± 0.848 V plus 4 V DC, or 3.15 V and 4.84V. The 74121 monostable then converts the com-parator set and reset pulses to constant widths andstores the OTP in a microcontroller shield. A sim-ilar threshold design process is used in the Chuaoscillator.

III JavaScript application

Figure 5 is the JavaScript application [19] whichperforms modulo two arithmetic between the pixelarray data from the bitmap magnetic resonanceimaging (MRI) scan and the OTP. To see the ef-fects of bias on the scanned encoded image, theapplication repeated parts of the OTP to pad itout to the same length as the MRI image. How-ever, this was for demonstration purposes only asbias weakens the encryptor strength making it eas-ier to decode the data. The encoded image in thebottom right pane shows bias as horizontal lines.

XORing the two uncorrelated data chaos binarystreams produced dibit pairs processed in a vonNeumann (vN) deskewing algorithm to remove any

Page 6: One-to-Cloud One-Time Pad Data Encryption: Introducing

Fig. 4: Lorenz and Chua oscillator circuits.

Fig. 5: JavaScript application: encrypting an MRI scan.

bias by rejecting 00 and 11 dibit pairs [20]. Themiddle pane is the encoded image with no vN ap-plied, and as can be seen, no bias is present.

IV Virtual prototyping and testing

The National Institute of Standards and Technol-ogy (NIST) suite of fifteen statistical hypothesistests evaluated the cryptographic strength of in-dividual parts of the system [21]. However, therewas insufficient time before paper submission tocheck the total system entropy. Each chaos sourcewas tested separately and passed the NIST tests,so it is not unreasonable to assume the system en-tropy will be greater than the individual sources.Randomness tests were also carried out using newfeatures in Cadence OrCAD PSpice c© v 17.2. Fig-

ure 6 shows how we exported the OTP using anew menu item in the PSpice Probe menu. After

Fig. 6: Exporting the OTP data to MATLAB R©

selecting the simulated variables, a sub menu callsthe following Matlab mfile:

>>>time=PSpiceData_1.Analysis.Sweep(1).

Digital_Traces(1).Data.Time

>>val=PSpiceData_1.Analysis.Sweep(1).

Digital_Traces(1).Data.Val

>>stairs(time,val)

>>axis([0,0.015,-0.2,1.2]);

Figure 7 shows the non-return-to-zero (NRZ) OTPexported from PSpice and plotted in Matlab. Themajor advantage of this technique is that onlytransitions and not PSpice simulation points, arerecorded, otherwise the OTP is incorrect, verylarge and will give incorrect NIST results. Fig-ure 8 shows the Matlab R© results from the OTP

Page 7: One-to-Cloud One-Time Pad Data Encryption: Introducing

Fig. 7: The OTP exported to MATLAB R©

data exclusively Or-gated with the bitmap fromthe Lena image. Histogram and power spectraldensity (PSD) plots performed in Matlab in ad-dition to the NIST randomness tests. The bot-tom pane shows the recovered images. Virtual

Fig. 8: (a) The Lena image (b) Histogram of unencodedimage (c) Power Spectral Density of unencoded image.

Prototyping in V17.2 Cadence OrCAD PSpice c©

allows bi-directional communications in real timebetween a simulation schematic and a microcon-troller. Device Model Interfacing (DMI) allows thedesigner to connect in real time to microcontrollerssuch as the Arduino by defining a system environ-ment using C/C++, as explained in applicationnotes by one of the authors [22] [23]. Closing theloop between simulation and real-time measure-ments broadens the scope of simulation and de-creases the time from initial designs to final pro-duction prototype. What this means is that wemay investigate in real time, the effects of param-eter variation in the simulation circuit.

a) Averaging the x signal

Figure 9 shows the output from a novel methodfor evaluating the “equality’ of the ones and ze-roes in the random bit stream. The average value

Fig. 9: Averaging the x signal.

of the x signal should oscillate about zero for bestentropy results. We disregard the transient part ofthe OTP because it is positive for a greater amountof the time and hence biased. This measure ofbias is an approximate method but useful, never-theless. This plot displays the two digital signalswhich form the OTP. The x in the bottom paneis now different to the normal Lorenz x signal be-cause of the added Pade delay.

V Conclusion

Cloud computing is suffering from poor securityproblems that are growing almost exponentially.Some cloud service providers do not encrypt clientdata while others encrypt using a weaker 128-bitAES encryption, such as in iCloud. However, evenwith secure algorithms, Cloud sites are still suc-cessfully attacked, and our solution encrypts dataat the client end that can be decoded only with theoriginal OTP. Creating OTPs for encoding datais not new, but our prototype incorporates somenovel aspects such as an analogue delay in thechaos sources to increase the overall entropy. Fur-thermore, the chaos sources were initialising usinga novel noise initialising technique which classifiesthe prototype generator as a true source of ran-domness. Specific one-to-Cloud applications givenin the paper ensures there are no key distributionproblems. A JavaScript application processes thedata and the OTP and adds a vN deskewing algo-rithm to increase the cipher entropy.

Virtual prototyping and device model interfac-ing is a new feature in PSpice and allowed the sim-ulation schematic to communicate with real hard-ware in real time. Another new feature exportsdata from PSpice to MATLAB R© and provides anadditional tool for analysing data not possible inPSpice. Personalising the encryption process lo-cally, ultimately gives greater control and securityto the client who wishes to encrypt sensitive databut retains the usefulness of Cloud storage. Fu-ture research will investigate applications for the

Page 8: One-to-Cloud One-Time Pad Data Encryption: Introducing

device between two people, but the key distribu-tion problem has to be solved.

Acknowledgements

The authors are grateful to Professor MichaelConlon and Dr Marek Rebow, Dublin Instituteof Technology, for arranging the collaborative re-search programme.

References

[1] S. Ergn, U. Gler and K. Asada, “A HighSpeed IC Truly Random Number Genera-tor Based on Chaotic Sampling of RegularWaveform”, IEICE Transactions on Funda-mentals of Electronics, Communications andComputer Sciences, Vol. E94 A, 1, 2011, pp.180-190.

[2] P. Tobin, L. Tobin, M. McKeever and J.Blackledge, “Chaos-based Cryptography forCloud Computing”, 27th ISSC conference Ul-ster University, Londonderry, June 21-22, doi:10.1109, 2016, pp. 1-6.

[3] P. Tobin, L. Tobin, M. McKeever and J.Blackledge, “On the Development of a One-Time Pad Generator for Personalising CloudSecurity”, Athens, Conference on CLOUDCOMPUTING, Feb 19-23, 2017.

[4] D. Shumow, N. Ferguson “On the possibilityof a back door in the NIST SP800-90 DualEc Prng”, CRYPTO Rump Session, August2007. [Online]. Available: http://rump2007.cr.yp.to/15-shumow.pdf.

[5] The New York Times, “ Secret DocumentsReveal N.S.A. Campaign Against Encryp-tion”, 2013.

[6] W. Bennett, “Secret Telephony as a Histor-ical Example of Spread-Spectrum Communi-cation”, IEEE TRANSACTIONS ON COM-MUNICATION COM-31.1 (1983): 98-104.

[7] P. Weadon,“Sigsaly Story”, National SecurityAgency / Central Security Service. NationalSecurity Agency, 15 Jan 2009.

[8] J. V. Boone, and R. R. Peterson.“Sigsaly -The Start of the Digital Revolution”, NationalSecurity Agency / Central Security Service.National Security Agency, 15 Jan 2009. Web.19 Oct 2010.

[9] [Online].Available: http://www.ecourt.ie/

[10] C.E. Shannon, “A mathematical theory ofcryptography”, Memorandum MM, 45, 1945,pp.110-02.

[11] C. E. Shannon, “Communication Theory ofSecrecy Systems”, Bell Technical Journal,vol.28-4, 1949, pp. 656 715.

[12] E. Barker, E. Kelsey K, “Recommendation forthe Entropy Sources Used for Random BitGeneration (draft)”, NIST SP800-90B, Au-gust 2012.

[13] [online] Available: http://www.pspice.com/blog

[14] E. Lorenz, “Chaos and Strange Attractors:The Lorenz Equations”, pp. 532-538, 1963.

[15] Zaid, Osama M. Abu, et al.,“A Proposed En-cryption Scheme based on Henon Chaotic Sys-tem (PESH) for Image Security”, Interna-tional Journal of Computer Applications 61.5,2013.

[16] P. Tobin, “PSpice for Digital Signal Pro-cessing, http://www.morganclaypool.com/

action/doSearch?AllField=tobin&x=0&y=

0&SeriesKey= ISBN:1598291629, 2007.

[17] P. Kennedy, “Genealogy of Chuas Circuit InChaos, CNN, Memristors and Beyond: AFestschrift for Leon Chua” pp. 3-24, 2013

[18] R. Kili, “A practical guide for studyingChua’s circuits”, Vol. 71. World Scientific,2010.

[19] [online] Available: http://jork.byethost7.com/chaosencrypt/.

[20] J. von Neumann, “Various techniques usedin connection with random digits”, AppliedMath Series, 12:3638, 1951.

[21] A. Rukhin, et al., “A statistical test suitefor the validation of random number gen-erators and pseudo-random number genera-tors for cryptographic applications”, [online]Available: http://csrc.nist.gov/groups/

ST/toolkit/rng/, 2010.

[22] [online]. Available: http://www.flowcad.

de/Application_Notes.htm.

[23] [online]. Available: http://www.

pspice.com/resources/video-library/

pspice-simulation-arduino-driven-sensors