NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security Namespace Reference

Namespaces

 conf
 
 detail
 
 transform
 
 v1
 
 v2
 

Classes

class  CertificateCache
 Interface for the cache of validated certificates. More...
 
class  CertificateCacheTtl
 Cache of validated certificates with freshness-based eviction policy. More...
 
class  CertificateContainer
 A handler to search or enumerate certificates of a key. More...
 
class  CFReleaser
 Helper class to wrap CoreFoundation object pointers. More...
 
class  CommandInterestValidator
 a validator for stop-and-wait command Interests More...
 
class  DummyPublicInfo
 
class  DummyTpm
 
struct  Factory
 
class  Identity
 represents an identity More...
 
class  IdentityContainer
 A handler to search or enumerate identities in PIB. More...
 
class  Key
 represents a key More...
 
class  KeyChain
 The packet signing interface. More...
 
class  KeyContainer
 A handler to search or enumerate keys of an identity. More...
 
class  Pib
 represents the PIB More...
 
class  PibImpl
 Abstract class of PIB implementation. More...
 
class  PibMemory
 An in-memory implementation of Pib. More...
 
class  PibSqlite3
 Pib backend implementation based on SQLite3 database. More...
 
class  SafeBag
 a secured container for sensitive information(certificate, private key) More...
 
class  SecPublicInfo
 SecPublicInfo is a base class for the storage of public information. More...
 
class  SecPublicInfoSqlite3
 
class  SecTpm
 SecTpm is the base class of the TPM classes. More...
 
class  SecTpmFile
 
class  SecTpmOsx
 
class  SecuredBag
 
class  SigningInfo
 Signing parameters passed to KeyChain. More...
 
class  ValidationRequest
 ValidationRequest contains information related to further validation. More...
 
class  Validator
 provides the interfaces for packet validation. More...
 
class  ValidatorConfig
 The validator which can be set up via a configuration file. More...
 
class  ValidatorNull
 
class  ValidatorRegex
 
class  ValidityPeriod
 Abstraction of validity period. More...
 

Typedefs

typedef Factory< KeyChain::PibCreateFuncPibFactory
 
typedef Factory< KeyChain::TpmCreateFuncTpmFactory
 
typedef function< void(const shared_ptr< const Interest > &)> OnInterestValidated
 Callback to report a successful Interest validation. More...
 
typedef function< void(const shared_ptr< const Interest > &, const std::string &)> OnInterestValidationFailed
 Callback to report a failed Interest validation. More...
 
typedef function< void(const shared_ptr< const Data > &)> OnDataValidated
 Callback to report a successful Data validation. More...
 
typedef function< void(const shared_ptr< const Data > &, const std::string &)> OnDataValidationFailed
 Callback to report a failed Data validation. More...
 

Functions

std::ostream & operator<< (std::ostream &os, CommandInterestValidator::ErrorCode error)
 
static void invokeReject (const OnInterestValidationFailed &reject, const Interest &interest, CommandInterestValidator::ErrorCode error)
 
static std::map< std::string, PibFactory > & getPibFactories ()
 
static std::map< std::string, TpmFactory > & getTpmFactories ()
 
static std::tuple< std::string, std::string > parseUri (const std::string &uri)
 
static std::tuple< std::string, std::string > getCanonicalPibLocator (const std::string &pibLocator)
 
static std::tuple< std::string, std::string > getCanonicalTpmLocator (const std::string &tpmLocator)
 
static Name getKeyName (const Name &identity, const name::Component &keyId)
 
template size_t SafeBag::wireEncode< encoding::EncoderTag > (EncodingImpl< encoding::EncoderTag > &encoder) const
 
template size_t SafeBag::wireEncode< encoding::EstimatorTag > (EncodingImpl< encoding::EstimatorTag > &encoder) const
 
static int sqlite3_bind_string (sqlite3_stmt *statement, int index, const string &value, void(*destructor)(void *))
 A utility function to call the normal sqlite3_bind_text where the value and length are value.c_str() and value.size(). More...
 
static string sqlite3_column_string (sqlite3_stmt *statement, int column)
 
SigningInfo signingByIdentity (const Name &identity)
 
SigningInfo signingByKey (const Name &keyName)
 
SigningInfo signingByCertificate (const Name &certName)
 
SigningInfo signingWithSha256 ()
 
std::ostream & operator<< (std::ostream &os, const SigningInfo &si)
 
