Virgil Security Crypto library
1.8.2
|
Provides key derivation function algorithms. More...
#include <VirgilKDF.h>
Public Member Functions | |
Constructor / Destructor | |
VirgilKDF () | |
Create object with undefined algorithm. More... | |
virtual | ~VirgilKDF () throw () |
Polymorphic destructor. | |
Info | |
Provide detail information about object. | |
std::string | name () const |
Returns name of the key derivation function. More... | |
Process key derivation | |
virgil::crypto::VirgilByteArray | derive (const virgil::crypto::VirgilByteArray &in, size_t outSize) |
Derive key from the given key material. More... | |
Copy constructor / assignment operator | |
| |
VirgilKDF (const VirgilKDF &other) | |
VirgilKDF & | operator= (const VirgilKDF &rhs) |
VirgilAsn1Compatible implementation | |
Marshalling format:
KeyDerivationFunction ::= AlgorithmIdentifier {{ KDFAlgorithms }}
KDFAlgorithms AlgorithmIdentifier ::= {
{ OID id-kdf-kdf1 PARMS HashFunction } |
{ OID id-kdf-kdf2 PARMS HashFunction } ,
... -- additional algorithms ---
}
HashFunction ::= AlgorithmIdentifier {{ HashAlgorithms }}
HashAlgorithms AlgorithmIdentifier ::= {
-- nist identifiers
{ OID id-sha1 PARMS NULL } |
{ OID id-sha256 PARMS NULL } |
{ OID id-sha384 PARMS NULL } |
{ OID id-sha512 PARMS NULL } ,
... -- additional algorithms ---
}
| |
virtual size_t | asn1Write (virgil::crypto::foundation::asn1::VirgilAsn1Writer &asn1Writer, size_t childWrittenBytes=0) const |
Write object state to the writer. More... | |
virtual void | asn1Read (virgil::crypto::foundation::asn1::VirgilAsn1Reader &asn1Reader) |
Read object state from the reader. More... | |
Public Member Functions inherited from virgil::crypto::foundation::asn1::VirgilAsn1Compatible | |
virgil::crypto::VirgilByteArray | toAsn1 () const |
Save object state to the ASN.1 structure. | |
void | fromAsn1 (const virgil::crypto::VirgilByteArray &asn1) |
Restore object state from the ASN.1 structure. | |
virtual | ~VirgilAsn1Compatible () throw () |
Polymorphic destructor. | |
Static Public Member Functions | |
Creation methods | |
Object creation with specific key derivation function. | |
static VirgilKDF | kdf1 () |
Configures with KDF1 (ISO-18033-2) algorithm. | |
static VirgilKDF | kdf2 () |
Configures with KDF1 (ISO-18033-2) algorithm. | |
Additional Inherited Members | |
Protected Member Functions inherited from virgil::crypto::foundation::asn1::VirgilAsn1Compatible | |
virtual void | checkAsn1ParamNotEmpty (const virgil::crypto::VirgilByteArray ¶m, const char *paramName=0) const |
If given parameter is empty exception will be thrown. More... | |
Provides key derivation function algorithms.
virgil::crypto::foundation::VirgilKDF::VirgilKDF | ( | ) |
Create object with undefined algorithm.
|
virtual |
Read object state from the reader.
asn1Reader | reader payloaded with ASN.1 to be read. |
Implements virgil::crypto::foundation::asn1::VirgilAsn1Compatible.
|
virtual |
Write object state to the writer.
asn1Writer | writer that should be payloaded by subclasses. |
childWrittenBytes | count of bytes that was written by subclasses. |
Implements virgil::crypto::foundation::asn1::VirgilAsn1Compatible.
virgil::crypto::VirgilByteArray virgil::crypto::foundation::VirgilKDF::derive | ( | const virgil::crypto::VirgilByteArray & | in, |
size_t | outSize | ||
) |
Derive key from the given key material.
in | - input sequence (key material). |
outSize | - size of the output sequence. |
std::string virgil::crypto::foundation::VirgilKDF::name | ( | ) | const |
Returns name of the key derivation function.