Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore...

20
Cryptowarez A survey of Hardware Crypto Devices BSidesPDX Updated: 17 September 2016

Transcript of Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore...

Page 1: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

CryptowarezA survey of Hardware Crypto DevicesBSidesPDX

Updated: 17 September 2016

Page 2: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

Overview

1. Introduction

2. Classical

3. Big Iron

4. Embedded

Page 3: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

INTRODUCTION

Page 4: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

Hi, I’m Josh!

# Owner of Cryptotronix

# Went around-the-world ona submarine

# I get sea sick.

Page 5: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

I can haz cryptowarez?

So, why do we want crypto hardware?

# Crypto offloading (algorithm acceleration).

# Key Protection.

THOSE TWO ITEMS ARE THE FOUNDATION

From those, more advanced security features are built.

Of course, if you undermine those . . . .

Page 6: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

CLASSICAL

Page 7: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

Modern Crypto Hardware

Source:https://en.wikipedia.org/wiki/Enigma_machine

# First wide-spread moderndedicated crypto hardware

# Performs encipherment anddecipherment in humantime.

# Key management was a bitof a challenge

# Not recommended for newdesigns!!

Page 8: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

BIG IRON

Page 9: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

Hardware Security Modules

Source: https://www.thales-esecurity.com

# Up to FIPS 140-2 Level 3

# PKCS#11 Interface,OpenSSL Engine, Java JCE,Microsoft CAPI and CNG.

# Uses: PKI management,code signing, paymentprocessing, file encryption.

# Expensive.

# Cloud providers have someintegration now: Azure &AWS.

# Heavily proprietary.

Page 10: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

Cryptech: HSMs for the people!

Source: https://www.crowdsupply.com/cryptech/

open-hardware-security-module

# PKCS#11 over USB

# SHA-1 and 2, RSA andECDSA (NIST)

# TRNG

# Contains an Artix-7 FPGA,ARM Cortex-M4 andATtiny828 (for tamperdetect)

# Heavily Open: Everythingunder BSD or CC license

Page 11: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

Cryptech: Architecture

CPUARM Cortex-M4

STM32F429BIT6208-PIN LQFP

FPGA

Xilinx Artix-7 200TFBG484-3

Layout compatible withFGG484

Cryptech Alpha BoardRev 0.0102015-05-27 (JoachimS)

Tamper Detect MCUAtmel AVR @ 20 MHzClocked using internal

oscillator

AT Tiny 828R-AYTQFP-32

SDRAM 64 MbitISSI IS42S16400J

TSOP

USB-UARTinterface

FT232H LQFP48

USB-UARTinterface

FT232H LQFP48

On boardPower Suppy

block

DCconnector

USBconnector

USBconnector

12V5V3V3

2V5

3V1V2

1V37

5

12-1

9V D

C2.

5A ty

pM

ax 3

A pe

ak @

12V

MicroSD Card2 GByte

4-bit MMC

Keystore memSerial Flash

At least 64 Mbit

SPI

Real Time ClockMicrochip

MCP79412TSSOP

I2C

CPULEDs

4 G

PIO

s

8 GPIOsCPU

GPIOsCPUJTAG

Tamper eventsto CPU

TamperJTAG

2GPIOs

JTAG

JTAG

TamperLEDs

4 GPIOs

FMC SRAM IF @ 45-90 MHz

32 bit data bus26 bit separate address bus

FPGA Events

4 GPIOs

TamperGPIOs

8 GPIOs

CPU - Tamperserial port

via jumpersto disable

Rx, Tx2 wire UART or 2 GPIOs

3V31 GPIO

Tamper button

Tamper eventsto FPGA

2GPIOs

3V3TamperPower Supply

can be replacedby power fromPSU by setting

jumper

FPGA LEDs4 + 8 GPIOs

FPGA GPIOs8 GPIOs

Xilinx Platform CableJTAG

Master KeyMemory

8 kByteSerial SRAM

Microchip23A640 8TSSOP

Analog Switch

OnSemiMC14551B

FPG

A M

KM S

PI

MISO can bepulled low by setting

jumper

Switch control

MKM Tamper SPI

1 GPIOMKM Tamper power control

1V8

MKM power supply can beconnected to PSU by

Setting jumperMKM

Battery1V8

FPGAConfig mem

Analog Switch

OnSemiMC14551B

CPU FPGA Config Mem SPI

