Düzenle

Aracılığıyla paylaş


Cryptography Primitive Property Identifiers

The following values are used with the BCryptGetProperty and BCryptSetProperty functions to identify a property.

BCRYPT_ALGORITHM_NAME

L"AlgorithmName"

A null-terminated Unicode string that contains the name of the algorithm.

BCRYPT_AUTH_TAG_LENGTH

L"AuthTagLength"

The authentication tag lengths that are supported by the algorithm. This property is a BCRYPT_AUTH_TAG_LENGTHS_STRUCT structure. This property only applies to algorithms.

BCRYPT_BLOCK_LENGTH

L"BlockLength"

The size, in bytes, of a cipher block for the algorithm. This property only applies to block cipher algorithms. This data type is a DWORD.

BCRYPT_BLOCK_SIZE_LIST

L"BlockSizeList"

A list of the block lengths supported by an encryption algorithm. This data type is an array of DWORDs. The number of elements in the array can be determined by dividing the number of bytes retrieved by the size of a single DWORD.

BCRYPT_CHAINING_MODE

L"ChainingMode"

A pointer to a null-terminated Unicode string that represents the chaining mode of the encryption algorithm. This property can be set on an algorithm handle or a key handle to one of the following values.

Identifier Value Description
BCRYPT_CHAIN_MODE_CBC L"ChainingModeCBC"
Sets the algorithm's chaining mode to cipher block chaining.
BCRYPT_CHAIN_MODE_CCM L"ChainingModeCCM"
Sets the algorithm's chaining mode to counter with CBC-MAC mode (CCM).Windows Vista: This value is supported beginning with Windows Vista with SP1.

BCRYPT_CHAIN_MODE_CFB L"ChainingModeCFB"
Sets the algorithm's chaining mode to cipher feedback.
BCRYPT_CHAIN_MODE_ECB L"ChainingModeECB"
Sets the algorithm's chaining mode to electronic codebook.
BCRYPT_CHAIN_MODE_GCM L"ChainingModeGCM"
Sets the algorithm's chaining mode to Galois/counter mode (GCM).Windows Vista: This value is supported beginning with Windows Vista with SP1.

BCRYPT_CHAIN_MODE_NA L"ChainingModeN/A"
The algorithm does not support chaining.

BCRYPT_DH_PARAMETERS

L"DHParameters"

Specifies parameters to use with a Diffie-Hellman key. This data type is a pointer to a BCRYPT_DH_PARAMETER_HEADER structure. This property can only be set and must be set for the key before the key is completed.

BCRYPT_DSA_PARAMETERS

L"DSAParameters"

Specifies parameters to use with a DSA key. This property is a BCRYPT_DSA_PARAMETER_HEADER or a BCRYPT_DSA_PARAMETER_HEADER_V2 structure. This property can only be set and must be set for the key before the key is completed.

Windows 8: Beginning with Windows 8, this property can be a BCRYPT_DSA_PARAMETER_HEADER_V2 structure. Use this structure if the key size exceeds 1024 bits and is less than or equal to 3072 bits. If the key size is greater than or equal to 512 but less than or equal to 1024 bits, use the BCRYPT_DSA_PARAMETER_HEADER structure.

BCRYPT_EFFECTIVE_KEY_LENGTH

L"EffectiveKeyLength"

The size, in bits, of the effective length of an RC2 key. This data type is a DWORD.

BCRYPT_HASH_BLOCK_LENGTH

L"HashBlockLength"

The size, in bytes, of the block for a hash. This property only applies to hash algorithms. This data type is a DWORD.

BCRYPT_HASH_LENGTH

L"HashDigestLength"

The size, in bytes, of the hash value of a hash provider. This data type is a DWORD.

BCRYPT_HASH_OID_LIST

L"HashOIDList"

The list of DER-encoded hashing object identifiers (OIDs). This property is a BCRYPT_OID_LIST structure. This property can only be read.

BCRYPT_INITIALIZATION_VECTOR

L"IV"

Contains the initialization vector (IV) for a key. This property only applies to keys.

BCRYPT_KEY_LENGTH

L"KeyLength"

The size, in bits, of the key value of a symmetric key provider. This data type is a DWORD.

BCRYPT_KEY_LENGTHS

L"KeyLengths"

The key lengths that are supported by the algorithm. This property is a BCRYPT_KEY_LENGTHS_STRUCT structure. This property only applies to algorithms.

BCRYPT_KEY_OBJECT_LENGTH

L"KeyObjectLength"

This property is not used. The BCRYPT_OBJECT_LENGTH property is used to obtain this information.

BCRYPT_KEY_STRENGTH

L"KeyStrength"

The number of bits in the key. This data type is a DWORD. This property only applies to keys.

BCRYPT_MESSAGE_BLOCK_LENGTH

L"MessageBlockLength"

This can be set on any key handle that has the CFB chaining mode set. By default, this property is set to 1 for 8-bit CFB. Setting it to the block size in bytes causes full-block CFB to be used. For XTS keys it is used to set the size, in bytes, of the XTS Data Unit (commonly 512 or 4096).

BCRYPT_MULTI_OBJECT_LENGTH

L"MultiObjectLength"

This property returns a BCRYPT_MULTI_OBJECT_LENGTH_STRUCT, which contains information necessary to calculate the size of an object buffer. This property is only supported on operating system versions that support the BCryptCreateMultiHash function.

BCRYPT_OBJECT_LENGTH

L"ObjectLength"

The size, in bytes, of the subobject of a provider. This data type is a DWORD. Currently, the hash and symmetric cipher algorithm providers use caller-allocated buffers to store their subobjects. For example, the hash provider requires you to allocate memory for the hash object obtained with the BCryptCreateHash function. This property provides the buffer size for a provider's object so you can allocate memory for the object created by the provider.

BCRYPT_PADDING_SCHEMES

L"PaddingSchemes"

Represents the padding scheme of the RSA algorithm provider. This data type is a DWORD. This can be one of the following values.

Identifier Value Description
BCRYPT_SUPPORTED_PAD_ROUTER 0x00000001 The provider supports padding added by the router.
BCRYPT_SUPPORTED_PAD_PKCS1_ENC 0x00000002 The provider supports the PKCS1 encryption padding scheme.
BCRYPT_SUPPORTED_PAD_PKCS1_SIG 0x00000004 The provider supports the PKCS1 signature padding scheme.
BCRYPT_SUPPORTED_PAD_OAEP 0x00000008 The provider supports the OAEP padding scheme.
BCRYPT_SUPPORTED_PAD_PSS 0x00000010 The provider supports the PSS padding scheme.

BCRYPT_PROVIDER_HANDLE

L"ProviderHandle"

The handle of the CNG provider that created the object passed in the hObject parameter. This data type is a BCRYPT_ALG_HANDLE. This property can only be retrieved; it cannot be set.

BCRYPT_SIGNATURE_LENGTH

L"SignatureLength"

The size, in bytes, of the length of a signature for a key. This data type is a DWORD. This property only applies to keys. This property can only be retrieved; it cannot be set.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Bcrypt.h