|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--de.flexiprovider.core.rsa.PKCS1Operations
| Method Summary | |
static byte[] |
EME_OAEP_DECODE(byte[] EM,
byte[] L,
int k,
MessageDigest md)
EME-OAEP decoding as specified in PKCS#1 v2.1, section 7.1.2, step 3 |
static byte[] |
EME_OAEP_ENCODE(byte[] M,
byte[] L,
int k,
MessageDigest md,
SecureRandom prng)
EME-OAEP encoding as specified in PKCS#1 v2.1, section 7.1.1, step 2 |
static byte[] |
EMSA_PKCS1_v1_5_ENCODE(byte[] H,
int emLen,
AlgorithmIdentifier aid)
This encoding method is deterministic and does not have an equivalent decoding function. |
static byte[] |
EMSA_PSS_ENCODE(byte[] M,
int emBits,
MessageDigest md,
byte[] salt)
|
static boolean |
EMSA_PSS_VERIFY(byte[] M,
byte[] EM,
int emBits,
MessageDigest md)
This encoding method is parameterized by the choice of hash function, mask generation function, and salt length. |
static byte[] |
I2OSP(FlexiBigInt x,
int xLen)
Converts a nonnegative integer to an octet string of specified length. |
static byte[] |
MGF1(byte[] seed,
int length,
MessageDigest md)
Mask generation function MGF1 as specified in PKCS#1, section B.2 Coincides with mask generation functions specified in IEEE Standard 1363 and ANSI X9.44 (draft). |
static FlexiBigInt |
OS2IP(byte[] X)
Converts an octet string to a nonnegative integer. |
protected static FlexiBigInt |
RSADP(RSAPrivateKey privKey,
FlexiBigInt c)
RSA decryption primitive RSADP as specified in PKCS#1, section 5.1.1 No multiprime support. |
protected static FlexiBigInt |
RSAEP(RSAPublicKey pubKey,
FlexiBigInt m)
RSA encryption primitive RSAEP. |
| Methods inherited from class java.lang.Object |
|
| Method Detail |
public static byte[] I2OSP(FlexiBigInt x,
int xLen)
throws PKCS1Exception
x - nonnegative integer to be convertedxLen - intended maximum length of the resulting octet string or 0
if arbitrary length is allowed. if xLen != 0, the
resulting octet string will be padded with leading zeros.public static FlexiBigInt OS2IP(byte[] X)
X - octet string to be converted
protected static FlexiBigInt RSAEP(RSAPublicKey pubKey,
FlexiBigInt m)
throws PKCS1Exception
pubKey - the public RSA keym - message to be encrypted (RSAEP) or signature to be
verified (RSAVP1)
protected static FlexiBigInt RSADP(RSAPrivateKey privKey,
FlexiBigInt c)
throws PKCS1Exception
privKey - the private RSA keyc - ciphertext to be decrypted (RSADP) or plaintext be
signed (RSASP1)
public static byte[] EME_OAEP_ENCODE(byte[] M,
byte[] L,
int k,
MessageDigest md,
SecureRandom prng)
L - a label, optional. pass null if label empty.M - message to be encodedk - the encoding lengthmd - message digest that will be used for hashing the messageprng - source of cryptographically secure pseudo-randomness
public static byte[] EME_OAEP_DECODE(byte[] EM,
byte[] L,
int k,
MessageDigest md)
throws PKCS1Exception
EM - the encoded messageL - a label, optional. pass null if not required.k - the encoding lengthmd - the message digest
public static byte[] EMSA_PSS_ENCODE(byte[] M,
int emBits,
MessageDigest md,
byte[] salt)
throws PKCS1Exception
public static boolean EMSA_PSS_VERIFY(byte[] M,
byte[] EM,
int emBits,
MessageDigest md)
M - the messageEM - the encoded messageemBits - the bit length of the encoded messagemd - the message digest
public static byte[] EMSA_PKCS1_v1_5_ENCODE(byte[] H,
int emLen,
AlgorithmIdentifier aid)
throws PKCS1Exception
H - hash value of the message to be encoded (deviant from
specification)emLen - intended length in octets of the encoded message at least
tLen+11, where tLen is the octet length of the DER
encoding T of a certain value computed during the encoding
operation.aid - Algorithm identifier of the message digest algorithm used
for hashing the message.
public static byte[] MGF1(byte[] seed,
int length,
MessageDigest md)
seed - the seedlength - the intended output lengthmd - the message digest
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||