[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/ -> PrivateKey.php (summary)

RSA Private Key

Author: Jim Wigginton <[email protected]>
Copyright: 2015 Jim Wigginton
License: http://www.opensource.org/licenses/mit-license.html MIT License
File Size: 552 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

PrivateKey:: (14 methods):
  rsadp()
  rsasp1()
  exponentiate()
  blind()
  emsa_pss_encode()
  rsassa_pss_sign()
  rsassa_pkcs1_v1_5_sign()
  sign()
  rsaes_pkcs1_v1_5_decrypt()
  rsaes_oaep_decrypt()
  raw_encrypt()
  decrypt()
  getPublicKey()
  toString()


Class: PrivateKey  - X-Ref

Raw RSA Key Handler

rsadp($c)   X-Ref
RSADP

See {@link http://tools.ietf.org/html/rfc3447#section-5.1.2 RFC3447#section-5.1.2}.

param: \phpseclib3\Math\BigInteger $c
return: bool|\phpseclib3\Math\BigInteger

rsasp1($m)   X-Ref
RSASP1

See {@link http://tools.ietf.org/html/rfc3447#section-5.2.1 RFC3447#section-5.2.1}.

param: \phpseclib3\Math\BigInteger $m
return: bool|\phpseclib3\Math\BigInteger

exponentiate(BigInteger $x)   X-Ref
Exponentiate

param: \phpseclib3\Math\BigInteger $x
return: \phpseclib3\Math\BigInteger

blind($x, $r, $i)   X-Ref
Performs RSA Blinding

Protects against timing attacks by employing RSA Blinding.
Returns $x->modPow($this->exponents[$i], $this->primes[$i])

param: \phpseclib3\Math\BigInteger $x
param: \phpseclib3\Math\BigInteger $r
param: int $i
return: \phpseclib3\Math\BigInteger

emsa_pss_encode($m, $emBits)   X-Ref
EMSA-PSS-ENCODE

See {@link http://tools.ietf.org/html/rfc3447#section-9.1.1 RFC3447#section-9.1.1}.

param: string $m
param: int $emBits
return: string

rsassa_pss_sign($m)   X-Ref
RSASSA-PSS-SIGN

See {@link http://tools.ietf.org/html/rfc3447#section-8.1.1 RFC3447#section-8.1.1}.

param: string $m
return: bool|string

rsassa_pkcs1_v1_5_sign($m)   X-Ref
RSASSA-PKCS1-V1_5-SIGN

See {@link http://tools.ietf.org/html/rfc3447#section-8.2.1 RFC3447#section-8.2.1}.

param: string $m
return: bool|string

sign($message)   X-Ref
Create a signature

param: string $message
return: string

rsaes_pkcs1_v1_5_decrypt($c)   X-Ref
RSAES-PKCS1-V1_5-DECRYPT

See {@link http://tools.ietf.org/html/rfc3447#section-7.2.2 RFC3447#section-7.2.2}.

param: string $c
return: bool|string

rsaes_oaep_decrypt($c)   X-Ref
RSAES-OAEP-DECRYPT

See {@link http://tools.ietf.org/html/rfc3447#section-7.1.2 RFC3447#section-7.1.2}.  The fact that the error
messages aren't distinguishable from one another hinders debugging, but, to quote from RFC3447#section-7.1.2:

Note.  Care must be taken to ensure that an opponent cannot
distinguish the different error conditions in Step 3.g, whether by
error message or timing, or, more generally, learn partial
information about the encoded message EM.  Otherwise an opponent may
be able to obtain useful information about the decryption of the
ciphertext C, leading to a chosen-ciphertext attack such as the one
observed by Manger [36].

param: string $c
return: bool|string

raw_encrypt($m)   X-Ref
Raw Encryption / Decryption

Doesn't use padding and is not recommended.

param: string $m
return: bool|string

decrypt($ciphertext)   X-Ref
Decryption

param: string $ciphertext
return: bool|string

getPublicKey()   X-Ref
Returns the public key

return: mixed

toString($type, array $options = [])   X-Ref
Returns the private key

param: string $type
param: array $options optional
return: string



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer