/lib/bouncycastle/docs/org/bouncycastle/crypto/engines/RSABlindingEngine.html
HTML | 352 lines | 290 code | 40 blank | 22 comment | 0 complexity | e1efc18f7a168dbb6cedac8033a2622a MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause, Apache-2.0
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0) on Mon Jan 11 13:46:35 EST 2010 -->
6<TITLE>
7RSABlindingEngine (Bouncy Castle Library 1.45 API Specification)
8</TITLE>
9
10<META NAME="date" CONTENT="2010-01-11">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17 if (location.href.indexOf('is-external=true') == -1) {
18 parent.document.title="RSABlindingEngine (Bouncy Castle Library 1.45 API Specification)";
19 }
20}
21</SCRIPT>
22<NOSCRIPT>
23</NOSCRIPT>
24
25</HEAD>
26
27<BODY BGCOLOR="white" onload="windowTitle();">
28<HR>
29
30
31<!-- ========= START OF TOP NAVBAR ======= -->
32<A NAME="navbar_top"><!-- --></A>
33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35<TR>
36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37<A NAME="navbar_top_firstrow"><!-- --></A>
38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39 <TR ALIGN="center" VALIGN="top">
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
47 </TR>
48</TABLE>
49</TD>
50<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
51<b>Bouncy Castle Cryptography Library 1.45</b></EM>
52</TD>
53</TR>
54
55<TR>
56<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57 <A HREF="../../../../org/bouncycastle/crypto/engines/RSABlindedEngine.html" title="class in org.bouncycastle.crypto.engines"><B>PREV CLASS</B></A>
58 <A HREF="../../../../org/bouncycastle/crypto/engines/RSAEngine.html" title="class in org.bouncycastle.crypto.engines"><B>NEXT CLASS</B></A></FONT></TD>
59<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
60 <A HREF="../../../../index.html?org/bouncycastle/crypto/engines/RSABlindingEngine.html" target="_top"><B>FRAMES</B></A>
61 <A HREF="RSABlindingEngine.html" target="_top"><B>NO FRAMES</B></A>
62 <SCRIPT type="text/javascript">
63 <!--
64 if(window==top) {
65 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
66 }
67 //-->
68</SCRIPT>
69<NOSCRIPT>
70 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
71</NOSCRIPT>
72
73
74</FONT></TD>
75</TR>
76<TR>
77<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
81</TR>
82</TABLE>
83<A NAME="skip-navbar_top"></A>
84<!-- ========= END OF TOP NAVBAR ========= -->
85
86<HR>
87<!-- ======== START OF CLASS DATA ======== -->
88<H2>
89<FONT SIZE="-1">
90org.bouncycastle.crypto.engines</FONT>
91<BR>
92Class RSABlindingEngine</H2>
93<PRE>
94java.lang.Object
95 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.bouncycastle.crypto.engines.RSABlindingEngine</B>
96</PRE>
97<DL>
98<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../org/bouncycastle/crypto/AsymmetricBlockCipher.html" title="interface in org.bouncycastle.crypto">AsymmetricBlockCipher</A></DD>
99</DL>
100<HR>
101<DL>
102<DT><PRE>public class <B>RSABlindingEngine</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../org/bouncycastle/crypto/AsymmetricBlockCipher.html" title="interface in org.bouncycastle.crypto">AsymmetricBlockCipher</A></DL>
103</PRE>
104
105<P>
106This does your basic RSA Chaum's blinding and unblinding as outlined in
107 "Handbook of Applied Cryptography", page 475. You need to use this if you are
108 trying to get another party to generate signatures without them being aware
109 of the message they are signing.
110<P>
111
112<P>
113<HR>
114
115<P>
116
117<!-- ======== CONSTRUCTOR SUMMARY ======== -->
118
119<A NAME="constructor_summary"><!-- --></A>
120<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
121<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
122<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
123<B>Constructor Summary</B></FONT></TH>
124</TR>
125<TR BGCOLOR="white" CLASS="TableRowColor">
126<TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/engines/RSABlindingEngine.html#RSABlindingEngine()">RSABlindingEngine</A></B>()</CODE>
127
128<BR>
129 </TD>
130</TR>
131</TABLE>
132
133<!-- ========== METHOD SUMMARY =========== -->
134
135<A NAME="method_summary"><!-- --></A>
136<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
137<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
138<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
139<B>Method Summary</B></FONT></TH>
140</TR>
141<TR BGCOLOR="white" CLASS="TableRowColor">
142<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
143<CODE> int</CODE></FONT></TD>
144<TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/engines/RSABlindingEngine.html#getInputBlockSize()">getInputBlockSize</A></B>()</CODE>
145
146<BR>
147 Return the maximum size for an input block to this engine.</TD>
148</TR>
149<TR BGCOLOR="white" CLASS="TableRowColor">
150<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
151<CODE> int</CODE></FONT></TD>
152<TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/engines/RSABlindingEngine.html#getOutputBlockSize()">getOutputBlockSize</A></B>()</CODE>
153
154<BR>
155 Return the maximum size for an output block to this engine.</TD>
156</TR>
157<TR BGCOLOR="white" CLASS="TableRowColor">
158<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
159<CODE> void</CODE></FONT></TD>
160<TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/engines/RSABlindingEngine.html#init(boolean, org.bouncycastle.crypto.CipherParameters)">init</A></B>(boolean forEncryption,
161 <A HREF="../../../../org/bouncycastle/crypto/CipherParameters.html" title="interface in org.bouncycastle.crypto">CipherParameters</A> param)</CODE>
162
163<BR>
164 Initialise the blinding engine.</TD>
165</TR>
166<TR BGCOLOR="white" CLASS="TableRowColor">
167<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
168<CODE> byte[]</CODE></FONT></TD>
169<TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/engines/RSABlindingEngine.html#processBlock(byte[], int, int)">processBlock</A></B>(byte[] in,
170 int inOff,
171 int inLen)</CODE>
172
173<BR>
174 Process a single block using the RSA blinding algorithm.</TD>
175</TR>
176</TABLE>
177 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
178<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
179<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
180<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
181</TR>
182<TR BGCOLOR="white" CLASS="TableRowColor">
183<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
184</TR>
185</TABLE>
186
187<P>
188
189<!-- ========= CONSTRUCTOR DETAIL ======== -->
190
191<A NAME="constructor_detail"><!-- --></A>
192<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
193<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
194<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
195<B>Constructor Detail</B></FONT></TH>
196</TR>
197</TABLE>
198
199<A NAME="RSABlindingEngine()"><!-- --></A><H3>
200RSABlindingEngine</H3>
201<PRE>
202public <B>RSABlindingEngine</B>()</PRE>
203<DL>
204</DL>
205
206<!-- ============ METHOD DETAIL ========== -->
207
208<A NAME="method_detail"><!-- --></A>
209<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
210<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
211<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
212<B>Method Detail</B></FONT></TH>
213</TR>
214</TABLE>
215
216<A NAME="init(boolean, org.bouncycastle.crypto.CipherParameters)"><!-- --></A><H3>
217init</H3>
218<PRE>
219public void <B>init</B>(boolean forEncryption,
220 <A HREF="../../../../org/bouncycastle/crypto/CipherParameters.html" title="interface in org.bouncycastle.crypto">CipherParameters</A> param)</PRE>
221<DL>
222<DD>Initialise the blinding engine.
223<P>
224<DD><DL>
225<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/AsymmetricBlockCipher.html#init(boolean, org.bouncycastle.crypto.CipherParameters)">init</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/AsymmetricBlockCipher.html" title="interface in org.bouncycastle.crypto">AsymmetricBlockCipher</A></CODE></DL>
226</DD>
227<DD><DL>
228<DT><B>Parameters:</B><DD><CODE>forEncryption</CODE> - true if we are encrypting (blinding), false otherwise.<DD><CODE>param</CODE> - the necessary RSA key parameters.</DL>
229</DD>
230</DL>
231<HR>
232
233<A NAME="getInputBlockSize()"><!-- --></A><H3>
234getInputBlockSize</H3>
235<PRE>
236public int <B>getInputBlockSize</B>()</PRE>
237<DL>
238<DD>Return the maximum size for an input block to this engine.
239 For RSA this is always one byte less than the key size on
240 encryption, and the same length as the key size on decryption.
241<P>
242<DD><DL>
243<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/AsymmetricBlockCipher.html#getInputBlockSize()">getInputBlockSize</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/AsymmetricBlockCipher.html" title="interface in org.bouncycastle.crypto">AsymmetricBlockCipher</A></CODE></DL>
244</DD>
245<DD><DL>
246
247<DT><B>Returns:</B><DD>maximum size for an input block.</DL>
248</DD>
249</DL>
250<HR>
251
252<A NAME="getOutputBlockSize()"><!-- --></A><H3>
253getOutputBlockSize</H3>
254<PRE>
255public int <B>getOutputBlockSize</B>()</PRE>
256<DL>
257<DD>Return the maximum size for an output block to this engine.
258 For RSA this is always one byte less than the key size on
259 decryption, and the same length as the key size on encryption.
260<P>
261<DD><DL>
262<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/AsymmetricBlockCipher.html#getOutputBlockSize()">getOutputBlockSize</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/AsymmetricBlockCipher.html" title="interface in org.bouncycastle.crypto">AsymmetricBlockCipher</A></CODE></DL>
263</DD>
264<DD><DL>
265
266<DT><B>Returns:</B><DD>maximum size for an output block.</DL>
267</DD>
268</DL>
269<HR>
270
271<A NAME="processBlock(byte[], int, int)"><!-- --></A><H3>
272processBlock</H3>
273<PRE>
274public byte[] <B>processBlock</B>(byte[] in,
275 int inOff,
276 int inLen)</PRE>
277<DL>
278<DD>Process a single block using the RSA blinding algorithm.
279<P>
280<DD><DL>
281<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/AsymmetricBlockCipher.html#processBlock(byte[], int, int)">processBlock</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/AsymmetricBlockCipher.html" title="interface in org.bouncycastle.crypto">AsymmetricBlockCipher</A></CODE></DL>
282</DD>
283<DD><DL>
284<DT><B>Parameters:</B><DD><CODE>in</CODE> - the input array.<DD><CODE>inOff</CODE> - the offset into the input buffer where the data starts.<DD><CODE>inLen</CODE> - the length of the data to be processed.
285<DT><B>Returns:</B><DD>the result of the RSA process.
286<DT><B>Throws:</B>
287<DD><CODE><A HREF="../../../../org/bouncycastle/crypto/DataLengthException.html" title="class in org.bouncycastle.crypto">DataLengthException</A></CODE> - the input block is too large.</DL>
288</DD>
289</DL>
290<!-- ========= END OF CLASS DATA ========= -->
291<HR>
292
293
294<!-- ======= START OF BOTTOM NAVBAR ====== -->
295<A NAME="navbar_bottom"><!-- --></A>
296<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
297<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
298<TR>
299<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
300<A NAME="navbar_bottom_firstrow"><!-- --></A>
301<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
302 <TR ALIGN="center" VALIGN="top">
303 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
304 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
305 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
306 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
307 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
308 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
309 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
310 </TR>
311</TABLE>
312</TD>
313<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
314<b>Bouncy Castle Cryptography Library 1.45</b></EM>
315</TD>
316</TR>
317
318<TR>
319<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
320 <A HREF="../../../../org/bouncycastle/crypto/engines/RSABlindedEngine.html" title="class in org.bouncycastle.crypto.engines"><B>PREV CLASS</B></A>
321 <A HREF="../../../../org/bouncycastle/crypto/engines/RSAEngine.html" title="class in org.bouncycastle.crypto.engines"><B>NEXT CLASS</B></A></FONT></TD>
322<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
323 <A HREF="../../../../index.html?org/bouncycastle/crypto/engines/RSABlindingEngine.html" target="_top"><B>FRAMES</B></A>
324 <A HREF="RSABlindingEngine.html" target="_top"><B>NO FRAMES</B></A>
325 <SCRIPT type="text/javascript">
326 <!--
327 if(window==top) {
328 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
329 }
330 //-->
331</SCRIPT>
332<NOSCRIPT>
333 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
334</NOSCRIPT>
335
336
337</FONT></TD>
338</TR>
339<TR>
340<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
341 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
342<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
343DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
344</TR>
345</TABLE>
346<A NAME="skip-navbar_bottom"></A>
347<!-- ======== END OF BOTTOM NAVBAR ======= -->
348
349<HR>
350
351</BODY>
352</HTML>