Home
last modified time | relevance | path

Searched refs:pBN (Results 1 – 17 of 17) sorted by relevance

/external/epid-sdk/ext/ipp/sources/ippcp/
Dpcpbn.h72 #define BN_ID(pBN) ((pBN)->idCtx) argument
73 #define BN_SIGN(pBN) ((pBN)->sgn) argument
74 #define BN_POSITIVE(pBN) (BN_SIGN(pBN)==ippBigNumPOS) argument
75 #define BN_NEGATIVE(pBN) (BN_SIGN(pBN)==ippBigNumNEG) argument
76 #define BN_NUMBER(pBN) ((pBN)->number) argument
77 #define BN_BUFFER(pBN) ((pBN)->buffer) argument
78 #define BN_ROOM(pBN) ((pBN)->room) argument
79 #define BN_SIZE(pBN) ((pBN)->size) argument
80 #define BN_SIZE32(pBN) ((pBN)->size*(sizeof(BNU_CHUNK_T)/sizeof(Ipp32u))) argument
83 #define BN_VALID_ID(pBN) (BN_ID((pBN))==idCtxBigNum) argument
[all …]
Dpcpbninit.c72 IPPFUN(IppStatus, ippsBigNumInit, (int length, IppsBigNumState* pBN))
75 IPP_BAD_PTR1_RET(pBN);
76 pBN = (IppsBigNumState*)(IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT));
79 Ipp8u* ptr = (Ipp8u*)pBN;
84 BN_ID(pBN) = idCtxUnknown;
85 BN_SIGN(pBN) = ippBigNumPOS;
86 BN_SIZE(pBN) = 1; /* initial valie is zero */
87 BN_ROOM(pBN) = len; /* close to what has been passed by user */
94 BN_NUMBER(pBN) = (BNU_CHUNK_T*)(ptr += sizeof(IppsBigNumState));
95 … BN_BUFFER(pBN) = (BNU_CHUNK_T*)(ptr += len * sizeof(BNU_CHUNK_T)); /* use expanded length here */
[all …]
Dpcpbnsetoctstr.c81 IppsBigNumState* pBN))
83 IPP_BAD_PTR2_RET(pOctStr, pBN);
85 pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) );
86 IPP_BADARG_RET(!BN_VALID_ID(pBN), ippStsContextMatchErr);
97 IPP_BADARG_RET((int)(sizeof(BNU_CHUNK_T)*BN_ROOM(pBN))<strLen, ippStsSizeErr);
99 BN_SIZE(pBN) = cpFromOctStr_BNU(BN_NUMBER(pBN), pOctStr, strLen);
101 BN_NUMBER(pBN)[0] = (BNU_CHUNK_T)0;
102 BN_SIZE(pBN) = 1;
104 BN_SIGN(pBN) = ippBigNumPOS;
Dpcpbn_unpack.c68 void cpUnpackBigNumCtx(const Ipp8u* pBuffer, IppsBigNumState* pBN) in cpUnpackBigNumCtx() argument
71 CopyBlock(pBuffer, pBN, sizeof(IppsBigNumState)); in cpUnpackBigNumCtx()
72 BN_NUMBER(pBN) = (BNU_CHUNK_T*)((Ipp8u*)pBN + IPP_UINT_PTR(BN_NUMBER(pAlignedBuffer))); in cpUnpackBigNumCtx()
73 BN_BUFFER(pBN) = (BNU_CHUNK_T*)((Ipp8u*)pBN + IPP_UINT_PTR(BN_BUFFER(pAlignedBuffer))); in cpUnpackBigNumCtx()
74 …*)pAlignedBuffer+IPP_UINT_PTR(BN_NUMBER(pAlignedBuffer)), BN_NUMBER(pBN), BN_ROOM(pBN)*sizeof(BNU_… in cpUnpackBigNumCtx()
75 …*)pAlignedBuffer+IPP_UINT_PTR(BN_BUFFER(pAlignedBuffer)), BN_BUFFER(pBN), BN_ROOM(pBN)*sizeof(BNU_… in cpUnpackBigNumCtx()
Dpcpbnsetwords.c76 IppsBigNumState* pBN))
78 IPP_BAD_PTR2_RET(pData, pBN);
80 pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) );
81 IPP_BADARG_RET(!BN_VALID_ID(pBN), ippStsContextMatchErr);
90 IPP_BADARG_RET(len > BN_ROOM(pBN), ippStsOutOfRangeErr);
92 …ZEXPAND_COPY_BNU((Ipp32u*)BN_NUMBER(pBN), BN_ROOM(pBN)*(int)(sizeof(BNU_CHUNK_T)/sizeof(Ipp32u)), …
94 BN_SIZE(pBN) = len;
98 BN_SIGN(pBN) = sgn;
Dpcpbn_pack.c66 void cpPackBigNumCtx(const IppsBigNumState* pBN, Ipp8u* pBuffer) in cpPackBigNumCtx() argument
69 CopyBlock(pBN, pAlignedBuffer, sizeof(IppsBigNumState)); in cpPackBigNumCtx()
70 …ER(pAlignedBuffer) = (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(BN_NUMBER(pBN))-IPP_UINT_PTR(pBN)); in cpPackBigNumCtx()
71 …ER(pAlignedBuffer) = (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(BN_BUFFER(pBN))-IPP_UINT_PTR(pBN)); in cpPackBigNumCtx()
72 …CopyBlock(BN_NUMBER(pBN), (Ipp8u*)pAlignedBuffer+IPP_UINT_PTR(BN_NUMBER(pAlignedBuffer)), BN_ROOM( in cpPackBigNumCtx()
73 …CopyBlock(BN_BUFFER(pBN), (Ipp8u*)pAlignedBuffer+IPP_UINT_PTR(BN_BUFFER(pAlignedBuffer)), BN_ROOM( in cpPackBigNumCtx()
Dpcpgfpsetelemreg.c79 IPPFUN(IppStatus, ippsGFpSetElementRegular,(const IppsBigNumState* pBN, IppsGFpElement* pR, IppsGFp…
81 IPP_BAD_PTR1_RET(pBN);
82 pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) );
83 IPP_BADARG_RET( !BN_VALID_ID(pBN), ippStsContextMatchErr );
84 IPP_BADARG_RET( !BN_POSITIVE(pBN), ippStsOutOfRangeErr);
86 …return ippsGFpSetElement((Ipp32u*)BN_NUMBER(pBN), BITS2WORD32_SIZE( BITSIZE_BNU(BN_NUMBER((pBN)),B…
Dpcpbnarithcmpz.c72 IPPFUN(IppStatus, ippsCmpZero_BN, (const IppsBigNumState* pBN, Ipp32u* pResult))
74 IPP_BAD_PTR2_RET(pBN, pResult);
76 pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) );
77 IPP_BADARG_RET(!BN_VALID_ID(pBN), ippStsContextMatchErr);
79 if(BN_SIZE(pBN)==1 && BN_NUMBER(pBN)[0]==0)
81 else if (BN_SIGN(pBN)==ippBigNumPOS)
83 else if (BN_SIGN(pBN)==ippBigNumNEG)
Dpcpbngetref.c96 const IppsBigNumState *pBN))
98 IPP_BAD_PTR1_RET(pBN);
100 pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) );
101 IPP_BADARG_RET(!BN_VALID_ID(pBN), ippStsContextMatchErr);
104 *pSgn = BN_SIGN(pBN);
106 cpSize bitLen = BITSIZE_BNU(BN_NUMBER(pBN), BN_SIZE(pBN));
111 *ppData = (Ipp32u*)BN_NUMBER(pBN);
Dpcpbngetext.c76 const IppsBigNumState* pBN))
78 IPP_BAD_PTR1_RET(pBN);
80 pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) );
81 IPP_BADARG_RET(!BN_VALID_ID(pBN), ippStsContextMatchErr);
84 cpSize bitSize = BITSIZE_BNU(BN_NUMBER(pBN), BN_SIZE(pBN));
88 COPY_BNU(pData, (Ipp32u*)BN_NUMBER(pBN), BITS2WORD32_SIZE(bitSize));
90 *pSgn = BN_SIGN(pBN);
Dpcpbngetoctstr.c80 const IppsBigNumState* pBN))
82 IPP_BAD_PTR2_RET(pOctStr, pBN);
84 pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) );
85 IPP_BADARG_RET(!BN_VALID_ID(pBN), ippStsContextMatchErr);
86 IPP_BADARG_RET(BN_NEGATIVE(pBN), ippStsRangeErr);
89 … return cpToOctStr_BNU(pOctStr,strLen, BN_NUMBER(pBN),BN_SIZE(pBN))? ippStsNoErr : ippStsLengthErr;
Dpcpbngetwords.c76 const IppsBigNumState* pBN))
78 IPP_BAD_PTR4_RET(pSgn, pLengthInBits, pData, pBN);
80 pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) );
81 IPP_BADARG_RET(!BN_VALID_ID(pBN), ippStsContextMatchErr);
84 cpSize len32 = BN_SIZE(pBN)*sizeof(BNU_CHUNK_T)/sizeof(Ipp32u);
85 Ipp32u* bnData = (Ipp32u*)BN_NUMBER(pBN);
90 *pSgn = BN_SIGN(pBN);
Dpcpbngetlen.c72 IPPFUN(IppStatus, ippsGetSize_BN, (const IppsBigNumState* pBN, int* pSize))
74 IPP_BAD_PTR2_RET(pBN, pSize);
76 pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) );
77 IPP_BADARG_RET(!BN_VALID_ID(pBN), ippStsContextMatchErr);
79 *pSize = BN_ROOM(pBN)*sizeof(BNU_CHUNK_T)/sizeof(Ipp32u);
Dpcpeccp.h56 __INLINE IppsBigNumState* cpConstructBN(IppsBigNumState* pBN, cpSize len, BNU_CHUNK_T* pData, BNU_C… in cpConstructBN() argument
58 BN_ID(pBN) = idCtxBigNum; in cpConstructBN()
59 BN_SIGN(pBN) = ippBigNumPOS; in cpConstructBN()
60 BN_SIZE(pBN) = len; in cpConstructBN()
61 BN_ROOM(pBN) = len; in cpConstructBN()
62 BN_NUMBER(pBN) = pData; in cpConstructBN()
63 BN_BUFFER(pBN) = pBuffer; in cpConstructBN()
64 return pBN; in cpConstructBN()
Dpcpbnresourceca.c113 pNode->pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(tbnPtr, ALIGN_VAL) ); in cpBigNumListInit()
114 ippsBigNumInit(bnLen, pNode->pBN); in cpBigNumListInit()
138 IppsBigNumState* ret = (*ppList)->pBN; in cpBigNumListGet()
Dpcpbnresource.h56 IppsBigNumState* pBN; member
/external/epid-sdk/ext/ipp/include/
Dippcp.h577 IPPAPI(IppStatus, ippsBigNumInit,(int length, IppsBigNumState* pBN))
579 IPPAPI(IppStatus, ippsCmpZero_BN,(const IppsBigNumState* pBN, Ipp32u* pResult))
582 IPPAPI(IppStatus, ippsGetSize_BN,(const IppsBigNumState* pBN, int* pSize))
585 IppsBigNumState* pBN))
588 const IppsBigNumState* pBN))
590 const IppsBigNumState* pBN))
593 const IppsBigNumState* pBN))
604 IPPAPI(IppStatus, ippsSetOctString_BN,(const Ipp8u* pStr, int strLen, IppsBigNumState* pBN))
605 IPPAPI(IppStatus, ippsGetOctString_BN,(Ipp8u* pStr, int strLen, const IppsBigNumState* pBN))
1080 IPPAPI(IppStatus, ippsGFpSetElementRegular,(const IppsBigNumState* pBN, IppsGFpElement* pR, IppsGFp…