ndn::security Namespace Reference

Namespaces

 detail
 
 pib
 
 tpm
 
 transform
 
 v2
 
 validator_config
 

Classes

class  AdditionalDescription
 Represents an AdditionalDescription TLV element. More...
 
class  CertContainerInterface
 
class  Certificate
 Represents an NDN certificate following the version 2.0 format. More...
 
class  CertificateBundleFetcher
 Fetch certificate bundle from the network. More...
 
class  CertificateCache
 Represents a container for verified certificates. More...
 
class  CertificateFetcher
 Interface used by the validator to fetch missing certificates. More...
 
class  CertificateFetcherDirectFetch
 Extends CertificateFetcherFromNetwork to fetch certificates from the incoming face of the packet. More...
 
class  CertificateFetcherFromNetwork
 Fetch missing keys from the network. More...
 
class  CertificateFetcherOffline
 Certificate fetcher realization that does not fetch keys (always offline) More...
 
class  CertificateRequest
 Request for a certificate, associated with the number of attempts. More...
 
class  CertificateStorage
 Storage for trusted anchors, verified certificate cache, and unverified certificate cache. More...
 
class  DataValidationState
 Validation state for a data packet. More...
 
class  DynamicTrustAnchorGroup
 Dynamic trust anchor group. More...
 
class  InterestSigner
 Helper class to create signed Interests. More...
 
class  InterestValidationState
 Validation state for an interest packet. More...
 
class  KeyChain
 The interface of signing key management. More...
 
class  SafeBag
 A secured container for sensitive information (certificate, private key) More...
 
class  SigningInfo
 Signing parameters passed to KeyChain. More...
 
class  StaticTrustAnchorGroup
 Static trust anchor group. More...
 
class  TrustAnchorContainer
 represents a container for trust anchors. More...
 
class  TrustAnchorGroup
 A group of trust anchors. More...
 
class  ValidationError
 Validation error code and optional detailed error message. More...
 
class  ValidationPolicy
 Abstraction that implements validation policy for Data and Interest packets. More...
 
class  ValidationPolicyAcceptAll
 A validator policy that accepts any signature of data and interest packets. More...
 
class  ValidationPolicyCommandInterest
 Validation policy for stop-and-wait command Interests. More...
 
class  ValidationPolicySignedInterest
 Validation policy for signed Interests. More...
 
class  ValidationPolicySimpleHierarchy
 Validation policy for a simple hierarchical trust model. More...
 
class  ValidationState
 Validation state. More...
 
class  Validator
 Interface for validating data and interest packets. More...
 
class  ValidatorConfig
 Helper for validator that uses SignedInterest + CommandInterest + Config policy and NetworkFetcher. More...
 
class  ValidatorNull
 Validator with "accept-all" policy and offline certificate fetcher. More...
 
class  ValidityPeriod
 Represents a ValidityPeriod TLV element. More...
 

Typedefs

typedef function< void(const Data &data, const ValidationError &error)> DataValidationFailureCallback
 Callback to report a failed Data validation. More...
 
typedef function< void(const Data &data)> DataValidationSuccessCallback
 Callback to report a successful Data validation. More...
 
typedef function< void(const Interest &interest, const ValidationError &error)> InterestValidationFailureCallback
 Callback to report a failed Interest validation. More...
 
typedef function< void(const Interest &interest)> InterestValidationSuccessCallback
 Callback to report a successful Interest validation. More...
 
using SignedInterestFormatTag = SimpleTag< SignedInterestFormat, 1002 >
 

Enumerations

enum class  SignedInterestFormat {
  V03 ,
  V02
}
 

Functions

template size_t AdditionalDescription ::wireEncode<::ndn::encoding::EncoderTag > (::ndn::EncodingBuffer &) const
 
template size_t AdditionalDescription ::wireEncode<::ndn::encoding::EstimatorTag > (::ndn::EncodingEstimator &) const
 
Name constructKeyName (const Name &identity, const name::Component &keyId)
 Construct key name based on the appropriate naming conventions. More...
 
Name extractIdentityFromCertName (const Name &certName)
 Extract identity namespace from the certificate name certName. More...
 
