⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rsaprivatecrtkey.html

📁 JAVA CARD 开发包规格说明,版本为2.2.2
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_02) on Wed Mar 22 19:19:11 PST 2006 --><TITLE>RSAPrivateCrtKey (Java Card API and Subsets)</TITLE><META NAME="keywords" CONTENT="javacard.security.RSAPrivateCrtKey interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="RSAPrivateCrtKey (Java Card API and Subsets)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/RSAPrivateCrtKey.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java Card </b><br><font size="-1">v2.2.2</font></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../javacard/security/RandomData.html" title="class in javacard.security"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javacard/security/RSAPrivateKey.html" title="interface in javacard.security"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html?javacard/security/RSAPrivateCrtKey.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="RSAPrivateCrtKey.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javacard.security</FONT><BR>Interface RSAPrivateCrtKey</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../javacard/security/Key.html" title="interface in javacard.security">Key</A>, <A HREF="../../javacard/security/PrivateKey.html" title="interface in javacard.security">PrivateKey</A></DD></DL><HR><DL><DT><PRE>public interface <B>RSAPrivateCrtKey</B><DT>extends <A HREF="../../javacard/security/PrivateKey.html" title="interface in javacard.security">PrivateKey</A></DL></PRE><P>The <code>RSAPrivateCrtKey</code> interface is used to sign data using the RSA algorithm in its Chinese Remainder Theorem form. It may also be used by the <code>javacardx.crypto.Cipher</code> class to encrypt/decrypt messages. <p> Let <I>S</I> = <I>m</I><SUP><I>d</I></SUP> mod <I>n</I>, where <I>m</I> is the data to be signed, <I>d</I> is the private key exponent, and <I>n</I> is private key modulus composed of two prime numbers <I>p</I> and <I>q</I>. The following names are used in the initializer methods in this interface: <ul> <li>P, the prime factor <I>p</I></li> <li>Q, the prime factor <I>q</I></li> <li>PQ = <I>q</I><SUP>-1</SUP> mod <I>p</I></li> <li>DP1 = <I>d</I> mod (<I>p</I> - 1)</li> <li>DQ1 = <I>d</I> mod (<I>q</I> - 1)</li> </ul> <p>When all five components (P,Q,PQ,DP1,DQ1) of the key are set, the key is initialized and ready for use.<P><P><DL><DT><B>See Also:</B><DD><A HREF="../../javacard/security/RSAPrivateKey.html" title="interface in javacard.security"><CODE>RSAPrivateKey</CODE></A>, <A HREF="../../javacard/security/RSAPublicKey.html" title="interface in javacard.security"><CODE>RSAPublicKey</CODE></A>, <A HREF="../../javacard/security/KeyBuilder.html" title="class in javacard.security"><CODE>KeyBuilder</CODE></A>, <A HREF="../../javacard/security/Signature.html" title="class in javacard.security"><CODE>Signature</CODE></A>, <A HREF="../../javacardx/crypto/Cipher.html" title="class in javacardx.crypto"><CODE>javacardx.crypto.Cipher</CODE></A>, <A HREF="../../javacardx/crypto/KeyEncryption.html" title="interface in javacardx.crypto"><CODE>javacardx.crypto.KeyEncryption</CODE></A></DL><HR><P><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;short</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/RSAPrivateCrtKey.html#getDP1(byte[], short)">getDP1</A></B>(byte[]&nbsp;buffer,       short&nbsp;offset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the DP1 parameter in plain text.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;short</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/RSAPrivateCrtKey.html#getDQ1(byte[], short)">getDQ1</A></B>(byte[]&nbsp;buffer,       short&nbsp;offset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the DQ1 parameter in plain text.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;short</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/RSAPrivateCrtKey.html#getP(byte[], short)">getP</A></B>(byte[]&nbsp;buffer,     short&nbsp;offset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the P parameter in plain text.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;short</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/RSAPrivateCrtKey.html#getPQ(byte[], short)">getPQ</A></B>(byte[]&nbsp;buffer,      short&nbsp;offset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the PQ parameter in plain text.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;short</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/RSAPrivateCrtKey.html#getQ(byte[], short)">getQ</A></B>(byte[]&nbsp;buffer,     short&nbsp;offset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the Q parameter in plain text.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/RSAPrivateCrtKey.html#setDP1(byte[], short, short)">setDP1</A></B>(byte[]&nbsp;buffer,       short&nbsp;offset,       short&nbsp;length)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the DP1 parameter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/RSAPrivateCrtKey.html#setDQ1(byte[], short, short)">setDQ1</A></B>(byte[]&nbsp;buffer,       short&nbsp;offset,       short&nbsp;length)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the DQ1 parameter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/RSAPrivateCrtKey.html#setP(byte[], short, short)">setP</A></B>(byte[]&nbsp;buffer,     short&nbsp;offset,     short&nbsp;length)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the P parameter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/RSAPrivateCrtKey.html#setPQ(byte[], short, short)">setPQ</A></B>(byte[]&nbsp;buffer,      short&nbsp;offset,      short&nbsp;length)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the PQ parameter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/RSAPrivateCrtKey.html#setQ(byte[], short, short)">setQ</A></B>(byte[]&nbsp;buffer,     short&nbsp;offset,     short&nbsp;length)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the Q parameter.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_javacard.security.Key"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from interface javacard.security.<A HREF="../../javacard/security/Key.html" title="interface in javacard.security">Key</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../javacard/security/Key.html#clearKey()">clearKey</A>, <A HREF="../../javacard/security/Key.html#getSize()">getSize</A>, <A HREF="../../javacard/security/Key.html#getType()">getType</A>, <A HREF="../../javacard/security/Key.html#isInitialized()">isInitialized</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="setP(byte[], short, short)"><!-- --></A><H3>setP</H3><PRE>void <B>setP</B>(byte[]&nbsp;buffer,          short&nbsp;offset,          short&nbsp;length)          throws <A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></PRE><DL><DD>Sets the value of the P parameter. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). Input P parameter data is copied into the internal representation. <p>Note:<ul> <li><em>If the key object implements the </em><code>javacardx.crypto.KeyEncryption</code><em> interface and the </em><code>Cipher</code><em> object specified via </em><code>setKeyCipher()</code><em> is not </em><code>null</code><em>, the P parameter value is decrypted using the </em><code>Cipher</code><em> object.</em> </ul><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the input buffer<DD><CODE>offset</CODE> - the offset into the input buffer at which the parameter value begins<DD><CODE>length</CODE> - the length of the parameter<DT><B>Throws:</B><DD><CODE><A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></CODE> - with the following reason code:<ul> <li><code>CryptoException.ILLEGAL_VALUE</code> if the input parameter data length is inconsistent with the implementation or if input data decryption is required and fails. </ul></DL></DD></DL><HR><A NAME="setQ(byte[], short, short)"><!-- --></A><H3>setQ</H3><PRE>void <B>setQ</B>(byte[]&nbsp;buffer,          short&nbsp;offset,          short&nbsp;length)          throws <A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></PRE><DL><DD>Sets the value of the Q parameter. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). Input Q parameter data is copied into the internal representation. <p>Note:<ul> <li><em>If the key object implements the </em><code>javacardx.crypto.KeyEncryption</code><em> interface and the </em><code>Cipher</code><em> object specified via </em><code>setKeyCipher()</code><em> is not </em><code>null</code><em>, the Q parameter value is decrypted using the </em><code>Cipher</code><em> object.</em> </ul><P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -