ndn::security Namespace Reference

Namespaces

 pib
 
 tpm
 
 transform
 
 v2
 

Classes

class  CommandInterestPreparer
 Helper class to prepare command interest name. More...
 
class  CommandInterestSigner
 Helper class to create command interests. More...
 
class  SafeBag
 a secured container for sensitive information(certificate, private key) More...
 
class  SigningInfo
 Signing parameters passed to KeyChain. More...
 
class  ValidatorConfig
 Helper for validator that uses CommandInterest + Config policy and NetworkFetcher. More...
 
class  ValidityPeriod
 Abstraction of validity period. More...
 

Functions

 BOOST_CONCEPT_ASSERT ((boost::EqualityComparable< ValidityPeriod >))
 
 BOOST_CONCEPT_ASSERT ((WireEncodable< ValidityPeriod >))
 
 BOOST_CONCEPT_ASSERT ((WireEncodableWithEncodingBuffer< ValidityPeriod >))
 
 BOOST_CONCEPT_ASSERT ((WireDecodable< ValidityPeriod >))
 
 BOOST_CONCEPT_ASSERT ((WireEncodable< SafeBag >))
 
 BOOST_CONCEPT_ASSERT ((WireDecodable< SafeBag >))
 
std::ostream & operator<< (std::ostream &os, const ValidityPeriod &period)
 
std::ostream & operator<< (std::ostream &os, const SigningInfo &si)
 
static std::tuple< bool, const uint8_t *, size_t, const uint8_t *, size_t > parse (const Data &data)
 
static std::tuple< bool, const uint8_t *, size_t, const uint8_t *, size_t > parse (const Interest &interest)
 
template size_t SafeBag::wireEncode<::ndn::encoding::EncoderTag > (::ndn::EncodingBuffer &) const
 
template size_t SafeBag::wireEncode<::ndn::encoding::EstimatorTag > (::ndn::EncodingEstimator &) const
 
SigningInfo signingByCertificate (const Name &certName)
 
SigningInfo signingByCertificate (const v2::Certificate &cert)
 
SigningInfo signingByIdentity (const Name &identityName)
 
SigningInfo signingByIdentity (const Identity &identity)
 
SigningInfo signingByKey (const Name &keyName)
 
SigningInfo signingByKey (const Key &key)
 
SigningInfo signingWithSha256 ()
 
template size_t ValidityPeriod::wireEncode<::ndn::encoding::EncoderTag > (::ndn::EncodingBuffer &) const
 
template size_t ValidityPeriod::wireEncode<::ndn::encoding::EstimatorTag > (::ndn::EncodingEstimator &) const
 
bool verifyDigest (const uint8_t *blob, size_t blobLen, const uint8_t *digest, size_t digestLen, DigestAlgorithm algorithm)
 Verify blob against digest using algorithm. More...
 
bool verifyDigest (const Data &data, DigestAlgorithm algorithm)
 Verify data against digest algorithm. More...
 
bool verifyDigest (const Interest &interest, DigestAlgorithm algorithm)
 Verify interest against digest algorithm. More...
 
bool verifySignature (const uint8_t *blob, size_t blobLen, const uint8_t *sig, size_t sigLen, const v2::PublicKey &pKey)
 Verify blob using key against sig. More...
 
bool verifySignature (const uint8_t *blob, size_t blobLen, const uint8_t *sig, size_t sigLen, const uint8_t *key, size_t keyLen)
 Verify blob using key against sig. More...
 
static bool verifySignature (const std::tuple< bool, const uint8_t *, size_t, const uint8_t *, size_t > &params, const v2::PublicKey &pKey)
 
static bool verifySignature (const std::tuple< bool, const uint8_t *, size_t, const uint8_t *, size_t > &params, const uint8_t *key, size_t keyLen)
 
bool verifySignature (const Data &data, const v2::PublicKey &key)
 Verify data using key. More...
 
bool verifySignature (const Interest &interest, const v2::PublicKey &key)
 Verify interest using key. More...
 
bool verifySignature (const Data &data, const pib::Key &key)
 Verify data using key. More...
 
