1) Download the files and directories for this lab to your laptop. COPY YOUR AT_Master_TDC.db and NAT_Master_TDC.db INTO THIS DIRECTORY (from the previous lab) NOTE: For ubuntu users. Be sure sqlite is installed on your laptop. You should have done this in the previous lab where you run device authentication only. apt install sqlite3 apt install libsqlite3-dev You must have openssl version 1.1.1 installed too. On my ubuntu machine, it is there by default. Check the version, type openssl version This should return OpenSSL 1.1.1 2) Edit the Makefile and change the path to where you installed Vivado. For CORA, you will need to use a version of Vivado 2017.x, otherwise you will get an error 'GLIBC_2.28' not found. Run the command make 3) PROGRAM THE ZYBO OR CORA BOARD WITH ONE OF THE BITSTREAMS (ZYBO use 'echo' command, CORA use Hardware Manager in Vivado). 4) Copy the following files to your Zybo/Cora board scp device_regeneration.elf root@192.168.1.10: scp Challenges.db root@192.168.1.10: ZYBO: scp ZYBO_LIBS/libsqlite3.so.0.8.6 root@192.168.1.10:/lib CORA: scp CORA_LIBS/libsqlite3.so.0.8.6 root@192.168.1.10:/lib BOTH ZYBO AND CORA scp ARM_LIBS/libcrypto.so.1.1 root@192.168.1.10:/lib scp ARM_LIBS/libssl.so.1.1 root@192.168.1.10:/lib 5) After copying the libsqlite3.so.0.8.6, do the following on your Cora or Zybo boards cd /lib ln -s libsqlite3.so.0.8.6 libsqlite3.so.0 ln -s libsqlite3.so.0.8.6 libsqlite3.so ln -s libcrypto.so.1.1 libcrypto.so ln -s libssl.so.1.1 libssl.so cd 6) YOU MUST PROGRAM THE BOARD BEFORE RUNNING THESE COMMANDS ZYBO: Program with each of these, one-at-a-time, using the 'echo' command and run authentication CORA: Program with each of these, one-at-a-time, from Vivado/Hardware Manager and run authentication echo SR_RFM_V4_TDC_Macro_P1.bit.bin > /sys/class/fpga_manager/fpga0/firmware echo SR_RFM_V4_TDC_Macro_P2.bit.bin > /sys/class/fpga_manager/fpga0/firmware echo SR_RFM_V4_TDC_Macro_P3.bit.bin > /sys/class/fpga_manager/fpga0/firmware echo SR_RFM_V4_TDC_Macro_P4.bit.bin > /sys/class/fpga_manager/fpga0/firmware 7) Copy PUFCash_V3.db and AuthenticationToken.db to your ZYBO or CORA board scp PUFCash_V3.db root@192.168.1.10: scp AuthenticationToken.db root@192.168.1.10: 8) Run this on your laptop FIRST -- wait for it to get to 'waiting for connections ...', change the IP as needed verifier_regeneration Master_TDC SR_RFM_V4_TDC SRFSyn1 192.168.1.20 Master1_OptKEK_TVN_0.00_WID_1.75 Wait for it to finish, i.e. to print 'Waiting for connections ...' 9) Run this on your Cora/Zybo, change the IP as needed ./device_regeneration.elf Alice 192.168.1.10 192.168.1.20 ./device_regeneration.elf Bob 192.168.1.11 192.168.1.20 10) You will need a switch to connect your laptop to TWO FPGA boards, one with IP, e.g., 192.168.1.10 and one with IP 192.168.1.11. You run device_regeneration.elf on the two FPGA boards in either order or simultaneously but only after running verifier_regeneration on the server and waiting for 'Waiting for connections ...' is printed. 11) Once both are running, you will be presented with a menu. Choose Get-ATs (option 8) first on Alice and Bob's FPGAs. And then choose TRANSFER (Option 2) on either Alice or Bob (NOT BOTH). This will eventually transfer money between Alice and Bob but right now, it only does mutual authentication and session key generation. 12) Prepare to demo this in class. You will need to pick two partners -- form groups of THREE, even though only two of you are needed for this lab.