Digital Authentication Framework  6.0.1.37
Classes | Typedefs | Enumerations | Variables
DigitalAuthenticationFramework.h File Reference

Main C++ interface to authentication device. More...

#include <string>
#include <cstring>
#include <vector>
#include <stdint.h>

Go to the source code of this file.

Classes

class  DADriver
 Top-level functions provided by the device driver. More...
 
class  DAError
 Interface for error reporting. More...
 
class  DADevice
 Interface to device object. More...
 
class  DASession
 Interface to "session" object. More...
 
class  DAKey
 Interface to Key objects. More...
 
class  DAMessage
 Encapsulates a message and various (optional) crypto parameters. More...
 
class  DAMetaData
 General metadata interface. More...
 
class  DAUtils
 Utility functions. More...
 

Typedefs

typedef std::vector< uint8_t > DAData
 A data block represented as a sequence of bytes. More...
 
typedef std::vector< uint8_t > DAMechanism
 Identifier of a cryptographic mechanism. More...
 

Enumerations

enum  DADigestType {
  DA_DIGEST_NONE = 0, DA_DIGEST_SHA1 = 1, DA_DIGEST_SHA224 = 2, DA_DIGEST_SHA256 = 3,
  DA_DIGEST_SHA384 = 4, DA_DIGEST_SHA512 = 5, DA_DIGEST_SSL3_MD5_SHA1 = 6
}
 Identification of hash algorithm used for signature. More...
 
enum  DAAttrib {
  DA_NAME = 0, DA_SERIAL = 2, DA_HARDWARE = 1000, DA_PROTECTED_PATH = 1002,
  DA_AUTHENTIC_PATH = 1003, DA_PASSWORD_AUTH = 1004, DA_SMIME_SIGN = 1100, DA_SMIME_DECRYPT = 1101,
  DA_USER_AUTHENTICATE = 1102, DA_TLS_CLIENT_AUTH = 1103, DA_READ_WRITE = 1104, DA_STORAGE = 1105,
  DA_SYMM_CRYPT = 1106, DA_SYMM_SIGN = 1107, DA_CERTIFICATE = 2100, DA_SIGNATURE_SIZE = 3000,
  DA_MAX_DECRYPT_SIZE = 3001
}
 Attribute selector. More...
 

Variables

const char * DAF_SDK_VERSION_string
 Identifies the version of the DAF SDK.
 

Detailed Description

Main C++ interface to authentication device.

Typedef Documentation

typedef std::vector<uint8_t> DAData

A data block represented as a sequence of bytes.

Used in a number of places to hold cryptographic plaintexts and ciphertexts, and as various kinds of authentication data. DAUtils provides a few convenience functions for creating these.

typedef std::vector<uint8_t> DAMechanism

Identifier of a cryptographic mechanism.

Mechanisms are specified using the DER encoding of their OID; this takes the form of a sequence of bytes. Class CommonMech provides convenience functions for constructing commonly-used mechanism identifiers.

Enumeration Type Documentation

enum DAAttrib

Attribute selector.

A DADevice object, and each DAKey object, has a number of attributes to describe it. These are accessed via the DAMetaData interface provided by the object. Attributes can be of string, flag (boolean), data (byte block) or size (integer) types.

Enumerator
DA_NAME 

(string) User-visible name of device or key

DA_SERIAL 

(string) Unique serial number of device or key

DA_HARDWARE 

(flag) True if implemented in hardware

DA_PROTECTED_PATH 

(flag) True if path to device has eavesdropping protection

DA_AUTHENTIC_PATH 

(flag) True if path to device is authenticated

DA_PASSWORD_AUTH 

(flag) True if authentication token is regular password

DA_SMIME_SIGN 

(flag) True if key can be used for S/MIME signing

DA_SMIME_DECRYPT 

(flag) True if key can be used for S/MIME decryption

DA_USER_AUTHENTICATE 

(flag) True if key can be used for user authentication

DA_TLS_CLIENT_AUTH 

(flag) True if key can be used for SSL/TLS client auth

DA_READ_WRITE 

(flag) True if SetData() and/or GenerateMaterial() work

DA_STORAGE 

(flag) True if GetData() and SetData() work

DA_SYMM_CRYPT 

(flag) True if both encrypt() and decrypt() work

DA_SYMM_SIGN 

(flag) True if both sign() and verify() work

DA_CERTIFICATE 

(data) X.509 certificate for key

DA_SIGNATURE_SIZE 

(size) Size of signature in bytes

DA_MAX_DECRYPT_SIZE 

(size) Max size of a decrypted plaintext (in bytes)

Identification of hash algorithm used for signature.

For signatures using public-key algorithms, the caller may deliver the hash of a message instead of the message itself. The hash algorithm used is identified using a DADigestType enum.

Enumerator
DA_DIGEST_NONE 

Message has not been hashed.

DA_DIGEST_SHA1 

SHA-1 hash (20 bytes)

DA_DIGEST_SHA224 

SHA-224 hash (28 bytes)

DA_DIGEST_SHA256 

SHA-256 hash (32 bytes)

DA_DIGEST_SHA384 

SHA-384 hash (48 bytes)

DA_DIGEST_SHA512 

SHA-512 hash (64 bytes)

DA_DIGEST_SSL3_MD5_SHA1 

36-byte MD5+SHA1 dual hash, used by SSL3 and TLS 1.0-1.1