Dataset Viewer
Auto-converted to Parquet Duplicate
prompt
stringlengths
1.67k
6.96k
completion
stringlengths
2
2.65k
The provided C++ code defines a class `KeyChainFixture` within the `ndn::tests` namespace, which is likely used in testing environments for applications that utilize the Named Data Networking (NDN) library. The class provides methods to manage and persist cryptographic certificates using an in-memory keychain. ### Cla...
A fixture providing an in-memory KeyChain. Test cases can use this fixture to create identities. Identities, certificates, and saved certificates are automatically removed during test teardown.
The provided code snippet is written in C++ and is part of a testing framework within the Named Data Networking (NDN) library. The functions defined here are used to create various NDN objects such as `Interest`, `Data`, and `Nack`. Let's break down each function and its purpose: 1. **Function: makeInterest** - Thi...
Create an Interest
The provided code snippet is part of a test fixture in the Named Data Networking (NDN) library's unit tests. The class `ClockFixture` is designed to manage and manipulate clocks during testing to ensure consistent behavior across different parts of the system under test. ### Logical Flow Explanation 1. **Constructor ...
A test fixture that overrides steady clock and system clock.
The provided code snippet is part of a testing framework for a Named Data Networking (NDN) application, specifically focusing on security validation and network operations. The code defines a base class `ValidatorFixtureBase` which sets up mock behaviors for validating interests and managing identities within a simulat...
Undo clock advancement of mockNetworkOperations()
The provided code snippet defines the `Name` class in the Named Data Networking (NDN) C++ library, which represents a hierarchical naming scheme used in NDN systems. The class provides methods for constructing, manipulating, and comparing names, as well as converting them to and from URIs. ### Logical Flow Explanation...
Represents an arbitrary sequence of name components.
The provided code snippet is part of a C++ implementation of the `Link` class in the Named Data Networking (NDN) library. This class represents a data structure used in NDN applications to manage link information, specifically focusing on delegations within a network. ### Class Overview The `Link` class inherits from ...
Represents a `%LinkObject` TLV element.
The provided code defines the `Interest` class in the Named Data Networking (NDN) library, which represents an NDN Interest packet. The `Interest` class includes methods for creating, encoding, decoding, and manipulating NDN Interests. ### Class Overview - **Fields**: The class contains fields such as `name`, `CanBeP...
Default value of `InterestLifetime`.
The provided code snippet is part of a C++ library for Named Data Networking (NDN) and specifically deals with the `Component` class, which represents individual name components in an NDN name. The `Component` class provides methods for parsing, manipulating, and comparing name components. ### Overview The `Component...
Format used for the URI representation of a name.
The provided code defines a class `MetadataObject` in the Named Data Networking (NDN) C++ library, which encapsulates operations related to metadata objects. The class includes methods for creating and manipulating metadata objects, as well as verifying their validity. ### Class Overview - **Constructor (`MetadataObj...
Class for RDR-style metadata encoding/decoding. Realtime %Data Retrieval (RDR) is a protocol for discovering the latest version number of a given data collection. The Interest and Data packets dealing with metadata (called "discovery interest" and "metadata object", respectively) follow a specific format. There...
This C++ class `SignatureInfo` represents the signature information used in Named Data Networking (NDN) packets. The class provides methods for encoding and decoding these signature details into and from a binary format, which is crucial for secure data transmission over NDN. ### Class Structure The class has several...
Represents a `%SignatureInfo` or `%InterestSignatureInfo` TLV element.
The provided code snippet defines the `MetaInfo` class in the Named Data Networking (NDN) library using C++. The `MetaInfo` class is used to represent metadata associated with data packets in the NDN protocol. This metadata includes information such as content type, freshness period, and optional application-specific m...
Default value of `FreshnessPeriod`.
The provided code snippet defines a class named `InterestFilter` within the `ndn` namespace, which is part of the Named Data Networking (NDN) C++ library. This class is designed to handle filters for interests in NDN applications, allowing them to specify which data packets they are interested in based on their names. ...
Declares the set of Interests a producer can serve. A filter starts with a name prefix, followed by an optional NDN regular expression.
The provided code snippet defines a class `PrefixAnnouncement` in the Named Data Networking (NDN) C++ library, which represents a specific type of NDN Data packet used for announcing network prefixes. The class encapsulates the functionality to parse and generate such packets, ensuring they conform to the expected stru...
Returns the well-known keyword name component used for prefix announcements (`32=PA`)
The provided code snippet is part of the Named Data Networking (NDN) library written in C++ and specifically deals with the `Data` class which represents a data packet in NDN. This class encapsulates all necessary components of an NDN data packet, including its name, content, metadata, signature information, and signat...
Represents a %Data packet.
This code defines a class `KeyLocator` in the `ndn` namespace that represents a key locator used in Named Data Networking (NDN). A key locator is used to identify a public key or a certificate associated with a data packet. ### Class Definition and Constructors The `KeyLocator` class has three main constructors: 1. ...
Construct an empty KeyLocator.
The provided code snippet is part of the NDN (Named Data Networking) library, specifically focusing on the `Face` class which represents the primary interface for communicating within the NDN system. This class encapsulates all the necessary functionality to interact with the NDN network, including sending and receivin...
Callback invoked when an expressed Interest is satisfied by a Data packet
The provided C++ code snippet is part of a library for the Named Data Networking (NDN) protocol, specifically dealing with certificate fetching in an offline mode. The function `doFetch` is a member of the `CertificateFetcherOffline` class and is responsible for handling certificate requests when the system is operatin...
Certificate fetcher realization that does not fetch keys (always offline)
The `ValidationPolicyConfig` class in the Named Data Networking (NDN) C++ library is designed to manage and apply validation policies for data packets and interests based on a configuration file. The class provides methods to load configurations, validate data and interests, and handle trust anchors. ### Loading Confi...
A validator that can be set up via a configuration file. ValidationPolicyCommandInterest, in order to guard against replay attacks.
The provided C++ code snippet is part of the Named Data Networking (NDN) security library and defines the `SigningInfo` class, which is used to specify how data packets should be signed. This class encapsulates various parameters related to the signing process, such as the type of signer, the name of the signer, and ad...
Signing parameters passed to KeyChain A SigningInfo is invalid if the specified identity/key/certificate does not exist, or the PIB Identity or Key instance is not valid.
The provided code snippet is part of a C++ implementation related to the Named Data Networking (NDN) security system, specifically focusing on validation policies and signature handling. Let's break down the logical flow of the functions mentioned: ### Function: `setInnerPolicy` This function sets an inner validation...
Abstraction that implements a validation policy for Interest and Data packets.
The `CertificateFetcherDirectFetch` class is designed to fetch certificates directly using the NDN (Named Data Networking) protocol. This class extends `CertificateFetcherFromNetwork`, which suggests it has additional functionality or overrides certain methods. ### Constructor (`CertificateFetcherDirectFetch::Certific...
Extends CertificateFetcherFromNetwork to fetch certificates from the incoming face of the packet During Interest and Data validation, if IncomingFaceId tag is present on the original Interest, this fetcher will send a "direct Interest" to fetch certificates from the face where the original packet was received,...
This code provides a comprehensive set of functions to verify digital signatures in Named Data Networking (NDN) packets such as Data and Interest messages. The verification process involves checking the signature against the public key and ensuring the integrity and authenticity of the packet. ### Overview of Key Comp...
This C++ code defines three classes related to managing trust anchors in the Named Data Networking (NDN) system, specifically within the context of security mechanisms provided by the `ndn-cxx` library. The classes involved are: 1. **TrustAnchorGroup**: This is an abstract class designed to represent a collection of t...
A group of trust anchors
The `CertificateStorage` class in NDN-CXX is designed to manage certificates used for security purposes in the Named Data Networking protocol. The class maintains three caches: one for trusted anchors (`m_trustAnchors`), one for verified certificates (`m_verifiedCertCache`), and another for unverified certificates (`m_...
Storage for trusted anchors, verified certificate cache, and unverified certificate cache.
The provided code is part of the Named Data Networking (NDN) security module in C++, specifically focusing on how certificates are fetched from the network. The class `CertificateFetcherFromNetwork` is designed to handle the fetching of certificates asynchronously using the NDN Face API. ### Logical Flow Explanation: ...
Fetch missing keys from the network
The provided code defines a class `ValidityPeriod` within the `ndn::security` namespace of the NDN-CXX library. This class represents the validity period of a security-related object, such as a digital certificate or key, which specifies when the object is considered valid. ### Class Definition and Initialization 1. ...
Represents a %ValidityPeriod TLV element.
The provided code snippet defines a class `ValidatorNull` within the `ndn::security` namespace in C++. This class is designed to be used in a network application that involves secure data transmission, specifically in the context of the Named Data Networking (NDN) protocol. ### Class Definition 1. **Header Inclusions...
Validator with "accept-all" policy and offline certificate fetcher
The `AdditionalDescription` class in the Named Data Networking (NDN) C++ library provides functionality to manage additional information associated with data packets. This class allows setting, getting, and iterating over key-value pairs, as well as serializing and deserializing these pairs into and from a binary forma...
Represents an %AdditionalDescription TLV element.
The provided code defines a class `SafeBag` within the `ndn::security` namespace, which is used to represent a secure bag in Named Data Networking (NDN). A safe bag is a container for storing cryptographic materials, such as certificates and keys, in a structured format. ### Class Overview 1. **Constructors**: - T...
A secured container for sensitive information (certificate, private key)
This code snippet defines a class `ValidationPolicyCommandInterest` within the `ndn::security` namespace, which appears to be part of a security module in a Named Data Networking (NDN) application written in C++. The class implements a validation policy specifically designed for handling Command Interests in NDN. ### ...
Validation policy for stop-and-wait command Interests. This policy checks the timestamp field of a stop-and-wait command Interest. Signed Interest validation and Data validation requests are delegated to an inner policy.
The provided C++ code defines a class `Validator` within the `ndn::security` namespace, which is responsible for validating data packets, interests, and certificates in Named Data Networking (NDN). The validator uses a validation policy and a certificate fetcher to ensure the integrity and authenticity of incoming netw...
Interface for validating data and interest packets. Every time a validation process initiated, it creates a ValidationState that exist until validation finishes with either success or failure. This state serves several purposes: - record Interest or Data packet being validated - record failure callback - recor...
The provided C++ code defines a series of functions within the `ndn::security` namespace that facilitate the creation and manipulation of `SigningInfo` objects in the context of Named Data Networking (NDN). The `SigningInfo` class is used to specify how data packets should be signed when they are being produced or modi...
Return a SigningInfo for signing with an identity.
The provided code defines a class `CertificateBundleFetcher` which is part of the security module in the NDN-CXX library. This class is designed to fetch and validate certificate bundles in a secure manner. The primary purpose is to handle the process of fetching multiple segments of a certificate bundle as a single op...
Fetch certificate bundle from the network. Currently bundle fetching is attempted only for Data validation. This may change in the future. Bundle fetching always goes to the infrastructure regardless of the inner fetcher. Inner fetcher is used when the bundle interest times out or returns a Nack or when addition...
The provided code defines a class `TrustAnchorContainer` within the `ndn::security` namespace in C++. This class manages trust anchors used for verifying digital signatures in the Named Data Networking (NDN) protocol. The class includes methods to manage both individual certificates and groups of certificates. ### Cla...
A container for trust anchors. There are two kinds of anchors: - static anchors that are permanent for the lifetime of the container - dynamic anchors that are periodically updated. Trust anchors are organized in groups. Each group has a unique group id. The same anchor certificate (same name without consider...
The provided C++ code defines a class `ValidatorConfig` within the `ndn::security` namespace in the Named Data Networking (NDN) project. This class is designed to configure and manage a security validator for NDN applications. The validator uses policies to determine whether data packets are valid or not. ### Class De...
Helper for validator that uses SignedInterest + CommandInterest + Config policy and NetworkFetcher
The provided C++ code snippet defines two functions related to handling errors in the context of Named Data Networking (NDN), specifically within its security module. The functions are `operator<<` and `print`, both belonging to the `ndn::security` namespace. ### Function: `operator<<` This function is an overload of...
Validation error code and optional detailed error message
The provided code snippet is part of a validation policy in the Named Data Networking (NDN) system, specifically designed to validate signed interests based on certain criteria such as timestamps, sequence numbers, and nonces. The class `ValidationPolicySignedInterest` extends a base validation policy by adding specifi...
Validation policy for signed Interests. This policy checks the timestamp, sequence number, and/or nonce fields of signed Interests.
The provided C++ code defines a class `CertificateCache` within the `ndn::security` namespace, which manages a cache of digital certificates used in Named Data Networking (NDN). The cache helps in efficiently retrieving and managing certificates based on their validity periods and names. ### Class Definition and Initi...
Represents a container for verified certificates. A certificate is removed no later than its NotAfter time, or maxLifetime after it has been added to the cache.
This C++ code snippet defines a class `CertificateFetcher` within the `ndn::security` namespace of the Named Data Networking (NDN) library. The class is responsible for fetching certificates required to validate data packets in an NDN system. Here's a detailed breakdown of its functionality: ### Class Definition and I...
Interface used by the validator to fetch missing certificates
The provided C++ code snippet is part of a larger system dealing with cryptographic keys in the Named Data Networking (NDN) protocol. Specifically, it defines classes and methods related to key parameters, including their validation and retrieval of default sizes. Let's break down the logical flow: ### Class Definitio...
Base class for key parameters. Its subclasses are used to store parameters for key generation.
The provided C++ code defines several overloaded output stream operators (`<<`) for various types related to security and cryptography in the Named Data Networking (NDN) context. These operators allow for easy printing of these types to standard output streams, enhancing readability and debugging capabilities. ### Log...
The type of KeyId component in a key name.
This C++ code defines a class `KeyChain` within the `ndn::security` namespace, which provides functionality for managing cryptographic keys, certificates, and signatures in Named Data Networking (NDN) applications. The `KeyChain` class encapsulates operations related to Public Information Base (PIB) and Trusted Platfor...
Contains the ndn-cxx security framework.
The provided code snippet is part of the NDN-CXX library, which is used for building applications in the Named Data Networking (NDN) protocol. The specific functions `checkPolicy` handle validation policies for both `Data` and `Interest` packets in an NDN system. ### Function: checkPolicy(Data) 1. **Extract Key Locat...
Validation policy for a simple hierarchical trust model
The provided code is a C++ implementation of the `Certificate` class in the Named Data Networking (NDN) security library. The class represents a digital certificate used to verify the identity of a principal (such as a user or device) in the NDN network. ### Class Structure The `Certificate` class inherits from `Data...
Represents an NDN certificate. Example of an NDN certificate name: /edu/ucla/cs/yingdi/KEY/%03%CD...%F1/%9F%D3...%B7/v=1617592200702 Identity Name KeyId IssuerId Version Key Name - `KeyId` is an opaque name component to identify an instance of the public key fo...
This C++ code defines several classes related to validating data and interests in Named Data Networking (NDN), focusing on the security aspects. The primary components include `ValidationState`, `DataValidationState`, and `InterestValidationState`. These classes are used within the NDN-CXX library to manage the validat...
Validation state One instance of the validation state is kept for the validation of the whole certificate chain. The state collects the certificate chain that adheres to the selected validation policy to validate data or interest packets. Certificate, data, and interest packet signatures are verified only aft...
The provided C++ code defines a class `InterestSigner` within the `ndn::security` namespace in the NDN-CXX library. This class is responsible for creating and signing Interests in the Named Data Networking (NDN) protocol. The main functionalities include making signed Interests and command Interests. ### Class Overvie...
Helper class to create signed Interests. The signer generates signature elements for an Interest and signs it with the KeyChain.
The provided C++ code snippet appears to be part of a library for handling transformations and processing in Named Data Networking (NDN), likely within a security context. The classes and methods defined here facilitate a pipeline-like structure where data can be transformed or processed through multiple stages before ...
Base class of transformation error
The `BufferSource` class in the NDN-CXX library is designed to handle input data by providing it as a source for further processing, typically in a pipeline-like architecture where data flows through multiple stages. The class is part of the security transformation module and is used to manage and pass data between dif...
A source taking one or more memory buffers as input
The provided code defines a class `PrivateKey` in the `ndn::security::transform` namespace, which encapsulates functionality related to managing and manipulating private keys in the Named Data Networking (NDN) security framework. The class uses OpenSSL for cryptographic operations and provides methods to load, save, an...
Abstraction of a private key in crypto transformations.
The provided code snippet is part of a C++ class named `StepSource` within the `ndn::security::transform` namespace, which appears to be related to data transformation or processing in a Named Data Networking (NDN) context. The class seems to implement some functionality around reading and writing data through a pipeli...
A source that can accept input step by step, and can close input explicitly. This source will not send data into the transformation chain when the chain is constructed. Input will be explicitly sent into the chain using write(...) and will be closed explicitly using end(). StepSource ss; ss >> transform1()...
The provided code is part of the Named Data Networking (NDN) security library, specifically focusing on the transformation of hexadecimal strings into binary data. The `HexDecode` class and its associated functions handle the conversion process efficiently by managing odd-length inputs and ensuring correct error handli...
The module to perform hexadecimal decoding transformation. For example, if the input is a string "012345", the output will be a byte stream: 0x01, 0x23, 0x45. If the total length of input is not even (2n + 1), the module will throw Error.
This code snippet defines a class `HexEncode` within the `ndn::security::transform` namespace in C++. The class is designed to convert binary data into its hexadecimal string representation. Here's a step-by-step breakdown of how it works: 1. **Static Constants**: Two static arrays `H2CL` and `H2CU` are defined to map...
The module to perform hexadecimal encoding transformation. For example, if the input is a byte stream 0x01, 0x23, 0x45, the output will be a string "012345".
This C++ code snippet defines a class `SignerFilter` within the `ndn::security::transform` namespace, which is part of the Named Data Networking (NDN) security library. The `SignerFilter` class is designed to handle the signing process of data using a private key and a specified digest algorithm. ### Class Definition ...
The module to sign data.
The provided C++ code defines a class `StreamSink` within the `ndn::security::transform` namespace, which is part of the Named Data Networking (NDN) security library. The `StreamSink` class implements a `Sink` interface for writing data to an output stream. ### Class Overview 1. **Class Definition**: - `class Stre...
A sink which directs output to an std::ostream.
The provided code implements a class `Base64Encode` in the context of Named Data Networking (NDN) security's transformation utilities, specifically focusing on Base64 encoding. This implementation utilizes OpenSSL's BIO library to handle the Base64 encoding process efficiently. ### Class Overview The `Base64Encode` c...
The module to perform Base64 encoding transformation.
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
6