/usr/share/why/javacard_api/javacard/security/RSAPublicKey.java is in why 2.34-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | /*
* Copyright (c) 1999 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the confidential and proprietary information of Sun
* Microsystems, Inc. ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with Sun.
*
* SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
* SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
* SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
* THIS SOFTWARE OR ITS DERIVATIVES.
*/
/*
// $Workfile: RSAPublicKey.java $
// $Revision: 1.2 $
// $Date: 2009-11-25 10:47:13 $
// $Author: marche $
// $Archive: /Products/Europa/api21/javacard/security/RSAPublicKey.java $
// $Modtime: 5/02/00 7:13p $
// Original author: Andy
// */
package javacard.security;
/**
* The <code>RSAPublicKey</code> is used to verify signatures on signed data using the RSA algorithm.
* It may also used by the <code>javacardx.crypto.Cipher</code> class to encrypt/decrypt messages.
* <p>When both the modulus and exponent of the key are set, the key is
* initialized and ready for use.
* @see RSAPrivateKey
* @see RSAPrivateCrtKey
* @see KeyBuilder
* @see Signature
* @see javacardx.crypto.Cipher
* @see javacardx.crypto.KeyEncryption
*/
public interface RSAPublicKey extends PublicKey{
/**
* Sets the modulus value of the key.
* The plaintext data format is big-endian and right-aligned (the least significant bit is the least significant
* bit of last byte). Input modulus data is copied into the internal representation.
* @param buffer the input buffer
* @param offset the offset into the input buffer at which the modulus value begins
* @param length the byte length of the modulus
* @exception CryptoException with the following reason code:<ul>
* <li><code>CryptoException.ILLEGAL_VALUE</code> if the input modulus data length is inconsistent
* with the implementation or if input data decryption is required and fails.
* </ul>
* <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 modulus value is decrypted using the </em><code>Cipher</code><em> object.</em>
* </ul>
*/
void setModulus( byte[] buffer, short offset, short length) throws CryptoException;
/**
* Sets the public exponent value of the key.
* The plaintext data format is big-endian and right-aligned (the least significant bit is the least significant
* bit of last byte). Input exponent data is copied into the internal representation.
* @param buffer the input buffer
* @param offset the offset into the input buffer at which the exponent value begins
* @param length the byte length of the exponent
* @exception CryptoException with the following reason code:<ul>
* <li><code>CryptoException.ILLEGAL_VALUE</code> if the input exponent data length is inconsistent
* with the implementation or if input data decryption is required and fails.
* </ul>
* <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 exponent value is decrypted using the </em><code>Cipher</code><em> object.</em>
* </ul>
*/
void setExponent( byte[] buffer, short offset, short length) throws CryptoException;
/**
* Returns the modulus value of the key in plain text.
* The data format is big-endian and right-aligned (the least significant bit is the least significant
* bit of last byte).
* @param buffer the output buffer
* @param offset the offset into the input buffer at which the modulus value starts
* @return the byte length of the modulus value returned
*/
short getModulus( byte[] buffer, short offset );
/**
* Returns the private exponent value of the key in plain text.
* The data format is big-endian and right-aligned (the least significant bit is the least significant
* bit of last byte).
* @param buffer the output buffer
* @param offset the offset into the output buffer at which the exponent value begins
* @return the byte length of the public exponent returned
*/
short getExponent( byte[] buffer, short offset );
}
|