Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## opencard.opt.security
Class RSAPrivateKey

    java.lang.Object
      opencard.opt.security.RSAPrivateKey

All Implemented Interfaces:
  java.io.Serializable, java.security.Key, java.security.PrivateKey

    public class RSAPrivateKey

extends java.lang.Object
implements java.security.PrivateKey

Contains an RSA private key. Implements interface java.security.PrivateKey. For an alternative class that allows signing via the chinese remainder's algorithm see RSACRTKey. In this package OpenCard provides key classes for common algorithms like RSA, DSA (or DES) that each concrete card service implementing a card service interface should support instead of defining its own key classes. Only for new PKA algorithms that OpenCard does not yet support a card service may define its own key classes.

Version:
  $Id: RSAPrivateKey.java,v 1.2 1999/10/20 13:15:00 damke Exp $
Author:
  Michael Baentsch (mib@zurich.ibm.com)
See Also:
  `PrivateKey`, `RSACRTKey`, Serialized Form

Field Summary
`protected java.math.BigInteger` | `e_` Exponent
`protected int` | `inputLength_` input data length
`protected int` | `keyLength_` Key length (in bits)
`protected java.math.BigInteger` | `m_` Modulus
`protected int` | `outputLength_` output data length

Fields inherited from interface java.security.PrivateKey
`serialVersionUID`

Constructor Summary
`RSAPrivateKey(java.math.BigInteger e, java.math.BigInteger m)` Produce an `RSAPrivateKey` from the given byte arrays.
`RSAPrivateKey(byte[] m, byte[] e, int inputLength, int outputLength, int keyLength)` Produce an `RSAPrivateKey` from the given byte arrays.

Method Summary
`java.lang.String` | `getAlgorithm()` Conformance to the java.security interface
`byte[]` | `getEncoded()` Conformance to the java.security interface
`java.lang.String` | `getFormat()` Conformance to the java.security interface
`int` | `getInputLength()` Returns the number of bytes to be input into a signing operation with this key.
`int` | `maxOutputLength()` Returns the number of bytes to be generated by a signing operation with this key.
`java.math.BigInteger` | `modulus()` Return modulus of this key.
`java.math.BigInteger` | `privateExponent()` Return Private exponent.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### m_

    protected java.math.BigInteger m_

  Modulus

### e_

    protected java.math.BigInteger e_

  Exponent

### inputLength_

    protected int inputLength_

  input data length

### outputLength_

    protected int outputLength_

  output data length

### keyLength_

    protected int keyLength_

  Key length (in bits)

Constructor Detail

### RSAPrivateKey

    public RSAPrivateKey(byte[] m,
                         byte[] e,
                         int inputLength,
                         int outputLength,
                         int keyLength)

  Produce an `RSAPrivateKey` from the given byte arrays.

  Parameters:
    `m` - Modulus
    `e` - private exponent
    `inputLength` - Number of bytes accepted for input to signature routine.
    `outputLength` - Number of bytes produced by signature routine.
    `keyLength` - The nominal size of the key in bits.

### RSAPrivateKey

    public RSAPrivateKey(java.math.BigInteger e,
                         java.math.BigInteger m)

  Produce an `RSAPrivateKey` from the given byte arrays.

  Parameters:
    `m` - Modulus
    `e` - private exponent

Method Detail

### getAlgorithm

    public java.lang.String getAlgorithm()

  Conformance to the java.security interface

  Specified by:
    `getAlgorithm` in interface `java.security.Key`
  See Also:
    `PrivateKey`

### getEncoded

    public byte[] getEncoded()

  Conformance to the java.security interface

  Specified by:
    `getEncoded` in interface `java.security.Key`
  See Also:
    `PrivateKey`

### getFormat

    public java.lang.String getFormat()

  Conformance to the java.security interface

  Specified by:
    `getFormat` in interface `java.security.Key`
  See Also:
    `PrivateKey`

### getInputLength

    public int getInputLength()

  Returns the number of bytes to be input into a signing operation with this key.

  Returns:
    Input data length.

### maxOutputLength

    public int maxOutputLength()

  Returns the number of bytes to be generated by a signing operation with this key.

  Returns:
    Output data length.

### modulus

    public java.math.BigInteger modulus()

  Return modulus of this key.

  Returns:
    Modulus of this key

### privateExponent

    public java.math.BigInteger privateExponent()

  Return Private exponent.

  Returns:
    Private exponent of this key

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD