Kind: global class
this: {RSA}
Creates an instance of RSA
Convert byte array to hex string
Kind: static method of RSA
Returns: s hex string
this: {RSA}
Param | Description |
---|---|
b | byte array |
Convert byte array to string
Kind: static method of RSA
Returns: s string
this: {RSA}
Param | Description |
---|---|
b | byte array |
Convert a string to byte array
Kind: static method of RSA
Returns: b byte array
this: {RSA}
Param | Description |
---|---|
s | string |
General purpose hash function
Kind: static method of RSA
Returns: R hash value
this: {RSA}
Param | Description |
---|---|
sha | is the hash type |
A | byte array |
n | Integer |
RSA Key Pair Generator
Kind: static method of RSA
this: {RSA}
Param | Description |
---|---|
rng | is a pointer to a cryptographically secure random number generator |
e | the encryption exponent |
PRIV | the output RSA private key |
PUB | the output RSA public key |
PKCS V1.5 padding of a message prior to RSA signature
Kind: static method of RSA
Returns: true or false
this: {RSA}
Param | Description |
---|---|
rng | is a pointer to a cryptographically secure random number generator |
e | the encryption exponent |
PRIV | the output RSA private key |
PUB | the output RSA public key |
OAEP padding of a message prior to RSA encryption
Kind: static method of RSA
Returns: f is the output encoding, ready for RSA encryption
this: {RSA}
Param | Description |
---|---|
sha | is the hash type |
m | is the input message |
rng | is a pointer to a cryptographically secure random number generator |
P | are input encoding parameter string (could be NULL) |
OAEP unpadding of a message after RSA decryption
Kind: static method of RSA
Returns: r is the unpadded message
this: {RSA}
Param | Description |
---|---|
sha | is the hash type |
P | are input encoding parameter string (could be NULL) |
f | is the padded message |
Destroy an RSA private Key
Kind: static method of RSA
this: {RSA}
Param | Description |
---|---|
PRIV | the input RSA private key. Destroyed on output. |
RSA encryption of suitably padded plaintext
Kind: static method of RSA
this: {RSA}
Param | Description |
---|---|
PUB | the input RSA public key |
F | is input padded message |
G | is the output ciphertext |
RSA decryption of ciphertext
Kind: static method of RSA
this: {RSA}
Param | Description |
---|---|
PRIV | the input RSA private key |
G | is the input ciphertext |
F | is output plaintext (requires unpadding) |
Kind: global class
this: {rsa_private_key}
Creates an instance of rsa_private_key
Param | Description |
---|---|
n | FF length |
Kind: global class
this: {rsa_private_key}
Creates an instance of rsa_public_key
Param | Description |
---|---|
m | FF length |