Overview | ||||||||||||||||
Group | ||||||||||||||||
Quick Info
|
CryptSetKeyParam
[New - Windows NT] [New - Windows 95, OEM Service Release 2] The CryptSetKeyParam function lets applications customize various aspects of a key's operations. Generally, this function is used to set session-specific parameters on symmetric keys. Note that the base keying material is not accessible by this function. The Microsoft RSA Base Provider has no settable parameters on key exchange or signature keys. However, custom providers may define parameters that can be set on these keys. BOOL CRYPTFUNC CryptSetKeyParam( HCRYPTKEY hKey,
|
|
DWORD dwParam,
|
|
BYTE *pbData,
|
|
DWORD dwFlags
|
|
);
|
|
Parameter
| Description
|
KP_SALT
| The salt value. The pbData buffer should contain a BYTE array specifying a new salt value. This value is made part of the session
key. The size of the salt value will vary depending on the CSP being used so,
before setting this parameter, it should be read using CryptGetKeyParam in order to determine its size.
When it is suspected that the base data used for derived keys is less than ideal, salt values are often used to make the session keys more unique. This makes dictionary attacks more difficult. When using the Microsoft RSA Base Provider, this parameter defaults to zero. |
KP_PERMISSIONS
| The key permissions flags. The pbData buffer should contain a DWORD value specifying zero or more permission flags. Refer to the CryptGetKeyParam function for a description of these flags.
When using the Microsoft RSA Base Provider, this parameter defaults to 0xFFFFFFFF. |
Parameter
| Description
|
KP_IV
| The initialization vector. The pbData buffer should contain a BYTE array specifying the initialization vector. This array should contain <block length>/8 elements. For example, if the block length is 64 bits, the initialization
vector will consist of 8 bytes.
When using the Microsoft RSA Base Provider, this parameter defaults to zero. |
KP_PADDING
| The padding mode. The pbData buffer should contain a DWORD value specifying the padding method to be used by the cipher. Following are
the padding modes currently defined:
PKCS5_PADDING PKCS 5 (sec 6.2) padding method. When using the Microsoft RSA Base Provider, this parameter defaults to PKCS5_PADDING. |
KP_MODE
| The cipher mode. The pbData buffer should contain a DWORD value specifying the cipher mode to be used. Refer to the CryptGetKeyParam function for a list
of the defined cipher modes. When using the Microsoft RSA Base Provider, this parameter defaults to CRYPT_MODE_CBC. |
KP_MODE_BITS
| The number of bits to feed back. The pbData buffer contains a DWORD value indicating the number of bits that are processed per cycle when the OFB
or CFB cipher modes are used.
When using the Microsoft RSA Base Provider, this parameter defaults to 8. |
Error
| Description
|
ERROR_INVALID_HANDLE
| One of the parameters specifies an invalid handle.
|
ERROR_BUSY
| The CSP context is currently being used by another process.
|
ERROR_INVALID_PARAMETER
| One of the parameters contains an invalid value. This is most often an illegal
pointer.
|
NTE_BAD_FLAGS
| The dwFlags parameter is nonzero or the pbData buffer contains an invalid value.
|
NTE_BAD_TYPE
| The dwParam parameter specifies an unknown parameter.
|
NTE_BAD_UID
| The CSP context that was specified when the hKey key was created cannot be found.
|
NTE_FAIL
| The function failed in some unexpected way.
|
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers - More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples - Databases for Amazon shops developers
-
Amazon Categories Database
Browse Nodes Database