Skip to content
Name-based Access Control over NDN. A refactored version.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

NAC (Name-based Access Control over NDN)

This is a refactored version of NAC by Zhiyi Zhang ( The new NAC decouples the application scenarios and the library functionality.

The library has two main parts:

  • Crypto support part (./src/crypto)

  • NAC functionality (./src)

    • Owner: generate E-KEY (producers use E-KEY to generate encrypted Content) and D-KEY (consumers use D-KEY to decrypt content)
    • Producer: generate encrypted content Data packets
    • Consumer: consume content Data packets

Install and Compile NAC

  1. Clone the github repo
git clone
  1. Compile from source
cd NAC
./waf configure

In the ./waf configure step, the script will check all the required dependencies. If any dependency is missing, please install the dependency first and redo the ./waf configure.

All the dependencies are listed here:

  • ndn-cxx
  • BOOST (Given that ndn-cxx also depends on BOOST, thus if you successfully install the ndn-cxx, then you are all set :D )
  1. Install the library
./waf install


Link NAC when you compile your code. After perform ./waf install described in the last section, you can directly use pkg-config to link the NAC library.

CFLAGS+= `pkg-config --cflags nac`
LDFLAGS+= `pkg-config --libs nac`

All functions in Owner, Producer, Consumer classes are well commented, so have fun :D.

Bug Report

You can send a email to me (

You can’t perform that action at this time.