9#define ASN1_SEQUENCE_BYTE (0x30)
10#define ASN1_OCTET_STRING_BYTE (0x04)
12#define PKCS_BLOCKTYPE_1 (0x01)
13#define PKCS_BLOCKTYPE_2 (0x02)
21 {12, (
BYTE *)
"\x06\x08\x2a\x86\x48\x86\xf7\x0d\x02\x05\x05\x00"},
22 {10, (
BYTE *)
"\x06\x08\x2a\x86\x48\x86\xf7\x0d\x02\x05"},
27 {9, (
BYTE *)
"\x06\x05\x2b\x0e\x03\x02\x1a\x05\x00"},
28 {7, (
BYTE *)
"\x06\x05\x2b\x0e\x03\x02\x1a"}
33 {13, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x04\x05\x00"},
34 {11, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x04"}
39 {13, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x01\x05\x00"},
40 {11, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x01"}
45 {13, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x02\x05\x00"},
46 {11, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x02"}
51 {13, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x03\x05\x00"},
52 {11, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x03"}
57 {13, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x05\x05\x00"},
58 {11, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x05"}
63 {13, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x06\x05\x00"},
64 {11, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x06"}
69 {13, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x07\x05\x00"},
70 {11, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x07"}
75 {13, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x08\x05\x00"},
76 {11, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x08"}
81 {13, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x09\x05\x00"},
82 {11, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x09"}
87 {13, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x0a\x05\x00"},
88 {11, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x0a"}
93 {13, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x0b\x05\x00"},
94 {11, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x0b"}
99 {13, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x0c\x05\x00"},
100 {11, (
BYTE *)
"\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x0c"}
118 SIZE_T cbMaskRemaining = cbDst;
125 cIterations = (cbDst + (cbHashAlg - 1)) / cbHashAlg;
126 if (cIterations < 256)
128 fAvoidDWORDReverse =
TRUE;
140 if (fAvoidDWORDReverse)
142 rgbCount[3] = pbCount[0];
148 rgbCount[
j] = pbCount[
sizeof(
UINT32) -
j - 1];
156 if (cbMaskRemaining >= cbHashAlg)
160 cbMaskRemaining -= cbHashAlg;
161 pbMaskIndex += cbHashAlg;
167 memcpy( pbMaskIndex, rgbHash, cbMaskRemaining);
197 if( cbPkcs1Format < (cbPlaintext + 11) )
199 scError = SYMCRYPT_INVALID_ARGUMENT;
203 cbPS = cbPkcs1Format - (cbPlaintext + 3);
205 pbPkcs1Format[0] = 0x00;
209 if( scError != SYMCRYPT_NO_ERROR )
215 for(
i = 0;
i < cbPS;
i++ )
217 while( pbPkcs1Format[2 +
i] == 0x00 )
220 if( scError != SYMCRYPT_NO_ERROR )
227 pbPkcs1Format[2 + cbPS] = 0x00;
229 memcpy(pbPkcs1Format + 3 + cbPS, pbPlaintext, cbPlaintext);
247 UINT32 mBufferSizeError = 0;
249 UINT32 cbPlaintextResult = 0;
254 UINT32 cbPlaintextTruncated;
268 if ( cbPkcs1Format < 11 )
271 scError = SYMCRYPT_INVALID_ARGUMENT;
282 for (
i = 2;
i < cbPkcs1Format;
i++)
287 iFirstZero |=
i & mByteIsZero & ~mLengthFound;
288 mLengthFound |= mByteIsZero;
290 mPaddingError |= ~mLengthFound;
300 cbPlaintextResult = ~mPaddingError & ((
UINT32)(cbPkcs1Format - iFirstZero - 1));
305 if( pbPlaintext ==
NULL )
314 cbPlaintextTruncated = ((
UINT32) cbPlaintext) & 0x7fffffff;
315 if( cbPlaintextTruncated == cbPlaintext )
334 scError ^= mBufferSizeError & (scError ^ SYMCRYPT_BUFFER_TOO_SMALL);
335 scError ^= mPaddingError & (scError ^ SYMCRYPT_INVALID_ARGUMENT);
337 *pcbPlaintext = cbPlaintextResult;
381 PBYTE pbSeedInternal;
395 if( cbOaepFormat < (cbPlaintext + (cbHash * 2) + 2) ||
399 scError = SYMCRYPT_INVALID_ARGUMENT;
403 cbPS = cbOaepFormat - (cbPlaintext + (cbHash * 2) + 2);
404 cbDB = cbOaepFormat - (cbHash + 1);
408 pHashState = (
PVOID) pbScratch;
409 pbSeedInternal = pbScratch + cbHashState;
410 pbSeedMask = pbSeedInternal + cbHash;
411 pbDB = pbSeedMask + cbHash;
412 pbDBMask = pbDB + cbDB;
415 SymCryptHash( hashAlgorithm, pbLabel, cbLabel, pbDB, cbHash );
418 pbDB[cbHash + cbPS] = 0x01;
421 memcpy(pbDB + cbHash + cbPS + 1, pbPlaintext, cbPlaintext);
427 if (scError != SYMCRYPT_NO_ERROR)
448 pbOaepFormat[0] = 0x00;
453 pbOaepFormat[cbHash + 1 +
i] = pbDB[
i] ^ pbDBMask[
i];
460 pbOaepFormat + cbHash + 1,
468 pbOaepFormat[1 +
i] = pbSeedInternal[
i] ^ pbSeedMask[
i];
471 scError = SYMCRYPT_NO_ERROR;
518 scError = SYMCRYPT_INVALID_ARGUMENT;
526 if( cbOAEPFormat < (2*cbHashAlg + 2) )
528 scError = SYMCRYPT_INVALID_ARGUMENT;
532 cbDB = cbOAEPFormat - (cbHashAlg + 1);
536 pHashState = (
PVOID) pbScratch;
537 pbSeedMask = pbScratch + cbHashState;
538 pbSeed = pbSeedMask + cbHashAlg;
539 pbDBMask =
pbSeed + cbHashAlg;
540 pbDB = pbDBMask + cbDB;
541 pbLabelHash = pbDB + cbDB;
547 pbOAEPFormat + cbHashAlg + 1,
555 pbSeed[
i] = pbOAEPFormat[1 +
i] ^ pbSeedMask[
i];
570 pbDB[
i] = pbOAEPFormat[cbHashAlg + 1 +
i] ^ pbDBMask[
i];
574 SymCryptHash( hashAlgorithm, pbLabel, cbLabel, pbLabelHash, cbHashAlg );
595 if( mPaddingError != 0 )
597 scError = SYMCRYPT_INVALID_ARGUMENT;
604 if (pbDB[
cnt] == 0x01)
609 else if (pbDB[
cnt] != 0x00)
611 scError = SYMCRYPT_INVALID_ARGUMENT;
616 if (pbDB[
cnt - 1] != 0x01)
618 scError = SYMCRYPT_INVALID_ARGUMENT;
623 *pcbPlaintext = cbDB -
cnt;
625 if(
NULL == pbPlaintext)
627 scError = SYMCRYPT_NO_ERROR;
631 if (cbPlaintext < *pcbPlaintext)
633 scError = SYMCRYPT_BUFFER_TOO_SMALL;
637 memcpy(pbPlaintext, pbDB +
cnt, *pcbPlaintext);
639 scError = SYMCRYPT_NO_ERROR;
672 scError = SYMCRYPT_INVALID_ARGUMENT;
677 if (cbHash >= cbPKCS1Format)
679 scError = SYMCRYPT_INVALID_ARGUMENT;
687 if ( (pbHashOid!=
NULL) && (cbHashOid>0) )
691 cbEncoding = 6 + cbHashOid + cbHash;
699 scError = SYMCRYPT_INVALID_ARGUMENT;
704 cbEncoding = 2 + cbHash;
711 if (cbEncoding > 0x80)
713 scError = SYMCRYPT_INVALID_ARGUMENT;
725 if (3 + 8 + cbEncoding > cbPKCS1Format)
727 scError = SYMCRYPT_INVALID_ARGUMENT;
731 cbPadding = cbPKCS1Format - 3 - cbEncoding;
735 pbPKCS1Format[0] = 0x00;
736 pbPKCS1Format[1] = 0x01;
737 pbPKCS1Format[2 + cbPadding] = 0x00;
740 memset(pbPKCS1Format + 2, 0xff, cbPadding);
745 if ( (pbHashOid!=
NULL) && (cbHashOid>0) )
749 pbPKCS1Format[2 + cbPadding + 2] = (
BYTE)cbEncoding - 2;
753 pbPKCS1Format[2 + cbPadding + 4] = (
BYTE)cbHashOid;
755 memcpy(pbPKCS1Format + 2 + cbPadding + cbOidOffset, pbHashOid, cbHashOid);
760 pbPKCS1Format[2 + cbPadding + cbOidOffset + cbHashOid + 1] = (
BYTE)cbHash;
761 memcpy(pbPKCS1Format + 2 + cbPadding + cbOidOffset + cbHashOid + 2,
pbHash, cbHash);
768 scError = SYMCRYPT_NO_ERROR;
805 if (scError != SYMCRYPT_NO_ERROR)
810 if (
SymCryptEqual(pbScratch, pbPKCS1Format, cbPKCS1Format) )
812 scError = SYMCRYPT_NO_ERROR;
816 scError = SYMCRYPT_SIGNATURE_VERIFICATION_FAILURE;
848 scError = SYMCRYPT_INVALID_ARGUMENT;
857 for (
i = 0;
i < nOIDCount;
i++)
868 if (scError == SYMCRYPT_NO_ERROR)
875 if ((pHashOIDs ==
NULL ) ||
876 (scError != SYMCRYPT_NO_ERROR &&
953 if ((cbPSSFormat == 0) || (pbPSSFormat ==
NULL))
955 scError = SYMCRYPT_INVALID_ARGUMENT;
972 (cbPSSFormat < (cbHashAlg + cbSalt + 2)) )
974 scError = SYMCRYPT_INVALID_ARGUMENT;
978 cbDB = cbPSSFormat - (cbHashAlg + 1);
979 cbPadding2 = cbDB - cbSalt - 1;
980 cbMPrime = 8 + cbHash + cbSalt;
984 pHashState = (
PVOID) pbScratch;
985 pbMPrime = pbScratch + cbHashState;
986 pbDB = pbMPrime + cbMPrime;
987 pbDBMask = pbDB + cbDB;
997 pbMPrime + 8 + cbHash,
999 if (scError != SYMCRYPT_NO_ERROR)
1007 memcpy(pbMPrime + 8 + cbHash, pbSalt, cbSalt);
1011 SymCryptHash( hashAlgorithm, pbMPrime, cbMPrime, pbPSSFormat + cbDB, cbHashAlg );
1015 pbDB[cbPadding2] = 0x01;
1016 memcpy(pbDB + cbPadding2 + 1, pbMPrime + 8 + cbHash, cbSalt);
1030 pbPSSFormat[
i] = pbDB[
i] ^ pbDBMask[
i];
1037 pbPSSFormat[0] &= (
BYTE)(0xff >> dwZeroBits);
1040 pbPSSFormat[cbPSSFormat - 1] = 0xbc;
1042 scError = SYMCRYPT_NO_ERROR;
1072 PCBYTE pbHashOfMPrimeIndex;
1087 (cbPSSFormat == 0) ||
1088 (pbPSSFormat ==
NULL))
1090 scError = SYMCRYPT_INVALID_ARGUMENT;
1101 if (pbPSSFormat[0] != 0)
1103 scError = SYMCRYPT_SIGNATURE_VERIFICATION_FAILURE;
1115 if( (cbPSSFormat < (cbHashAlg + cbSalt + 2)) ||
1116 (pbPSSFormat[0] & (
BYTE)(0xff << (8 - dwZeroBits))) != 0 ||
1117 pbPSSFormat[cbPSSFormat - 1] != 0xbc
1120 scError = SYMCRYPT_SIGNATURE_VERIFICATION_FAILURE;
1124 cbDB = cbPSSFormat - (cbHashAlg + 1);
1126 pHashState = (
PVOID) pbScratch;
1127 pbDBMask = pbScratch + cbHashState;
1130 pbHashOfMPrimeIndex = pbPSSFormat + (cbPSSFormat - (cbHashAlg + 1));
1136 pbHashOfMPrimeIndex,
1144 pbDBMask[
i] = pbPSSFormat[
i] ^ pbDBMask[
i];
1148 pbDBMask[0] &= (
BYTE)(0xff >> dwZeroBits);
1152 for (cbPadding2 = 0; cbPadding2 < (cbDB - cbSalt); cbPadding2++)
1154 if (pbDBMask[cbPadding2] == 0x01)
1160 if (pbDBMask[cbPadding2] != 0x00)
1163 scError = SYMCRYPT_SIGNATURE_VERIFICATION_FAILURE;
1172 if( cbPadding2 == cbDB - cbSalt )
1174 scError = SYMCRYPT_SIGNATURE_VERIFICATION_FAILURE;
1178 cbSaltObserved = cbDB - cbPadding2 - 1;
1184 cbSaltObserved != cbSalt )
1188 scError = SYMCRYPT_SIGNATURE_VERIFICATION_FAILURE;
1192 pbMPrime = pbDBMask + cbDB;
1193 cbMPrime = 8 + cbHash + cbSaltObserved;
1194 pbMPrimeHash = pbMPrime + cbMPrime;
1201 memcpy(pbMPrime + 8 + cbHash,
1202 pbDBMask + (cbDB - cbSaltObserved),
1206 SymCryptHash( hashAlgorithm, pbMPrime, cbMPrime, pbMPrimeHash, cbHashAlg );
1208 if ( !
SymCryptEqual(pbPSSFormat + cbDB, pbMPrimeHash, cbHashAlg) )
1210 scError = SYMCRYPT_SIGNATURE_VERIFICATION_FAILURE;
1214 scError = SYMCRYPT_NO_ERROR;
static void cleanup(void)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptCallbackRandom(BYTE *buf, SIZE_T size)
#define memcpy(s1, s2, n)
#define _In_reads_bytes_(s)
#define _Out_writes_bytes_opt_(s)
#define _Inout_updates_bytes_(s)
#define _Out_writes_bytes_(s)
#define _In_reads_bytes_opt_(s)
#define UNREFERENCED_PARAMETER(P)
const SYMCRYPT_OID SymCryptSha3_256OidList[]
SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptRsaPkcs1CheckSignaturePadding(_In_reads_bytes_(cbHash) PCBYTE pbHash, SIZE_T cbHash, _In_reads_bytes_(cbHashOid) PCBYTE pbHashOid, SIZE_T cbHashOid, _In_reads_bytes_(cbPKCS1Format) PCBYTE pbPKCS1Format, UINT32 flags, _Out_writes_bytes_(cbPKCS1Format) PBYTE pbScratch, SIZE_T cbPKCS1Format)
const SYMCRYPT_OID SymCryptSha512_256OidList[]
const SYMCRYPT_OID SymCryptSha256OidList[]
#define ASN1_SEQUENCE_BYTE
const SYMCRYPT_OID SymCryptSha384OidList[]
SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptRsaOaepRemoveEncryptionPadding(_In_reads_bytes_(cbOAEPFormat) PCBYTE pbOAEPFormat, SIZE_T cbOAEPFormat, _In_ PCSYMCRYPT_HASH hashAlgorithm, _In_reads_bytes_(cbLabel) PCBYTE pbLabel, SIZE_T cbLabel, UINT32 flags, _Out_writes_bytes_(cbPlaintext) PBYTE pbPlaintext, SIZE_T cbPlaintext, _Out_ SIZE_T *pcbPlaintext, _Out_writes_bytes_(cbScratch) PBYTE pbScratch, SIZE_T cbScratch)
const SYMCRYPT_OID SymCryptShake256OidList[]
const SYMCRYPT_OID SymCryptSha3_384OidList[]
const SYMCRYPT_OID SymCryptSha512OidList[]
SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptRsaPssVerifySignaturePadding(_In_reads_bytes_(cbHash) PCBYTE pbHash, SIZE_T cbHash, _In_ PCSYMCRYPT_HASH hashAlgorithm, _In_range_(0, cbPSSFormat) SIZE_T cbSalt, _In_reads_bytes_(cbPSSFormat) PCBYTE pbPSSFormat, SIZE_T cbPSSFormat, UINT32 nBitsOfModulus, UINT32 flags, _Out_writes_bytes_(cbScratch) PBYTE pbScratch, SIZE_T cbScratch)
const SYMCRYPT_OID SymCryptSha3_224OidList[]
SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptRsaPkcs1ApplySignaturePadding(_In_reads_bytes_(cbHash) PCBYTE pbHash, SIZE_T cbHash, _In_reads_bytes_(cbHashOid) PCBYTE pbHashOid, SIZE_T cbHashOid, UINT32 flags, _Out_writes_bytes_(cbPKCS1Format) PBYTE pbPKCS1Format, SIZE_T cbPKCS1Format)
const SYMCRYPT_OID SymCryptShake128OidList[]
const SYMCRYPT_OID SymCryptSha224OidList[]
SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptRsaPkcs1VerifySignaturePadding(_In_reads_bytes_(cbHash) PCBYTE pbHash, SIZE_T cbHash, _In_reads_(nOIDCount) PCSYMCRYPT_OID pHashOIDs, _In_ SIZE_T nOIDCount, _In_reads_bytes_(cbPKCS1Format) PCBYTE pbPKCS1Format, SIZE_T cbPKCS1Format, UINT32 flags, _Out_writes_bytes_(cbScratch) PBYTE pbScratch, SIZE_T cbScratch)
const SYMCRYPT_OID SymCryptMd5OidList[]
VOID SYMCRYPT_CALL SymCryptRsaPaddingMaskGeneration(_In_ PCSYMCRYPT_HASH hashAlgorithm, _In_ PVOID pHashState, _In_reads_bytes_(cbSrc) PCBYTE pbSrc, SIZE_T cbSrc, _Out_writes_bytes_(cbDst) PBYTE pbDst, SIZE_T cbDst)
SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptRsaPkcs1RemoveEncryptionPadding(_Inout_updates_bytes_(cbPkcs1Buffer) PBYTE pbPkcs1Format, SIZE_T cbPkcs1Format, SIZE_T cbPkcs1Buffer, _Out_writes_bytes_opt_(cbPlaintext) PBYTE pbPlaintext, SIZE_T cbPlaintext, _Out_ SIZE_T *pcbPlaintext)
SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptRsaPssApplySignaturePadding(_In_reads_bytes_(cbHash) PCBYTE pbHash, SIZE_T cbHash, _In_ PCSYMCRYPT_HASH hashAlgorithm, _In_reads_bytes_opt_(cbSalt) PCBYTE pbSalt, _In_range_(0, cbPSSFormat) SIZE_T cbSalt, UINT32 nBitsOfModulus, UINT32 flags, _Out_writes_bytes_(cbPSSFormat) PBYTE pbPSSFormat, SIZE_T cbPSSFormat, _Out_writes_bytes_(cbScratch) PBYTE pbScratch, SIZE_T cbScratch)
#define ASN1_OCTET_STRING_BYTE
SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptRsaPkcs1ApplyEncryptionPadding(_In_reads_bytes_(cbPlaintext) PCBYTE pbPlaintext, SIZE_T cbPlaintext, _Out_writes_bytes_(cbPkcs1Format) PBYTE pbPkcs1Format, SIZE_T cbPkcs1Format)
const SYMCRYPT_OID SymCryptSha3_512OidList[]
SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptRsaOaepApplyEncryptionPadding(_In_reads_bytes_(cbPlaintext) PCBYTE pbPlaintext, SIZE_T cbPlaintext, _In_ PCSYMCRYPT_HASH hashAlgorithm, _In_reads_bytes_(cbLabel) PCBYTE pbLabel, SIZE_T cbLabel, _In_reads_bytes_opt_(cbSeed) PCBYTE pbSeed, SIZE_T cbSeed, _Out_writes_bytes_(cbOaepFormat) PBYTE pbOaepFormat, SIZE_T cbOaepFormat, _Out_writes_bytes_(cbScratch) PBYTE pbScratch, SIZE_T cbScratch)
const SYMCRYPT_OID SymCryptSha1OidList[]
const SYMCRYPT_OID SymCryptSha512_224OidList[]
UINT32 UINT32 UINT32 UINT32 cbScratch
static const BYTE pbHash[]
#define SYMCRYPT_ASSERT(_x)
#define SYMCRYPT_FLAG_RSA_PKCS1_NO_ASN1
VOID SYMCRYPT_CALL SymCryptHashAppend(_In_ PCSYMCRYPT_HASH pHash, _Inout_updates_bytes_(pHash->stateSize) PVOID pState, _In_reads_(cbData) PCBYTE pbData, SIZE_T cbData)
#define SYMCRYPT_FLAG_RSA_PSS_VERIFY_WITH_MINIMUM_SALT
VOID SYMCRYPT_CALL SymCryptWipe(_Out_writes_bytes_(cbData) PVOID pbData, SIZE_T cbData)
VOID SYMCRYPT_CALL SymCryptHashInit(_In_ PCSYMCRYPT_HASH pHash, _Out_writes_bytes_(pHash->stateSize) PVOID pState)
SIZE_T SYMCRYPT_CALL SymCryptHashResultSize(_In_ PCSYMCRYPT_HASH pHash)
#define SYMCRYPT_FLAG_RSA_PKCS1_OPTIONAL_HASH_OID
VOID SYMCRYPT_CALL SymCryptHash(_In_ PCSYMCRYPT_HASH pHash, _In_reads_(cbData) PCBYTE pbData, SIZE_T cbData, _Out_writes_(SYMCRYPT_MIN(cbResult, pHash->resultSize)) PBYTE pbResult, SIZE_T cbResult)
BOOLEAN SYMCRYPT_CALL SymCryptEqual(_In_reads_(cbBytes) PCBYTE pbSrc1, _In_reads_(cbBytes) PCBYTE pbSrc2, SIZE_T cbBytes)
VOID SYMCRYPT_CALL SymCryptHashResult(_In_ PCSYMCRYPT_HASH pHash, _Inout_updates_bytes_(pHash->stateSize) PVOID pState, _Out_writes_(SYMCRYPT_MIN(cbResult, pHash->resultSize)) PBYTE pbResult, SIZE_T cbResult)
SIZE_T SYMCRYPT_CALL SymCryptHashStateSize(_In_ PCSYMCRYPT_HASH pHash)
#define SYMCRYPT_HASH_MAX_RESULT_SIZE
const SYMCRYPT_HASH * PCSYMCRYPT_HASH
#define SYMCRYPT_MIN(_a, _b)
VOID SYMCRYPT_CALL SymCryptScsRotateBuffer(_Inout_updates_(cbBuffer) PBYTE pbBuffer, SIZE_T cbBuffer, SIZE_T lshift)
UINT32 SYMCRYPT_CALL SymCryptMask32IsNonzeroU31(UINT32 v)
UINT32 SYMCRYPT_CALL SymCryptMask32IsZeroU31(UINT32 v)
UINT32 SYMCRYPT_CALL SymCryptMask32NeqU31(UINT32 a, UINT32 b)
UINT32 SYMCRYPT_CALL SymCryptMask32LtU31(UINT32 a, UINT32 b)
VOID SYMCRYPT_CALL SymCryptScsCopy(_In_reads_(cbDst) PCBYTE pbSrc, SIZE_T cbSrc, _Out_writes_(cbDst) PBYTE pbDst, SIZE_T cbDst)