Quadcap Embeddable Database

com.quadcap.crypto.RSAKey Class Reference

Inheritance diagram for com.quadcap.crypto.RSAKey:

com.quadcap.crypto.Key com.quadcap.crypto.RSAPrivateKey com.quadcap.crypto.RSAPublicKey List of all members.

Detailed Description

Implementation detail; factoring operations common to public and private RSA keys.

Author:
Stan Bailes

Definition at line 54 of file RSAKey.java.

Public Member Functions

void engine (ByteBuffer in, ByteBuffer out)
 Run the algorithm (encryption or decyption) on the specified buffers.

abstract void f (ByteBuffer src, ByteBuffer dst)
 The derived class actually implements this.

int blockSize ()

Protected Member Functions

void init (String text, int size, BigInteger n)
abstract BigInteger engine (BigInteger x)
 The derived class (public/private) implements this as appropriate.


Protected Attributes

BigInteger n

Package Functions

final Random getRandom ()
final void randomBytes (byte[] buf, int pos, int cnt)

Package Attributes

String text
Random random
int size
byte[] buf

Static Package Attributes

final BigInteger e = new BigInteger("3")


Member Function Documentation

int com.quadcap.crypto.RSAKey.blockSize  ) 
 

Implements com.quadcap.crypto.Key.

Definition at line 126 of file RSAKey.java.

References com.quadcap.crypto.RSAKey.size.

Referenced by com.quadcap.crypto.RSAKey.engine(), and com.quadcap.crypto.RSAKey.init().

abstract BigInteger com.quadcap.crypto.RSAKey.engine BigInteger  x  )  [protected, pure virtual]
 

The derived class (public/private) implements this as appropriate.

Implemented in com.quadcap.crypto.RSAPrivateKey, and com.quadcap.crypto.RSAPublicKey.

void com.quadcap.crypto.RSAKey.engine ByteBuffer  in,
ByteBuffer  out
 

Run the algorithm (encryption or decyption) on the specified buffers.

Definition at line 73 of file RSAKey.java.

References com.quadcap.crypto.RSAKey.blockSize(), com.quadcap.crypto.RSAKey.buf, and com.quadcap.crypto.RSAKey.engine().

Referenced by com.quadcap.crypto.RSAKey.engine().

abstract void com.quadcap.crypto.RSAKey.f ByteBuffer  src,
ByteBuffer  dst
[pure virtual]
 

The derived class actually implements this.

Implements com.quadcap.crypto.Key.

Implemented in com.quadcap.crypto.RSAPrivateKey, and com.quadcap.crypto.RSAPublicKey.

final Random com.quadcap.crypto.RSAKey.getRandom  )  [package]
 

Definition at line 113 of file RSAKey.java.

References com.quadcap.crypto.RSAKey.random.

Referenced by com.quadcap.crypto.RSAKey.randomBytes().

void com.quadcap.crypto.RSAKey.init String  text,
int  size,
BigInteger  n
[protected]
 

Definition at line 62 of file RSAKey.java.

References com.quadcap.crypto.RSAKey.blockSize(), and com.quadcap.crypto.RSAKey.init().

Referenced by com.quadcap.crypto.RSAKey.init().

final void com.quadcap.crypto.RSAKey.randomBytes byte[]  buf,
int  pos,
int  cnt
[package]
 

Definition at line 120 of file RSAKey.java.

References com.quadcap.crypto.RSAKey.getRandom(), and com.quadcap.crypto.RSAKey.randomBytes().

Referenced by com.quadcap.crypto.RSAKey.randomBytes().


Member Data Documentation

byte [] com.quadcap.crypto.RSAKey.buf [package]
 

Definition at line 60 of file RSAKey.java.

Referenced by com.quadcap.crypto.RSAKey.engine().

final BigInteger com.quadcap.crypto.RSAKey.e = new BigInteger("3") [static, package]
 

Definition at line 55 of file RSAKey.java.

BigInteger com.quadcap.crypto.RSAKey.n [protected]
 

Definition at line 56 of file RSAKey.java.

Random com.quadcap.crypto.RSAKey.random [package]
 

Definition at line 58 of file RSAKey.java.

Referenced by com.quadcap.crypto.RSAKey.getRandom().

int com.quadcap.crypto.RSAKey.size [package]
 

Definition at line 59 of file RSAKey.java.

Referenced by com.quadcap.crypto.RSAKey.blockSize().

String com.quadcap.crypto.RSAKey.text [package]
 

Definition at line 57 of file RSAKey.java.