CPU FPGA Config Mem Switch Control

SPI

1 GPIO

SPI from CPU to FPGAConfig Mem

and control of switchcan be disabled byremoving jumpers

SPI

SPI

SPI

1V8Write Enable ofConfig Mem

can be disabled byremoving jumper

CryptechAvalanche

noiseblock

FPGAresetblock

FPGAclock

source@ 50 MHz

CPU FPGA Reset

1 GPIO

Reset of FPGA by CPUcan be disabled byremoving jumper

Noise1 GPIO

Reset_n

FPGA clk

12V must be stable,low noise since itfeeds the noise

source.

UARTUART

USB 2.0USB 2.0

SPI

3VBattery

32.768 kHzCrystal

CPUreset block

CPUclock

source

CPUreset block

FPGA chip select and clock

32 bit data bus26 bit address bus

SDRAM 512 MbitISSI IS45S32160F

TSOP-II

One chip for each of thetwo SDRAM interfaces

SDRAM control foreach SDRAM IF

USART with ISO 7816-3

I2C

Interfaces for possibleSmart Card readerand display/controlon separate board

Page 12: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

Interns have fun projects!

Digilent Zybo Zynq-7000

IP Core LUTs FFCHACHA201 3585 3727SHA12 1717 1563SHA2563 2296 1856SHA5124 5310 3735

150MHz core clock and 250MHz AXI bus (1 round of encryption per coreclock) For salsa20, its 20 rounds per block

2100MHz core clock and 100MHz AXI bus (1 round of encryption per coreclock)

370MHz core clock and 70MHz AXI bus (1 round of encryption per core clock)460MHz core clock and 60MHz AXI bus(1 round of encryption per core clock)

Page 13: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

EMBEDDED

Page 14: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

Secure MCUs

Vendor Product Proc NotesFreescale (NXP) K80 M4 HRNG, AES, MPU, en-

crypted flashSTMicro ST33G1M2A M3 HRNG, AES, NESCRYPTInfineon P SLJ 52ACA 16-bit AES,ECC,RSA,EAL5+Microchip CEC1302 M4 ECC,RSA,SHA,AES,HWRNG,

No flashMaxim MAX32550 M3 AES,SHA,HWRNG,Secure

Boot

Page 15: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

Crypto SideCars

Vendor Product NotesAtmel ATSHA204A SHA256, HMAC, Open DatasheetAtmel ATAES132A Encrypted 32K EEPROM, Open DatasheetAtmel ATECC508A ECDSA, ECDH, P-256ST STSAFE-A100 EAL5+, AES256 KW, ECDSA/ECDH

# 204/508 kernel driver:https://github.com/cryptotronix/atsha204-i2c

# 204 cli: https://github.com/cryptotronix/hashlet

# 204/508 lib cli:https://github.com/cryptotronix/libcrypti2c

# 508 cli: https://github.com/cryptotronix/EClet

Page 16: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

CryptoThings

Page 17: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

But wait, there’s more!

Lots of other hardware crypto areas, but you know, 20 minutes :(

1. Smart Cards2. Secure Elements and NFC Controllers3. PKI USB Tokens4. U2F Tokens5. Bitcoin Hardware Wallets6. A smart card that runs BASIC and ECDSA7. Crypto IP in most radio MCUs

GROWTH OF HARDWARE CRYPTO

Hardware crypto is growing with IoT. Silicon vendors are expand-ing the IP which is trickling down to custom ASICs and COTS ICs.

Page 18: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

But is that a good thing?

1. Dedicated crypto hardware may reduce software exploits, butit may increase hardware attack vectors.

2. Hardware is well, hard to change.

3. Few vendors providing non-NDA and open-distributor access.

4. A2: Analog Malicious Hardware

Page 19: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

Conclusion

SECURITY ENGINEERING STILL REQUIRED

Hardware crypto does not alleviate proper threat modeling andrisk mitigation.

WE NEED MORE OPEN CRYPTO!

Vendors have their part in adding security, but tools, knowledge,and application are what will turn the ship.

Page 20: Asurvey of HardwareCryptoDevices BSidesPDXInternshave fun projects! DigilentZyboZynq-7000 IPCore LUTs FF CHACHA201 3585 3727 SHA12 1717 1563 SHA2563 2296 1856 SHA5124 5310 3735 150MHz

Das Ende

# www.cryptotronix.com

# Just ask for Josh ;)