Export (0) Print
Expand All

AlgorithmOperationFlags enumeration

The AlgorithmOperationFlags enumeration type specifies the operations that an algorithm can perform. This enumeration is used in the following interfaces to retrieve the operational capabilities of a cryptographic provider or status information based on those capabilities.

The binary format of the flags are as follows.

XCN_NCRYPT_NO_OPERATION                     = 00000000 00000000 00000000
XCN_NCRYPT_CIPHER_OPERATION                 = 00000000 00000000 00000001
XCN_NCRYPT_HASH_OPERATION                   = 00000000 00000000 00000010

XCN_NCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION  = 00000000 00000000 00000100
XCN_NCRYPT_SECRET_AGREEMENT_OPERATION       = 00000000 00000000 00001000
XCN_NCRYPT_SIGNATURE_OPERATION              = 00000000 00000000 00010000
XCN_NCRYPT_ANY_ASYMMETRIC_OPERATION         = 00000000 00000000 00011100

XCN_NCRYPT_RNG_OPERATION                    = 00000000 00000000 00100000

XCN_NCRYPT_PREFER_SIGNATURE_ONLY_OPERATION  = 00100000 00000000 00000000
XCN_NCRYPT_PREFER_NON_SIGNATURE_OPERATION   = 01000000 00000000 00000000
XCN_NCRYPT_EXACT_MATCH_OPERATION            = 10000000 00000000 00000000
XCN_NCRYPT_PREFERENCE_MASK_OPERATION        = 11100000 00000000 00000000

Syntax


typedef enum  { 
  XCN_NCRYPT_NO_OPERATION                     = 0,
  XCN_NCRYPT_CIPHER_OPERATION                 = 0x1,
  XCN_NCRYPT_HASH_OPERATION                   = 0x2,
  XCN_NCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION  = 0x4,
  XCN_NCRYPT_SECRET_AGREEMENT_OPERATION       = 0x8,
  XCN_NCRYPT_SIGNATURE_OPERATION              = 0x10,
  XCN_NCRYPT_RNG_OPERATION                    = 0x20,
  XCN_NCRYPT_ANY_ASYMMETRIC_OPERATION         = ( ( 0x4 | 0x8 )  | 0x10 ),
  XCN_NCRYPT_PREFER_SIGNATURE_ONLY_OPERATION  = 0x00200000,
  XCN_NCRYPT_PREFER_NON_SIGNATURE_OPERATION   = 0x00400000,
  XCN_NCRYPT_EXACT_MATCH_OPERATION            = 0x00800000,
  XCN_NCRYPT_PREFERENCE_MASK_OPERATION        = 0x00e00000
} AlgorithmOperationFlags;

Constants

XCN_NCRYPT_NO_OPERATION

No operation is specified.

XCN_NCRYPT_CIPHER_OPERATION

The algorithm can be used for symmetric encryption. This includes the RC2, RC4, Data Encryption Standard (DES), 3DED, and AES algorithms.

XCN_NCRYPT_HASH_OPERATION

The algorithm can be used for hashing. This includes the MD2, MD4, SHA1, SHA256, SHA384, SHA512 MAC, and Hash-Based Message Authentication Code (HMAC) hashing algorithms.

XCN_NCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION

The algorithm can be used for public key encryption. This includes RSA.

XCN_NCRYPT_SECRET_AGREEMENT_OPERATION

The algorithm can used for key exchange. This includes the Diffie-Hellman algorithm and ECDH algorithm.

XCN_NCRYPT_SIGNATURE_OPERATION

The algorithm can be used for signing. This includes the RSA algorithm, Digital Signature Algorithm (DSA), and ECDSA algorithm.

XCN_NCRYPT_RNG_OPERATION

The algorithm can be used to generate a random number.

XCN_NCRYPT_ANY_ASYMMETRIC_OPERATION

The algorithm can be used for public key encryption, key exchange, and signing. This is a bitwise-OR combination of the following constants:

  • XCN_NCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION
  • XCN_NCRYPT_SECRET_AGREEMENT_OPERATION
  • XCN_NCRYPT_SIGNATURE_OPERATION
XCN_NCRYPT_PREFER_SIGNATURE_ONLY_OPERATION

Signature algorithms are preferred but not required. An encryption algorithm may be chosen instead. This is used when searching for cryptographic service provider (CSP) status information based on supported operational capability.

XCN_NCRYPT_PREFER_NON_SIGNATURE_OPERATION

An encryption algorithm (such as that identified by the XCN_NCRYPT_ANY_ASYMMETRIC_OPERATION or XCN_NCRYPT_SECRET_AGREEMENT_OPERATION flags) is preferred but not required. A signature algorithm may be chosen instead. This is used when searching for CSP status information based on supported operational capability.

XCN_NCRYPT_EXACT_MATCH_OPERATION

Only an algorithm that exactly matches the specified operations is selected.

XCN_NCRYPT_PREFERENCE_MASK_OPERATION

Use to mask the algorithm operation preference.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

CertEnroll.h

See also

CertEnroll Enumerations
CertEnroll Interfaces
AlgorithmType

 

 

Community Additions

ADD
Show:
© 2014 Microsoft