Code Monkey home page Code Monkey logo

software-based-puf's Introduction

Software-based Physically Unclonable Function

README

This repository is dedicated for the first open source software-based Physically Unclonable Function (PUF) using off-the-shelf SRAM.

Abstract

SRAM PUF has a potential to become the main player in hardware security. Unfortunately, currently available solutions are usually locked to specific entities, such as companies or universities. Here, we introduce the first open source project to develop software-based SRAM PUF technology using off-the-shelf SRAM. We also present testing results on two off-the-shelf SRAMs quality to be a PUF component; Microchip 23LC1024 and Cypress CY62256NLL. Testing on two bit-selection algorithms (data remanence analysis and neighbor analysis) are also performed. Based on the testing results, we introduce a PUF enrollment scheme using data remanence analysis as the bit selection algorithm which will locate the location of the stable bits and SRAM Cypress CY62256NLL as the off-the-shelf SRAM. Moreover, we also propose a procedure to develop SRAM PUF-based applications using any off-the-shelf SRAM. The procedure consists of three main steps; test the off-the-shelf SRAM quality to be a PUF component, create a PUF-generated key using enrollment-reconstruction mechanism, and develop any PUF-based application utilizing the PUF-generated key. In addition, an idea to create numerous CRPs using SRAM PUF is also proposed here. Using a collection of stable bits as a challenge, the stable bits are permutated among themselves to create a challenge which has a numerous number of possibilities. Furthermore, we also present a secure data and key storage scheme using SRAM PUF. The proposed scheme is influenced by multi-factor authentication. Using a combination of a PUF-generated key and user's password, a derived key is produced and utilized as the final key to protect user's data or/and user's key. As the grand concluding experiment of this thesis, we present a demo of storing a private key of Bitcoin. We shows that the Bitcoin key will not be reconstructed successfully if user's password is incorrect or the SRAM is not similar with the one that use to encrypt the Bitcoin key.

Repository structure

There are two folder inside:

  • Thesis Report: contains latex files required for the thesis report.
  • Source Code: source code for the thesis project and instructions on how to test SRAMs, perform enrollment, reconstruct PUF-generated key, and use the secure data and key storage scheme. All Arduino code is developed using platformio. The type of the Arduino is Arduino Mega 2560. The Python code is developed using PyCharm IDE.
    • code-coverage: C++ codes for testing using GCOV and LCOV. Developed using CLion.
    • enrollment and testing: source code required for enrollment and testing.
      • master-enrollment: Python code, act as a master for the enrollment scheme
      • master-testing: Python code, act as a master for testing
      • slave-23lc1024: Arduino code, act as a slave for testing Microchip 23LC1024
      • slave-cy62256nll: Arduino code, act as a slave for testing and enrollment on Cypress CY62256NLL
    • key storage scheme: Arduino source code for the secure data protection and key storage scheme. Enrollment has to be performed first before you can use this feature.
      • PUF-decrypt: Arduino code to decrypt the ciphertext using the proposed scheme
      • PUF-encrypt: Arduino code to encrypt user's key using the proposed scheme
    • reconstruction: Arduino source code for reconstruct the PUF-generated key. Enrollment has to be performed first before you can use this feature.
    • schematic: pictures and fzz files which shows how to connect Arduino with SRAM Cypress CY62256NLL and Microchip 23LC1024 for the testing and enrollment. Open the fzz files using Fritzing.
  • Figures: figures showing parallel profiling and key reconstruction using Arduino, microSD and SRAM Cypress CY62256NLL.
    • Parallel profiling using four SRAMs and four Arduino. Parallel profiling
    • Key reconstruction. key reconstruction
    • Arduino Mega 2560 connected to a microSD and an SRAM Cypress CY62256NLL. key reconstruction

software-based-puf's People

Contributors

asajim avatar myndcryme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

software-based-puf's Issues

Using this lib for esp32 platformio

Hi ..

Do you think it is possible modifying a bit the library running the puf encrytpion and decryption for esp32 microcontrollers?
I am using platformio and arduino framework.

Thanks

Libraries

I don't understand from where did you download libraries such as
#include <Tools.h>
#include <BCH.h>
#include <SRAM_CY62256N.h> in slave-cy62256nll for arduino in order to retrieve stable bit location using cypress sram(section 1.1 in readme of codes).

Questions about license (GPLv3) and copyright information

@synctext

I know that the Tribler/software-based-PUF includes a copy of the GPLv3 license here: https://github.com/Tribler/software-based-PUF/blob/master/LICENSE but the FSF recommends, "You should put a notice at the start of each source file, stating what license it carries, in order to avoid risk of the code's getting disconnected from its license."

https://www.gnu.org/licenses/gpl-faq.html#NoticeInSourceFile

I think each Tribler/software-based-PUF code file should display a license notice and I can add notices with copyright info accordingly. I would like to credit the original author for his code adding a Copyright, but I read, "The case when someone else might possibly claim the copyright is if you are an employee or student; then the employer or the school might claim you did the job for them and that the copyright belongs to them." https://www.gnu.org/licenses/gpl-faq.html#HowIGetCopyright

So, I need to ask who owns the Copyright? Ade Setyawan Sajim or Delft University of Technology? Regards, myndcryme.

Errors during enrollment

When compiling MainEnrollment.py in Section 2, it shows that "Error opening challenge file on microSD". I don't know why there is an error!

Not an issue !

Hi, this is not an issue. I am curious about the advantages of off-chip SRAM PUF over on-chip SRAM PUF. I couldn't find any notable advantages when I referred to research papers. Or are there any specific use cases where on-chip SRAM PUF can't apply?

Not able to run the code - "Error connecting to Arduino"

Section 1.1: Retrieve SRAM's stable bits using data remanence algorithm
I was trying to execute this. I uploaded the arduino code using platformio successfully.
Then i ran the GetStableBits.py. But I got an error "Error connecting to Arduino".
software-based-PUF/Source Code/enrollment and testing/master-testing/GetStableBits.py
pls help.

I feel setting up the environment to run this project is quite a big task. If you could give detailed instructions on this it would be a great help to everyone.

About enrollment some question

我按照您的步驟在Section 2 編譯 MainEnrollment.py時發現會有錯誤,debug時我發現她會在"check_if_it_is_working"這個副涵式會看count_wrong是否大於0(代表有錯誤會跳出),有按照'CY62256NLL-enrollment-microSD.fzz' 的圖片的接線方式去接,但是我不清楚為何會有錯誤,想請問在section 2之前有要準備其他東西嗎?謝謝

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.