Skip to content

Hardware implementation of Lightweight Cryptography candidates in Bluespec SystemVerilog.

License

Notifications You must be signed in to change notification settings

kammoh/bluelight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BlueLight and CocoLight

BlueLight: Bluespec implementations of Lightweight Cryptography Candidates

Bluespec SystemVerilog implementations of NIST Lightweight Cryptography (LWC) candidates.

Compliant with LWC Hardware API.

  • Bluespec LWC support package LwcApi

  • CryptoCore implementations:

    • Ascon
      • Ascon-128 (WIP: Ascon-128a) AEAD and Hash
      • parameterized: unroll factor
      • fastest available FPGA implementation
      • winner of NIST LWC selection process
    • Gift-COFB
    • Gimli
    • Sparkle
    • subterranean
    • Xoodyak
      • AEAD and Hash
      • 1x/2x unroll
      • NIST LWC Round 2 and Round 3

BlueLight CryptoCore Interface and API

BlueLight sources are located in the bluelight directory.

CryptoCore Interface

BdIO is used for both input and output to/from CryptoCore.

typedef struct {
  CoreWord word;   // data word
  Bool lot;        // last word of the type
  Bit#(2) padarg;  // padding argument, number of valid bytes or 0 if all valid
} BdIO;
interface CryptoCoreIfc;
  method Action process(SegmentType typ, Bool empty); // after fire, 0 or more words of type `typ` will be processed by the CryptoCore
  interface FifoIn#(BdIO)  bdi; // input to CryptoCore
  interface FifoOut#(BdIO) bdo; // output from CryptoCore
endinterface

Code statistics for BlueLight LWC package (generated by tokei):

Language Files Lines Code Comments Blanks
BSV 5 945 684 71 190

CocoLight

LWC Testbench framework based on cocotb Python framework. Sources are located in cocolight directory.