template size_t ValidityPeriod::wireEncode< encoding::EncoderTag > (EncodingImpl< encoding::EncoderTag > &encoder) const
 
template size_t ValidityPeriod::wireEncode< encoding::EstimatorTag > (EncodingImpl< encoding::EstimatorTag > &encoder) const
 
std::ostream & operator<< (std::ostream &os, const ValidityPeriod &period)
 

Variables

static const uint8_t DUMMY_CERT []
 
static const uint8_t DUMMY_SIGNATURE []
 
 DummyPublicInfo
 
pib dummy
 
 DummyTpm
 
const std::string DEFAULT_PIB_SCHEME = "pib-sqlite3"
 
const std::string DEFAULT_TPM_SCHEME = "tpm-file"
 
 SecPublicInfoSqlite3
 
pib sqlite3
 
 SecTpmFile
 
tpm file
 
static const string INITIALIZATION
 
 WireEncodable< SafeBag >
 
 WireDecodable< SafeBag >
 
static const string INIT_TPM_INFO_TABLE
 
static const string INIT_ID_TABLE
 
static const string INIT_KEY_TABLE
 
static const string INIT_CERT_TABLE
 
static Oid SECP256R1 ("1.2.840.10045.3.1.7")
 
static Oid SECP384R1 ("1.3.132.0.34")
 
 WireEncodable< ValidityPeriod >
 
 WireEncodableWithEncodingBuffer< ValidityPeriod >
 
 WireDecodable< ValidityPeriod >
 
static const size_t ISO_DATETIME_SIZE = 15
 
static const size_t NOT_BEFORE_OFFSET = 0
 
static const size_t NOT_AFTER_OFFSET = 1
 

Typedef Documentation

◆ PibFactory

◆ TpmFactory

◆ OnInterestValidated

typedef function<void(const shared_ptr<const Interest>&)> ndn::security::OnInterestValidated

Callback to report a successful Interest validation.

Definition at line 33 of file validation-request.hpp.

◆ OnInterestValidationFailed

typedef function<void(const shared_ptr<const Interest>&, const std::string&)> ndn::security::OnInterestValidationFailed

Callback to report a failed Interest validation.

Definition at line 37 of file validation-request.hpp.

◆ OnDataValidated

typedef function<void(const shared_ptr<const Data>&)> ndn::security::OnDataValidated

Callback to report a successful Data validation.

Definition at line 40 of file validation-request.hpp.

◆ OnDataValidationFailed

typedef function<void(const shared_ptr<const Data>&, const std::string&)> ndn::security::OnDataValidationFailed

Callback to report a failed Data validation.

Definition at line 44 of file validation-request.hpp.

Function Documentation

◆ operator<<() [1/3]

◆ invokeReject()

static void ndn::security::invokeReject ( const OnInterestValidationFailed reject,
const Interest interest,
CommandInterestValidator::ErrorCode  error 
)
static

◆ getPibFactories()

static std::map<std::string, PibFactory>& ndn::security::getPibFactories ( )
static

◆ getTpmFactories()

static std::map<std::string, TpmFactory>& ndn::security::getTpmFactories ( )
static

◆ parseUri()

static std::tuple<std::string, std::string> ndn::security::parseUri ( const std::string &  uri)
inlinestatic

Definition at line 168 of file key-chain.cpp.

Referenced by getCanonicalPibLocator(), and getCanonicalTpmLocator().

◆ getCanonicalPibLocator()

static std::tuple<std::string, std::string> ndn::security::getCanonicalPibLocator ( const std::string &  pibLocator)
inlinestatic

◆ getCanonicalTpmLocator()

static std::tuple<std::string, std::string> ndn::security::getCanonicalTpmLocator ( const std::string &  tpmLocator)
inlinestatic

Definition at line 226 of file key-chain.cpp.

References DEFAULT_TPM_SCHEME, getTpmFactories(), and parseUri().

Referenced by ndn::security::KeyChain::createTpm().

◆ getKeyName()

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

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

◆ sqlite3_bind_string()

◆ sqlite3_column_string()

static string ndn::security::sqlite3_column_string ( sqlite3_stmt *  statement,
int  column 
)
static

◆ signingByIdentity()

◆ signingByKey()

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

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

References ndn::security::SigningInfo::SIGNER_TYPE_KEY.

◆ signingByCertificate()

SigningInfo ndn::security::signingByCertificate ( const Name certName)

◆ signingWithSha256()

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

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

References ndn::security::SigningInfo::SIGNER_TYPE_SHA256.

