CRYPT_PUBKEY_ALG_OID_GROUP_ID

For the CRYPT_PUBKEY_ALG_OID_GROUP_ID, the following predefined entries exist. Note that the varying members of the CRYPT_OID_INFO structure for this group are shown in the table. These correspond to the find criteria that should be used for this group when making calls to CryptFindOIDInfo. The values for members that do not vary for entries in this group are typically set to zero, or NULL, except that cbSize which always is set to the size of CRYPT_OID_INFO, and the dwGroupId always is set to this group.

pszOID pwszName Algid Extra Info
szOID_RSA_RSA L"RSA" CALG_RSA_KEYX N/A
szOID_RSA_RSA L"RSA_KEYX" CALG_RSA_KEYX N/A
szOID_RSA_RSA L"RSA" CALG_RSA_SIGN N/A
szOID_RSA_RSA L"RSA_SIGN" CALG_RSA_SIGN N/A
szOID_OIWSEC_dsa L"DSA" CALG_DSS_SIGN N/A
szOID_OIWSEC_dsa L"DSS" CALG_DSS_SIGN N/A
szOID_OIWSEC_dsa L"DSA_SIGN" CALG_DSS_SIGN N/A
szOID_OIWSEC_rsaXchg L"RSA_KEYX" CALG_RSA_KEYX N/A
szOID_INFOSEC_mosaicKMandUpdSig L"mosaicKMandUpdSig" CALG_DSS_SIGN dwMosaicFlags
see Note below

Note  For the Extra Info dwMosaicFlags,
static const DWORD dwMosaicFlags = \
                            CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG;
    cbData = sizeof(DWORD);
    pbData = (BYTE *) &dwMosaicFlags;

The C code used to populate the table (an array of CCRYPT_OID_INFO structures) is shown below.

C code specifying table.

//+-------------------------------------------------------------------------
//  Public Key Algorithm Table
//--------------------------------------------------------------------------
// CRYPT_PUBKEY_ALG_OID_GROUP_ID has the following optional ExtraInfo:
//  DWORD[0] - Flags. CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG can be set to
//  inhibit the reformatting of the signature before
//  CryptVerifySignature is called or after CryptSignHash
//  is called. CRYPT_OID_USE_PUBKEY_PARA_FOR_PKCS7_FLAG can
//   be set to include the public key algorithm's parameters
//   in the PKCS7's digestEncryptionAlgorithm's parameters.

#define CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG     0x1
#define CRYPT_OID_USE_PUBKEY_PARA_FOR_PKCS7_FLAG    0x2

static const DWORD dwMosaicFlags = CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG;

#define PUBKEY_ALG_ENTRY(pszOID, pwszName, Algid) \
    OID_INFO_LEN, pszOID, pwszName, CRYPT_PUBKEY_ALG_OID_GROUP_ID, \
    Algid, 0, NULL

#define PUBKEY_EXTRA_ALG_ENTRY(pszOID, pwszName, Algid, dwFlags) \
    OID_INFO_LEN, pszOID, pwszName, CRYPT_PUBKEY_ALG_OID_GROUP_ID, \
    Algid, sizeof(dwFlags), (BYTE *) &dwFlags

static CCRYPT_OID_INFO PubKeyAlgTable[] = {
    PUBKEY_ALG_ENTRY(szOID_RSA_RSA, L"RSA", CALG_RSA_KEYX),
    PUBKEY_ALG_ENTRY(szOID_RSA_RSA, L"RSA_KEYX", CALG_RSA_KEYX),
    PUBKEY_ALG_ENTRY(szOID_RSA_RSA, L"RSA", CALG_RSA_SIGN),
    PUBKEY_ALG_ENTRY(szOID_RSA_RSA, L"RSA_SIGN", CALG_RSA_SIGN),
    PUBKEY_ALG_ENTRY(szOID_OIWSEC_dsa, L"DSA", CALG_DSS_SIGN),
    PUBKEY_ALG_ENTRY(szOID_OIWSEC_dsa, L"DSS", CALG_DSS_SIGN),
    PUBKEY_ALG_ENTRY(szOID_OIWSEC_dsa, L"DSA_SIGN", CALG_DSS_SIGN),
    PUBKEY_ALG_ENTRY(szOID_OIWSEC_rsaXchg, L"RSA_KEYX", CALG_RSA_KEYX),
    PUBKEY_EXTRA_ALG_ENTRY(szOID_INFOSEC_mosaicKMandUpdSig,
        L"mosaicKMandUpdSig", CALG_DSS_SIGN, dwMosaicFlags)
};
#define PUBKEY_ALG_CNT (sizeof(PubKeyAlgTable) / sizeof(PubKeyAlgTable[0]))