Name extractIdentityFromKeyName (const Name &keyName)
 Extract identity namespace from the key name keyName. More...
 
Name extractIdentityNameFromKeyLocator (const Name &keyLocator)
 Extract identity name from key, version-less certificate, or certificate name. More...
 
Name extractKeyNameFromCertName (const Name &certName)
 Extract key name from the certificate name certName. More...
 
ValidatorgetAcceptAllValidator ()
 
Name getKeyLocatorName (const Data &data, ValidationState &state)
 extract KeyLocator.Name from a Data packet More...
 
Name getKeyLocatorName (const Interest &interest, ValidationState &state)
 extract KeyLocator.Name from signed Interest More...
 
bool isValidKeyName (const Name &keyName)
 Check if keyName follow the naming conventions for the key name. More...
 
std::ostream & operator<< (std::ostream &os, const AdditionalDescription &desc)
 
std::ostream & operator<< (std::ostream &os, const Certificate &cert)
 
std::ostream & operator<< (std::ostream &os, const SignedInterestFormat &format)
 
std::ostream & operator<< (std::ostream &os, const SigningInfo &si)
 
std::ostream & operator<< (std::ostream &os, const ValidationError &error)
 
std::ostream & operator<< (std::ostream &os, const ValidityPeriod &period)
 
std::ostream & operator<< (std::ostream &os, ValidationError::Code code)
 
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 Certificate &cert)
 
SigningInfo signingByCertificate (const Name &certName)
 
SigningInfo signingByIdentity (const Identity &identity)
 
SigningInfo signingByIdentity (const Name &identityName)
 
SigningInfo signingByKey (const Key &key)
 
SigningInfo signingByKey (const Name &keyName)
 
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 verifySignature (const Data &data, const optional< Certificate > &cert)
 Verify data using cert. More...
 
bool verifySignature (const Data &data, const pib::Key &key)
 Verify data using key. More...
 
bool verifySignature (const Data &data, const tpm::Tpm &tpm, const Name &keyName, DigestAlgorithm digestAlgorithm)
 Verify data using tpm and keyName with the digestAlgorithm. More...
 
bool verifySignature (const Data &data, const transform::PublicKey &key)
 Verify data using key. More...
 
bool verifySignature (const Data &data, span< const uint8_t > key)
 Verify data using key. More...
 
bool verifySignature (const InputBuffers &blobs, const uint8_t *sig, size_t sigLen, const transform::PublicKey &key)
 Verify blobs using key against sig. More...
 
bool verifySignature (const InputBuffers &blobs, span< const uint8_t > sig, const transform::PublicKey &key)
 Verify blobs using key against sig. More...
 
bool verifySignature (const InputBuffers &blobs, span< const uint8_t > sig, span< const uint8_t > key)
 Verify blobs using key against sig. More...
 
bool verifySignature (const Interest &interest, const optional< Certificate > &cert)
 Verify interest using cert. More...
 
bool verifySignature (const Interest &interest, const pib::Key &key)
 Verify interest using key. More...
 
bool verifySignature (const Interest &interest, const tpm::Tpm &tpm, const Name &keyName, DigestAlgorithm digestAlgorithm)
 Verify interest using tpm and keyName with the digestAlgorithm. More...
 
bool verifySignature (const Interest &interest, const transform::PublicKey &key)
 Verify interest using key. More...
 
bool verifySignature (const Interest &interest, span< const uint8_t > key)
 Verify interest using key. More...
 

Enumeration Type Documentation

◆ SignedInterestFormat

Note
This is a transitional API to handle the change in signed Interest format and will disappear after a few releases.
Enumerator
V03 

Sign Interest using Packet Specification v0.3 semantics.

V02 

Sign Interest using Packet Specification v0.2 semantics.

Definition at line 39 of file signing-info.hpp.

Function Documentation

◆ operator<<() [1/7]

std::ostream & ndn::security::operator<< ( std::ostream &  os,
const SignedInterestFormat format 
)

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

◆ operator<<() [2/7]

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

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

◆ operator<<() [3/7]

std::ostream & ndn::security::operator<< ( std::ostream &  os,
const ValidityPeriod period 
)

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