Referenced by ndn::security::KeyChain::signWithSha256().

◆ operator<<() [2/3]

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

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

◆ operator<<() [3/3]

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

Variable Documentation

◆ DUMMY_CERT

const uint8_t ndn::security::DUMMY_CERT[]
static
Initial value:
=
"Bv0C8Ac4CAVkdW1teQgDa2V5CANLRVkIEWtzay0xNDE4NjAwMzkxMDUwCAdJRC1D"
"RVJUCAn9AAABSkssIl4UAxgBAhX9AXMwggFvMCIYDzIwMTQxMjE0MjMzOTUxWhgP"
"MjAzNDEyMDkyMzM5NTFaMCUwIwYDVQQpExwvZHVtbXkva2V5L2tzay0xNDE4NjAw"
"MzkxMDUwMIIBIDANBgkqhkiG9w0BAQEFAAOCAQ0AMIIBCAKCAQEAxUfhv54Jdgeq"
"0wmQ/ru9ew/ByCKcQawaZT9Xm9o/sMahwQ9IbNx2Dz4Jkelaxra7+DI0QP3pYctv"
"Ykn/jwq5y3cO0LJQB+kf/7FtSKG9qBEv8aqq5hDVteBUKiyUXqDmQzbe+mTcJ9Yd"
"D7siF1dhrjnM3KL1xpcXu3QaV5m/I6cKVwYrJxp3JKr6k5pHhxJlPIyUu7oU3kFW"
"7bHq2uq4ec9gBXCKwA64IVYVQm1GVDk+V0wr7pw9qD6QNa7eMzrCME6vfM0deSiU"
"a4TovUJDQFDsM287kYm3tZu7iuJzmOC63tl4YZdyqyOgnqSrUGE1soNHfLokI13H"
"hSwxok7nuQIBERY0GwEBHC8HLQgFZHVtbXkIA2tleQgDS0VZCBFrc2stMTQxODYw"
"MDM5MTA1MAgHSUQtQ0VSVBf9AQBLLJoQt9HE93NI3Mv1JCb3ezBCWMwTDnZA+XQV"
"UgVSvISJfU/lo2sne0SfGp4KsUhj206CDpuh3q0Th5gKSJeysy/bv66V2m2G8aDn"
"OkJ7Ut+2o/QnFpIMJz+oZf2f9Z0Pchocmkv8y4Fj02t8HCuFO1ekEvOcocZvWbKy"
"HX+P0OdefPzSC535/rsNHXTzgPsoV+yb13vrm4wPeqPPBs+scQYneIFKkRkGE5PU"
"pkncAMBN6iWgmSA2RcjcbmT6utCjJTqWviX1XPQtHoF/hBGC0D/TtQDgwVGGibXB"
"zb+klRHvCC/uUIfjU2HrE705kaw8btPhTP5/PMe8YKkk+hjh"

Definition at line 29 of file dummy-keychain.cpp.

◆ DUMMY_SIGNATURE

const uint8_t ndn::security::DUMMY_SIGNATURE[]
static
Initial value:
=
{0x17, 0xfd, 0x01, 0x00, 0x93, 0x15, 0x09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x0b,
0x25, 0x44, 0x07, 0x35, 0x88, 0xab, 0x67, 0x27, 0x56, 0x0e, 0xb5, 0xb5, 0xe8, 0x27, 0xb4, 0x49,
0xdc, 0xb8, 0x48, 0x31, 0xff, 0x99, 0x48, 0xab, 0x11, 0xb4, 0xa0, 0xdf, 0x8a, 0x6d, 0xff, 0x43,
0x69, 0x32, 0xa7, 0xbc, 0x63, 0x9d, 0x0f, 0xe0, 0x95, 0x34, 0x36, 0x25, 0x4b, 0x3e, 0x36, 0xbd,
0x81, 0x91, 0x0b, 0x91, 0x9f, 0x3a, 0x04, 0xa2, 0x44, 0x28, 0x19, 0xa1, 0x38, 0x21, 0x4f, 0x25,
0x59, 0x8a, 0x48, 0xc2}

Definition at line 47 of file dummy-keychain.cpp.

◆ DummyPublicInfo

◆ dummy

tpm ndn::security::dummy

Definition at line 69 of file dummy-keychain.cpp.

◆ DummyTpm

Definition at line 70 of file dummy-keychain.cpp.

◆ DEFAULT_PIB_SCHEME

