changeset:   247:beafd4e9e878
user:        Danny Smith <dannysmith@users.sourceforge.net>
date:        Wed Aug 14 23:47:46 2002 +0000
summary:     * include/wincrypt.h (ALG_*): Add defines.

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
+2002-08-15  Danny Smith  <dannysmith@users.sourceforge.net>
+
+	* include/wincrypt.h (ALG_*): Add defines.
+	(CALG_*): Ditto.
+	(CRYPT_*): Ditto.
+	(PP_*): Ditto.
+	(PROV_*): Ditto.
+	(PRIVATEKEYBLOB): Add define.
+
 2002-08-14  Earnie Boyd  <earnie@users.sf.net>
 
 	* include/shlobj.h (SHGetFolderPath): Add define.
 	* lib/shell32.def (SHGetSpecialFolderPath): Add export.
 	(SHGetFolderPath): Ditto.
diff --git a/include/wincrypt.h b/include/wincrypt.h
--- a/include/wincrypt.h
+++ b/include/wincrypt.h
@@ -16,34 +16,54 @@ extern "C" {
 #define ALG_CLASS_SIGNATURE  8192
 #define ALG_CLASS_MSG_ENCRYPT  16384
 #define ALG_CLASS_DATA_ENCRYPT  24576
 #define ALG_CLASS_HASH  32768
 #define ALG_CLASS_KEY_EXCHANGE  40960
+#define ALG_CLASS_ALL 57344 /* (7 << 13) */
 #define ALG_TYPE_ANY 0
 #define ALG_TYPE_DSS 512
 #define ALG_TYPE_RSA 1024
 #define ALG_TYPE_BLOCK 1536
 #define ALG_TYPE_STREAM  2048
+#define ALG_TYPE_DH 2560 /* (5 << 9) */
+#define ALG_TYPE_SECURECHANNEL 3072 /* (6 << 9) */
 #define ALG_SID_ANY 0
 #define ALG_SID_RSA_ANY 0
 #define ALG_SID_RSA_PKCS 1
 #define ALG_SID_RSA_MSATWORK 2
 #define ALG_SID_RSA_ENTRUST 3
 #define ALG_SID_RSA_PGP 4
 #define ALG_SID_DSS_ANY 0
 #define ALG_SID_DSS_PKCS 1
 #define ALG_SID_DSS_DMS 2
 #define ALG_SID_DES 1
+#define ALG_SID_3DES 3
+#define ALG_SID_DESX 4
+#define ALG_SID_IDEA 5
+#define ALG_SID_CAST 6
+#define ALG_SID_SAFERSK64 7
+#define ALG_SID_SAFERSK128 8
+#define ALG_SID_3DES_112 9
+#define ALG_SID_SKIPJACK 10
+#define ALG_SID_TEK 11
+#define ALG_SID_CYLINK_MEK 12
+#define ALG_SID_RC5 13
 #define ALG_SID_RC2 2
 #define ALG_SID_RC4 1
 #define ALG_SID_SEAL 2
 #define ALG_SID_MD2 1
 #define ALG_SID_MD4 2
 #define ALG_SID_MD5 3
 #define ALG_SID_SHA 4
 #define ALG_SID_MAC 5
+#define ALG_SID_RIPEMD 6
+#define ALG_SID_RIPEMD160 7
+#define ALG_SID_SSL3SHAMD5 8
+#define ALG_SID_HMAC 9
+#define ALG_SID_TLS1PRF 10
 #define ALG_SID_EXAMPLE 80
+
 #define CALG_MD2 (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_MD2)
 #define CALG_MD4 (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_MD4)
 #define CALG_MD5 (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_MD5)
 #define CALG_SHA (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_SHA)
 #define CALG_MAC (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_MAC)
@@ -57,21 +77,25 @@ extern "C" {
 #define CALG_DES (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_DES)
 #define CALG_RC2 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_RC2)
 #define CALG_RC4 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_STREAM|ALG_SID_RC4)
 #define CALG_SEAL (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_STREAM|ALG_SID_SEAL)
 #define CALG_DH_EPHEM (ALG_CLASS_KEY_EXCHANGE|ALG_TYPE_STREAM|ALG_TYPE_DSS|ALG_SID_DSS_DMS)
+#define CALG_DESX (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_DESX)
+#define CALG_TLS1PRF (ALG_CLASS_DHASH|ALG_TYPE_ANY|ALG_SID_TLS1PRF)
 
 #define CRYPT_VERIFYCONTEXT 0xF0000000
 #define CRYPT_NEWKEYSET 8
 #define CRYPT_DELETEKEYSET 16
 #define CRYPT_MACHINE_KEYSET 32
+#define CRYPT_SILENT 64
 #define CRYPT_EXPORTABLE 1
 #define CRYPT_USER_PROTECTED 2
 #define CRYPT_CREATE_SALT 4
 #define CRYPT_UPDATE_KEY 8
 #define SIMPLEBLOB 1
 #define PUBLICKEYBLOB 6
+#define PRIVATEKEYBLOB 7
 #define AT_KEYEXCHANGE 1
 #define AT_SIGNATURE 2
 #define CRYPT_USERDATA 1
 #define KP_IV 1
 #define KP_SALT 2
@@ -85,10 +109,15 @@ extern "C" {
 #define CRYPT_MODE_CBC 1
 #define CRYPT_MODE_ECB 2
 #define CRYPT_MODE_OFB 3
 #define CRYPT_MODE_CFB 4
 #define CRYPT_MODE_CTS 5
+#define CRYPT_MODE_CBCI 6
+#define CRYPT_MODE_CFBP 7
+#define CRYPT_MODE_OFBP 8
+#define CRYPT_MODE_CBCOFM 9
+#define CRYPT_MODE_CBCOFMI 10
 #define CRYPT_ENCRYPT 1
 #define CRYPT_DECRYPT 2
 #define CRYPT_EXPORT 4
 #define CRYPT_READ 8
 #define CRYPT_WRITE 16
@@ -104,10 +133,23 @@ extern "C" {
 #define PP_ENUMCONTAINERS 2
 #define PP_IMPTYPE 3
 #define PP_NAME 4
 #define PP_VERSION 5
 #define PP_CONTAINER 6
+#define PP_ENUMMANDROOTS 25
+#define PP_ENUMELECTROOTS 26
+#define PP_KEYSET_TYPE 27
+#define PP_ADMIN_PIN 31
+#define PP_KEYEXCHANGE_PIN 32
+#define PP_SIGNATURE_PIN 33
+#define PP_SIG_KEYSIZE_INC 34
+#define PP_KEYX_KEYSIZE_INC 35
+#define PP_UNIQUE_CONTAINER 36
+#define PP_SGC_INFO 37
+#define PP_USE_HARDWARE_RNG 38
+#define PP_KEYSPEC 39
+#define PP_ENUMEX_SIGNING_PROT 40
 #define CRYPT_FIRST 1
 #define CRYPT_NEXT 2
 #define CRYPT_IMPL_HARDWARE 1
 #define CRYPT_IMPL_SOFTWARE 2
 #define CRYPT_IMPL_MIXED 3
@@ -121,10 +163,20 @@ extern "C" {
 #define PROV_STT_MER 7
 #define PROV_STT_ACQ 8
 #define PROV_STT_BRND 9
 #define PROV_STT_ROOT 10
 #define PROV_STT_ISS 11
+#define PROV_RSA_SCHANNEL 12
+#define PROV_DSS_DH 13
+#define PROV_EC_ECDSA_SIG 14
+#define PROV_EC_ECNRA_SIG 15
+#define PROV_EC_ECDSA_FULL 16
+#define PROV_EC_ECNRA_FULL 17
+#define PROV_DH_SCHANNEL 18
+#define PROV_SPYRUS_LYNKS 20
+#define PROV_RNG 21
+#define PROV_INTEL_SEC 22
 #define MAXUIDLEN 64
 #define CUR_BLOB_VERSION 2
 #define X509_ASN_ENCODING 1
 #define PKCS_7_ASN_ENCODING  65536
 #define CERT_V1 0
@@ -226,11 +278,23 @@ extern "C" {
 #define CERT_SYSTEM_STORE_LOCAL_MACHINE 131072
 #define szOID_PKIX_KP_SERVER_AUTH "4235600"
 #define szOID_SERVER_GATED_CRYPTO "4235658"
 #define szOID_SGC_NETSCAPE "2.16.840.1.113730.4.1"
 #define szOID_PKIX_KP_CLIENT_AUTH "1.3.6.1.5.5.7.3.2"
+
 #define CRYPT_NOHASHOID 0x00000001
+#define CRYPT_NO_SALT 0x10
+#define CRYPT_PREGEN 0x40
+#define CRYPT_RECIPIENT 0x10
+#define CRYPT_INITIATOR 0x40
+#define CRYPT_ONLINE 0x80
+#define CRYPT_SF 0x100
+#define CRYPT_CREATE_IV 0x200
+#define CRYPT_KEK 0x400
+#define CRYPT_DATA_KEY 0x800
+#define CRYPT_VOLATILE 0x1000
+#define CRYPT_SGCKEY 0x2000
 
 typedef UINT ALG_ID;
 typedef struct _VTableProvStruc {FARPROC FuncVerifyImage;} VTableProvStruc,*PVTableProvStruc;
 typedef ULONG HCRYPTPROV;
 typedef ULONG HCRYPTKEY;

