bigunexp.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright (c) 1999 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/* Copyright (C) RSA Data Security, Inc. created 1986, 1996. This is an
unpublished work protected as such under copyright law. This work
contains proprietary, confidential, and trade secret information of
RSA Data Security, Inc. Use, disclosure or reproduction without the
express written authorization of RSA Data Security, Inc. is
prohibited.
*/
#include "port_before.h"
#include "global.h"
#include "bigmath.h"
#include "surrendr.h"
#include "port_after.h"
/* BigUnexp - decrypt ciphertext c into message m using Chinese remainder.
Assumes m, c of length 2*pSize, pp, qq, dp, dq and cr of length pSize.
Returns 0, AE_CANCEL.
*/
UINT2 *m; /* output message size 2*pSize words */
UINT2 *c; /* input `ciphertext' size 2*pSize */
unsigned int pSize; /* length of p in words */
{
struct BigUnexpFrame {
#if !USE_ALLOCED_FRAME
struct BigUnexpFrame stackFrame;
#endif
int status;
do {
== (struct BigUnexpFrame *)NULL_PTR) {
break;
}
#else
/* Just use the buffers allocated on the stack. */
frame = &stackFrame;
#endif
/* u2=c mod p */
break;
/* t1=c**dp modP */
break;
/* u3=CmodQ */
break;
/* t2=c**DQmodQ */
break;
/* CRT.
*/
break;
break;
} while (0);
#endif
}
return (status);
}