Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
getLength () | |
withHash ($hash) | |
withMGFHash ($hash) | |
getMGFHash () | |
withSaltLength ($sLen) | |
getSaltLength () | |
withLabel ($label) | |
getLabel () | |
withPadding ($padding) | |
getPadding () | |
getEngine () | |
Fonctions membres publiques hérités de AsymmetricKey | |
toString ($type, array $options=[]) | |
getLoadedFormat () | |
getComment () | |
__toString () | |
withHash ($hash) | |
getHash () | |
Fonctions membres publiques statiques | |
static | setExponent ($val) |
static | setSmallestPrime ($val) |
static | setOpenSSLConfigPath ($val) |
static | enableBlinding () |
static | disableBlinding () |
Fonctions membres publiques statiques hérités de AsymmetricKey | |
static | load ($key, $password=false) |
static | loadPrivateKey ($key, $password='') |
static | loadPublicKey ($key) |
static | loadParameters ($key) |
static | loadFormat ($type, $key, $password=false) |
static | loadPrivateKeyFormat ($type, $key, $password=false) |
static | loadPublicKeyFormat ($type, $key) |
static | loadParametersFormat ($type, $key) |
static | getSupportedKeyFormats () |
static | addFileFormat ($fullname) |
static | useBestEngine () |
static | useInternalEngine () |
Champs de données | |
const | ALGORITHM = 'RSA' |
const | ENCRYPTION_OAEP = 1 |
const | ENCRYPTION_PKCS1 = 2 |
const | ENCRYPTION_NONE = 4 |
const | SIGNATURE_PSS = 16 |
const | SIGNATURE_RELAXED_PKCS1 = 32 |
const | SIGNATURE_PKCS1 = 64 |
Fonctions membres protégées | |
__construct () | |
i2osp ($x, $xLen) | |
os2ip ($x) | |
emsa_pkcs1_v1_5_encode ($m, $emLen) | |
emsa_pkcs1_v1_5_encode_without_null ($m, $emLen) | |
mgf1 ($mgfSeed, $maskLen) | |
Fonctions membres protégées hérités de AsymmetricKey | |
__construct () | |
computek ($h1) | |
bits2int ($in) | |
Fonctions membres protégées statiques | |
static | onLoad ($components) |
static | initialize_static_variables () |
Fonctions membres protégées statiques hérités de AsymmetricKey | |
static | initialize_static_variables () |
static | validatePlugin ($format, $type, $method=null) |
Attributs protégés | |
$encryptionPadding = self::ENCRYPTION_OAEP | |
$signaturePadding = self::SIGNATURE_PSS | |
$hLen | |
$sLen | |
$label = '' | |
$mgfHash | |
$mgfHLen | |
$modulus | |
$k | |
$exponent | |
Attributs protégés hérités de AsymmetricKey | |
$format | |
$hash | |
Attributs protégés statiques | |
static | $enableBlinding = true |
static | $configFile |
Attributs protégés statiques hérités de AsymmetricKey | |
static | $zero |
static | $one |
static | $engines = [] |
Attributs privés statiques | |
static | $defaultExponent = 65537 |
static | $smallestPrime = 4096 |
|
protected |
Constructor
PublicKey and PrivateKey objects can only be created from abstract RSA class
Références Symfony\Contracts\Service\__construct().
|
static |
Disable RSA Blinding
public
|
protected |
EMSA-PKCS1-V1_5-ENCODE
See RFC3447#section-9.2.
private
string | $m | |
int | $emLen |
Référencé par PrivateKey\rsassa_pkcs1_v1_5_sign(), et PublicKey\rsassa_pkcs1_v1_5_verify().
|
protected |
EMSA-PKCS1-V1_5-ENCODE (without NULL)
Quoting https://tools.ietf.org/html/rfc8017#page-65,
"The parameters field associated with id-sha1, id-sha224, id-sha256, id-sha384, id-sha512, id-sha512/224, and id-sha512/256 should generally be omitted, but if present, it shall have a value of type NULL"
private
string | $m | |
int | $emLen |
Référencé par PublicKey\rsassa_pkcs1_v1_5_verify().
|
static |
Enable RSA Blinding
public
getEngine | ( | ) |
Returns the current engine being used
OpenSSL is only used in this class (and it's subclasses) for key generation Even then it depends on the parameters you're using. It's not used for multi-prime RSA nor is it used if the key length is outside of the range supported by OpenSSL
getLabel | ( | ) |
getLength | ( | ) |
Returns the key size
More specifically, this returns the size of the modulo in bits.
public
getMGFHash | ( | ) |
getPadding | ( | ) |
getSaltLength | ( | ) |
Returns the salt length currently being used
public
Références RSA\$hLen, et null.
Référencé par PublicKey\toString(), et PrivateKey\toString().
|
protected |
Integer-to-Octet-String primitive
See RFC3447#section-4.1.
private
bool | \phpseclib3\Math\BigInteger | $x | |
int | $xLen |
Référencé par PrivateKey\raw_encrypt(), PublicKey\raw_encrypt(), PrivateKey\rsaes_oaep_decrypt(), PublicKey\rsaes_oaep_encrypt(), PrivateKey\rsaes_pkcs1_v1_5_decrypt(), PublicKey\rsaes_pkcs1_v1_5_encrypt(), PublicKey\rsassa_pkcs1_v1_5_relaxed_verify(), PrivateKey\rsassa_pkcs1_v1_5_sign(), PublicKey\rsassa_pkcs1_v1_5_verify(), PrivateKey\rsassa_pss_sign(), et PublicKey\rsassa_pss_verify().
|
staticprotected |
Initialize static variables
Références phpseclib3\Crypt\EC\Formats\Keys\initialize_static_variables().
|
protected |
MGF1
private
string | $mgfSeed | |
int | $maskLen |
Référencé par PrivateKey\emsa_pss_encode(), PublicKey\emsa_pss_verify(), PrivateKey\rsaes_oaep_decrypt(), et PublicKey\rsaes_oaep_encrypt().
|
staticprotected |
|
protected |
Octet-String-to-Integer primitive
See RFC3447#section-4.2.
private
string | $x |
Référencé par PrivateKey\raw_encrypt(), PublicKey\raw_encrypt(), PrivateKey\rsaes_oaep_decrypt(), PublicKey\rsaes_oaep_encrypt(), PrivateKey\rsaes_pkcs1_v1_5_decrypt(), PublicKey\rsaes_pkcs1_v1_5_encrypt(), PublicKey\rsassa_pkcs1_v1_5_relaxed_verify(), PrivateKey\rsassa_pkcs1_v1_5_sign(), PublicKey\rsassa_pkcs1_v1_5_verify(), PrivateKey\rsassa_pss_sign(), et PublicKey\rsassa_pss_verify().
|
static |
Sets the public exponent for key generation
This will be 65537 unless changed.
public
int | $val |
Références $val.
|
static |
Sets the OpenSSL config file path
Set to the empty string to use the default config file
public
string | $val |
Références $val.
|
static |
Sets the smallest prime number in bits. Used for key generation
This will be 4096 unless changed.
public
int | $val |
Références $val.
withHash | ( | $hash | ) |
Determines which hashing function should be used
Used with signature production / verification and (if the encryption mode is self::PADDING_OAEP) encryption and decryption.
public
string | $hash |
Références AsymmetricKey\$hash, et $this.
withLabel | ( | $label | ) |
Determines the label
Used by RSA::PADDING_OAEP
To quote from RFC3447#page-17:
Both the encryption and the decryption operations of RSAES-OAEP take the value of a label L as input. In this version of PKCS #1, L is the empty string; other uses of the label are outside the scope of this document.
public
string | $label |
Références RSA\$label, et $this.
withMGFHash | ( | $hash | ) |
Determines which hashing function should be used for the mask generation function
The mask generation function is used by self::PADDING_OAEP and self::PADDING_PSS and although it's best if Hash and MGFHash are set to the same thing this is not a requirement.
public
string | $hash |
Références AsymmetricKey\$hash, et $this.
Référencé par PublicKey\asPrivateKey(), et PrivateKey\getPublicKey().
withPadding | ( | $padding | ) |
Determines the padding modes
Example: $key->withPadding(RSA::ENCRYPTION_PKCS1 | RSA::SIGNATURE_PKCS1);
public
int | $padding |
Références RSA\$encryptionPadding, $selected, RSA\$signaturePadding, et $this.
withSaltLength | ( | $sLen | ) |
Determines the salt length
Used by RSA::PADDING_PSS
To quote from RFC3447#page-38:
Typical salt lengths in octets are hLen (the length of the output of the hash function Hash) and 0.
public
int | $sLen |
Références RSA\$sLen, et $this.
Référencé par PublicKey\asPrivateKey(), et PrivateKey\getPublicKey().
|
staticprotected |
|
staticprivate |
|
staticprotected |
|
protected |
Référencé par RSA\getPadding(), et RSA\withPadding().
|
protected |
Référencé par PublicKey\asPrivateKey().
|
protected |
Référencé par PrivateKey\emsa_pss_encode(), PublicKey\emsa_pss_verify(), et RSA\getSaltLength().
|
protected |
Référencé par PublicKey\asPrivateKey().
|
protected |
Référencé par RSA\getLabel(), et RSA\withLabel().
|
protected |
Référencé par RSA\getMGFHash().
|
protected |
|
protected |
Référencé par PublicKey\asPrivateKey(), OpenSSH\load(), et PuTTY\load().
|
protected |
Référencé par RSA\withPadding().
|
protected |
Référencé par PrivateKey\emsa_pss_encode(), PublicKey\emsa_pss_verify(), et RSA\withSaltLength().
|
staticprivate |
const ALGORITHM = 'RSA' |
const ENCRYPTION_NONE = 4 |
Do not use any padding
Although this method is not recommended it can none-the-less sometimes be useful if you're trying to decrypt some legacy stuff, if you're trying to diagnose why an encrypted message isn't decrypting, etc.
public
const ENCRYPTION_OAEP = 1 |
Use Optimal Asymmetric Encryption Padding (OAEP) for encryption / decryption.
Uses sha256 by default
const ENCRYPTION_PKCS1 = 2 |
Use PKCS#1 padding.
Although self::PADDING_OAEP / self::PADDING_PSS offers more security, including PKCS#1 padding is necessary for purposes of backwards compatibility with protocols (like SSH-1) written before OAEP's introduction.
public
const SIGNATURE_PKCS1 = 64 |
Use PKCS#1 padding for signature verification
Référencé par X509\getPublicKey(), SSH2\getServerPublicHostKey(), SSH2\privatekey_login(), X509\validateSignatureHelper(), et Identity\withPadding().
const SIGNATURE_PSS = 16 |
Use the Probabilistic Signature Scheme for signing
Uses sha256 and 0 as the salt length
Référencé par X509\formatSubjectPublicKey(), et X509\identifySignatureAlgorithm().
const SIGNATURE_RELAXED_PKCS1 = 32 |
Use a relaxed version of PKCS#1 padding for signature verification
Référencé par Identity\withPadding().