◆ SafeBag ::wireEncode<::ndn::encoding::EncoderTag >()

template size_t ndn::security::SafeBag ::wireEncode<::ndn::encoding::EncoderTag > ( ::ndn::EncodingBuffer &  ) const

◆ SafeBag ::wireEncode<::ndn::encoding::EstimatorTag >()

template size_t ndn::security::SafeBag ::wireEncode<::ndn::encoding::EstimatorTag > ( ::ndn::EncodingEstimator &  ) const

◆ signingByCertificate() [1/2]

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

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

◆ signingByCertificate() [2/2]

SigningInfo ndn::security::signingByCertificate ( const Name certName)
Returns
a SigningInfo for signing with a certificate

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

◆ signingByIdentity() [1/2]

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

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

◆ signingByIdentity() [2/2]

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

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

◆ signingByKey() [1/2]

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

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

◆ signingByKey() [2/2]

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

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

◆ signingWithSha256()

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

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

◆ ValidityPeriod ::wireEncode<::ndn::encoding::EncoderTag >()

template size_t ndn::security::ValidityPeriod ::wireEncode<::ndn::encoding::EncoderTag > ( ::ndn::EncodingBuffer &  ) const

◆ ValidityPeriod ::wireEncode<::ndn::encoding::EstimatorTag >()

template size_t ndn::security::ValidityPeriod ::wireEncode<::ndn::encoding::EstimatorTag > ( ::ndn::EncodingEstimator &  ) const

◆ verifySignature() [1/13]

bool ndn::security::verifySignature ( const Data data,
const optional< Certificate > &  cert 
)

Verify data using cert.

If cert is nullopt, data assumed to be self-verifiable (with digest or attributes)

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

◆ verifySignature() [2/13]

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

Verify data using key.

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

◆ verifySignature() [3/13]

bool ndn::security::verifySignature ( const Data data,
const tpm::Tpm tpm,
const Name keyName,
DigestAlgorithm  digestAlgorithm 
)

Verify data using tpm and keyName with the digestAlgorithm.

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

◆ verifySignature() [4/13]

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

Verify data using key.

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

◆ verifySignature() [5/13]

bool ndn::security::verifySignature ( const Data data,
span< const uint8_t >  key 
)

Verify data using key.

Note
key must be a public key in PKCS #8 format.

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

◆ verifySignature() [6/13]

bool ndn::security::verifySignature ( const InputBuffers &  blobs,
const uint8_t *  sig,
size_t  sigLen,
const transform::PublicKey key 
)
inline

Verify blobs using key against sig.

Deprecated:

Definition at line 63 of file verification-helpers.hpp.

◆ verifySignature() [7/13]

bool ndn::security::verifySignature ( const InputBuffers &  blobs,
span< const uint8_t >  sig,
const transform::PublicKey key 
)

Verify blobs using key against sig.

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

◆ verifySignature() [8/13]

bool ndn::security::verifySignature ( const InputBuffers &  blobs,
span< const uint8_t >  sig,
span< const uint8_t >  key 
)

Verify blobs using key against sig.

Note
key must be a public key in PKCS #8 format.

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

◆ verifySignature() [9/13]

bool ndn::security::verifySignature ( const Interest interest,
const optional< Certificate > &  cert 
)

Verify interest using cert.

Note
This method verifies only signature of the signed interest.

If cert is nullptr, interest assumed to be self-verifiable (with digest or attributes)

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

◆ verifySignature() [10/13]

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.

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

◆ verifySignature() [11/13]

bool ndn::security::verifySignature ( const Interest interest,
const tpm::Tpm tpm,
const Name keyName,
DigestAlgorithm  digestAlgorithm 
)

Verify interest using tpm and keyName with the digestAlgorithm.

Note
This method verifies only signature of the signed interest.

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

◆ verifySignature() [12/13]

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

Verify interest using key.

Note
This method verifies only signature of the signed interest.

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

◆ verifySignature() [13/13]

bool ndn::security::verifySignature ( const Interest interest,
span< const uint8_t >  key 
)

Verify interest using key.

Note
key must be a public key in PKCS #8 format.
This method verifies only signature of the signed interest.

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