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_DecryptSign</TITLE>
8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">SVC_DecryptSign <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>void SVC_DecryptSign( const SVCSignHeapContext* acmemory_pool,
17                        void* buffer,
18                        const void* sgn_ptr,
19                        const void* key_ptr );</CODE></PRE>
20</DL>
21<H2>Arguments</H2>
22<TABLE border="1">
23  <TBODY>
24    <TR>
25      <TD><B><I>acmemory_pool</I></B></TD>
26      <TD>Pointer to the heap information.</TD>
27    </TR>
28    <TR>
29      <TD><B><I>buffer</I></B></TD>
30      <TD>Pointer to the output data buffer.</TD>
31    </TR>
32    <TR>
33      <TD><B><I>sgn_ptr</I></B></TD>
34      <TD>Pointer to the digital signature data.</TD>
35    </TR>
36    <TR>
37      <TD><B><I>key_ptr</I></B></TD>
38      <TD>Pointer to the public key data.</TD>
39    </TR>
40  </TBODY>
41</TABLE>
42<H2>Return Values</H2>
43<P>Returns FALSE if the one of the pointers in the arguments is NULL or if the padding of the digital signature is invalid. Returns TRUE otherwise.</P>
44<H2>Description</H2>
45<P>Decrypts signed data using the specified public key.</P>
46<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>
47<P><B><I>buffer</I></B> is a pointer to the output data buffer. The decrypted data is stored here.<BR><B>Note:</B> The output size is fixed at <CODE>SVC_SHA1_DIGEST_SIZE</CODE> (20 bytes).</P>
48<P><B><I>sgn_ptr</I></B> is a pointer to the digital signature data to decrypt.</P>
49<P><B><I>key_ptr</I></B> is a pointer to the public key data to use for decryption.</P>
50<P>Only a 1024-bit key length is supported for the public key. 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 key.</P>
51<H2>See Also</H2>
52<P><CODE><A href="SVC_InitSignHeap.html">SVC_InitSignHeap</A></CODE>, <A href="SVC_DecryptRSA.html"><CODE>SVC_DecryptRSA</CODE></A>, <CODE><A href="SVC_DecryptSignDER.html">SVC_DecryptSignDER</A></CODE></P>
53<H2>Revision History</H2>
54<P>
552008/09/18 Added an explanation related to keys. <BR>2008/05/22 Added a note on the output data size. <BR>2007/10/19 Initial version.</P>
56<hr><p>CONFIDENTIAL</p></body>
57</HTML>