bool verifySignature (const Interest &interest, const pib::Key &key)
 Verify interest using key. More...
 
bool verifySignature (const Data &data, const uint8_t *key, size_t keyLen)
 Verify data using key. More...
 
bool verifySignature (const Interest &interest, const uint8_t *key, size_t keyLen)
 Verify interest using key. More...
 
bool verifySignature (const Data &data, const v2::Certificate &cert)
 Verify data using cert. More...
 
bool verifySignature (const Interest &interest, const v2::Certificate &cert)
 Verify interest using cert. More...
 

Variables

static const size_t ISO_DATETIME_SIZE = 15
 
static const size_t NOT_AFTER_OFFSET = 1
 
static const size_t NOT_BEFORE_OFFSET = 0
 

Function Documentation

ndn::security::BOOST_CONCEPT_ASSERT ( (boost::EqualityComparable< ValidityPeriod >)  )
ndn::security::BOOST_CONCEPT_ASSERT ( (WireEncodable< ValidityPeriod >)  )
ndn::security::BOOST_CONCEPT_ASSERT ( (WireEncodableWithEncodingBuffer< ValidityPeriod >)  )
ndn::security::BOOST_CONCEPT_ASSERT ( (WireDecodable< ValidityPeriod >)  )
ndn::security::BOOST_CONCEPT_ASSERT ( (WireEncodable< SafeBag >)  )
ndn::security::BOOST_CONCEPT_ASSERT ( (WireDecodable< SafeBag >)  )
std::ostream & ndn::security::operator<< ( std::ostream &  os,
const ValidityPeriod period 
)

Definition at line 166 of file validity-period.cpp.

std::ostream & ndn::security::operator<< ( std::ostream &  os,
const SigningInfo si 
)

Definition at line 169 of file signing-info.cpp.

static std::tuple<bool, const uint8_t*, size_t, const uint8_t*, size_t> ndn::security::parse ( const Data data)
static

Definition at line 72 of file verification-helpers.cpp.

static std::tuple<bool, const uint8_t*, size_t, const uint8_t*, size_t> ndn::security::parse ( const Interest interest)
static

Definition at line 87 of file verification-helpers.cpp.

template size_t ndn::security::SafeBag::wireEncode<::ndn::encoding::EncoderTag > ( ::ndn::EncodingBuffer &  ) const
template size_t ndn::security::SafeBag::wireEncode<::ndn::encoding::EstimatorTag > ( ::ndn::EncodingEstimator &  ) const
SigningInfo ndn::security::signingByCertificate ( const Name certName)
Returns
a SigningInfo for signing with a certificate

Definition at line 52 of file signing-helpers.cpp.

SigningInfo ndn::security::signingByCertificate ( const v2::Certificate cert)
Returns
a SigningInfo for signing with a certificate

Definition at line 58 of file signing-helpers.cpp.

SigningInfo ndn::security::signingByIdentity ( const Name identityName)
Returns
a SigningInfo for signing with an identity

Definition at line 28 of file signing-helpers.cpp.

SigningInfo ndn::security::signingByIdentity ( const Identity &  identity)
Returns
a SigningInfo for signing with an identity

Definition at line 34 of file signing-helpers.cpp.

SigningInfo ndn::security::signingByKey ( const Name keyName)
Returns
a SigningInfo for signing with a key

Definition at line 40 of file signing-helpers.cpp.

SigningInfo ndn::security::signingByKey ( const Key &  key)
Returns
a SigningInfo for signing with a key

Definition at line 46 of file signing-helpers.cpp.

SigningInfo ndn::security::signingWithSha256 ( )
Returns
a SigningInfo for signing with Sha256

Definition at line 64 of file signing-helpers.cpp.

template size_t ndn::security::ValidityPeriod::wireEncode<::ndn::encoding::EncoderTag > ( ::ndn::EncodingBuffer &  ) const
template size_t ndn::security::ValidityPeriod::wireEncode<::ndn::encoding::EstimatorTag > ( ::ndn::EncodingEstimator &  ) const
bool ndn::security::verifyDigest ( const uint8_t *  blob,
size_t  blobLen,
const uint8_t *  digest,
size_t  digestLen,
DigestAlgorithm  algorithm 
)