const std::string ndn::security::DEFAULT_PIB_SCHEME = "pib-sqlite3"

Definition at line 51 of file key-chain.cpp.

Referenced by getCanonicalPibLocator().

◆ DEFAULT_TPM_SCHEME

const std::string ndn::security::DEFAULT_TPM_SCHEME = "tpm-file"

Definition at line 56 of file key-chain.cpp.

Referenced by getCanonicalTpmLocator().

◆ SecPublicInfoSqlite3

◆ sqlite3

pib ndn::security::sqlite3

Definition at line 64 of file key-chain.cpp.

◆ SecTpmFile

Definition at line 70 of file key-chain.cpp.

◆ file

◆ INITIALIZATION

const string ndn::security::INITIALIZATION
static

Definition at line 38 of file pib-sqlite3.cpp.

◆ WireEncodable< SafeBag >

ndn::security::WireEncodable< SafeBag >

Definition at line 30 of file safe-bag.cpp.

◆ WireDecodable< SafeBag >

ndn::security::WireDecodable< SafeBag >

Definition at line 31 of file safe-bag.cpp.

◆ INIT_TPM_INFO_TABLE

const string ndn::security::INIT_TPM_INFO_TABLE
static
Initial value:
=
"CREATE TABLE IF NOT EXISTS "
" TpmInfo( "
" tpm_locator BLOB NOT NULL,"
" PRIMARY KEY (tpm_locator) "
" ); "

Definition at line 46 of file sec-public-info-sqlite3.cpp.

◆ INIT_ID_TABLE

const string ndn::security::INIT_ID_TABLE
static
Initial value:
=
"CREATE TABLE IF NOT EXISTS "
" Identity( "
" identity_name BLOB NOT NULL, "
" default_identity INTEGER DEFAULT 0, "
" PRIMARY KEY (identity_name) "
" ); "
"CREATE INDEX identity_index ON Identity(identity_name);"

Definition at line 53 of file sec-public-info-sqlite3.cpp.

◆ INIT_KEY_TABLE

const string ndn::security::INIT_KEY_TABLE
static
Initial value:
=
"CREATE TABLE IF NOT EXISTS "
" Key( "
" identity_name BLOB NOT NULL, "
" key_identifier BLOB NOT NULL, "
" key_type INTEGER, "
" public_key BLOB, "
" default_key INTEGER DEFAULT 0, "
" active INTEGER DEFAULT 0, "
" PRIMARY KEY (identity_name, key_identifier)"
" ); "
"CREATE INDEX key_index ON Key(identity_name); "

Definition at line 62 of file sec-public-info-sqlite3.cpp.

◆ INIT_CERT_TABLE

const string ndn::security::INIT_CERT_TABLE
static
Initial value:
=
"CREATE TABLE IF NOT EXISTS "
" Certificate( "
" cert_name BLOB NOT NULL, "
" cert_issuer BLOB NOT NULL, "
" identity_name BLOB NOT NULL, "
" key_identifier BLOB NOT NULL, "
" not_before TIMESTAMP, "
" not_after TIMESTAMP, "
" certificate_data BLOB NOT NULL, "
" valid_flag INTEGER DEFAULT 1, "
" default_cert INTEGER DEFAULT 0, "
" PRIMARY KEY (cert_name) "
" ); "
"CREATE INDEX cert_index ON Certificate(cert_name); "
"CREATE INDEX subject ON Certificate(identity_name);"

Definition at line 76 of file sec-public-info-sqlite3.cpp.

◆ SECP256R1

Oid ndn::security::SECP256R1("1.2.840.10045.3.1.7")
static

◆ SECP384R1

Oid ndn::security::SECP384R1("1.3.132.0.34")
static

◆ WireEncodable< ValidityPeriod >

ndn::security::WireEncodable< ValidityPeriod >

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

◆ WireEncodableWithEncodingBuffer< ValidityPeriod >

ndn::security::WireEncodableWithEncodingBuffer< ValidityPeriod >

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

◆ WireDecodable< ValidityPeriod >

ndn::security::WireDecodable< ValidityPeriod >

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

◆ ISO_DATETIME_SIZE

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

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

Referenced by ndn::security::ValidityPeriod::wireDecode().

◆ NOT_BEFORE_OFFSET

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

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

Referenced by ndn::security::ValidityPeriod::wireDecode().

◆ NOT_AFTER_OFFSET

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

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

Referenced by ndn::security::ValidityPeriod::wireDecode().