1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>SVC_DecryptRSA</TITLE>
8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">SVC_DecryptRSA <IMG src="../image/BPT.gif" align="middle"><IMG src="../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;twl/os/common/systemCall.h&gt;</CODE></PRE>
16  <PRE><CODE>int SVC_DecryptRSA( const SVCSignHeapContext* acmemory_pool,
17                     const SVCSignBuffers* pData,
18                    unsigned int* len );</CODE></PRE>
19  <PRE><BR></PRE>
20  <PRE><CODE>typedef struct
21{
22   u32* head;
23   u32* tail;
24   u32 size;
25}
26SVCSignHeapContext;
27
28typedef struct
29{
30   void* output;
31   const void* input;
32   const void* key;
33}
34SVCSignBuffers;</CODE><BR></PRE>
35</DL>
36<H2>Arguments</H2>
37<TABLE border="1">
38  <TBODY>
39    <TR>
40      <TD><B><I>acmemory_pool</I></B></TD>
41      <TD>Pointer to the heap information.</TD>
42    </TR>
43    <TR>
44      <TD><B><I>pData</I></B></TD>
45      <TD>Pointer to the structure containing data including which region the data is stored in.</TD>
46    </TR>
47    <TR>
48      <TD><B><I>len</I></B></TD>
49      <TD>Size of the data.</TD>
50    </TR>
51  </TBODY>
52</TABLE>
53<H2>Return Values</H2>
54<P>Returns FALSE if any pointers in the arguments or any members of <B><I>pData</I></B> are NULL. Returns TRUE otherwise.</P>
55<H2>Description</H2>
56<P>Performs RSA decryption.</P>
57<P><B><I>acmemory_pool</I></B> is a pointer to the <CODE>SVCSignHeapContext</CODE> structure where information about the heap area used for the operation is stored. This is initialized by the <CODE><A href="SVC_InitSignHeap.html">SVC_InitSignHeap</A></CODE> function.</P>
58<P><B><I>pData</I></B> is a pointer to a structure that contains various data, including which region the data will be stored in. The <CODE>input</CODE> member is a pointer to the input data, and the <CODE>output</CODE> member is a pointer to the output data region. The <CODE>key</CODE> is a pointer to the private key used for decryption. Only a 1024-bit key length is supported for the private key.</P>
59<P><B><I>len</I></B> is the length of the data.</P>
60<P>See the <a href="../crypto/overview/about_RSA.html#make_key">key creation example</a> in the CRYPTO library's RSA encryption overview for information on how to create a private key.</P>
61<H2>See Also</H2>
62<P><CODE><A href="SVC_InitSignHeap.html">SVC_InitSignHeap</A></CODE>, <CODE><A href="SVC_DecryptSign.html">SVC_DecryptSign</A></CODE>, <CODE><A href="SVC_DecryptSignDER.html">SVC_DecryptSignDER</A></CODE></P>
63<H2>Revision History</H2>
64<P>
652008/09/18 Added an explanation related to keys.<BR>2007/10/19 Initial version.</P>
66<hr><p>CONFIDENTIAL</p></body>
67</HTML>