Verify blob against digest using algorithm.

This is the core function, all other verifyDigest overloads are implemented in terms of this function.

Definition at line 194 of file verification-helpers.cpp.

bool ndn::security::verifyDigest ( const Data data,
DigestAlgorithm  algorithm 
)

Verify data against digest algorithm.

Definition at line 216 of file verification-helpers.cpp.

bool ndn::security::verifyDigest ( const Interest interest,
DigestAlgorithm  algorithm 
)

Verify interest against digest algorithm.

Note
This method verifies only signature of the signed interest
See also
docs/specs/signed-interest.rst

Definition at line 235 of file verification-helpers.cpp.

bool ndn::security::verifySignature ( const uint8_t *  blob,
size_t  blobLen,
const uint8_t *  sig,
size_t  sigLen,
const v2::PublicKey &  pKey 
)

Verify blob using key against sig.

This is the core function, all other verifySignature overloads are implemented in terms of this function.

Definition at line 41 of file verification-helpers.cpp.

bool ndn::security::verifySignature ( const uint8_t *  data,
size_t  dataLen,
const uint8_t *  sig,
size_t  sigLen,
const uint8_t *  key,
size_t  keyLen 
)

Verify blob using key against sig.

Definition at line 57 of file verification-helpers.cpp.

static bool ndn::security::verifySignature ( const std::tuple< bool, const uint8_t *, size_t, const uint8_t *, size_t > &  params,
const v2::PublicKey &  pKey 
)
static

Definition at line 108 of file verification-helpers.cpp.

static bool ndn::security::verifySignature ( const std::tuple< bool, const uint8_t *, size_t, const uint8_t *, size_t > &  params,
const uint8_t *  key,
size_t  keyLen 
)
static

Definition at line 126 of file verification-helpers.cpp.

bool ndn::security::verifySignature ( const Data data,
const v2::PublicKey &  key 
)

Verify data using key.

Definition at line 144 of file verification-helpers.cpp.

bool ndn::security::verifySignature ( const Interest interest,
const v2::PublicKey &  key 
)

Verify interest using key.

Note
This method verifies only signature of the signed interest
See also
docs/specs/signed-interest.rst

Definition at line 150 of file verification-helpers.cpp.

bool ndn::security::verifySignature ( const Data data,
const pib::Key key 
)

Verify data using key.

Definition at line 156 of file verification-helpers.cpp.

bool ndn::security::verifySignature ( const Interest interest,
const pib::Key key 
)

Verify interest using key.

Note
This method verifies only signature of the signed interest
See also
docs/specs/signed-interest.rst

Definition at line 162 of file verification-helpers.cpp.

bool ndn::security::verifySignature ( const Data data,
const uint8_t *  key,
size_t  keyLen 
)

Verify data using key.

Definition at line 168 of file verification-helpers.cpp.

bool ndn::security::verifySignature ( const Interest interest,
const uint8_t *  key,
size_t  keyLen 
)

Verify interest using key.

Note
This method verifies only signature of the signed interest
See also
docs/specs/signed-interest.rst

Definition at line 174 of file verification-helpers.cpp.

bool ndn::security::verifySignature ( const Data data,
const v2::Certificate cert 
)

Verify data using cert.

Definition at line 180 of file verification-helpers.cpp.

bool ndn::security::verifySignature ( const Interest interest,
const v2::Certificate cert 
)

Verify interest using cert.

Note
This method verifies only signature of the signed interest
See also
docs/specs/signed-interest.rst

Definition at line 186 of file verification-helpers.cpp.

Variable Documentation

const size_t ndn::security::ISO_DATETIME_SIZE = 15
static

Definition at line 36 of file validity-period.cpp.

const size_t ndn::security::NOT_AFTER_OFFSET = 1
static

Definition at line 38 of file validity-period.cpp.

const size_t ndn::security::NOT_BEFORE_OFFSET = 0
static

Definition at line 37 of file validity-period.cpp.