!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/   drwxr-xr-x
Free 13.39 GB of 57.97 GB (23.1%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Base.php (4.44 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**
 * Curve methods common to all curves
 *
 * PHP version 5 and 7
 *
 * @category  Crypt
 * @package   EC
 * @author    Jim Wigginton <terrafrost@php.net>
 * @copyright 2017 Jim Wigginton
 * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
 * @link      http://pear.php.net/package/Math_BigInteger
 */

namespace phpseclib3\Crypt\EC\BaseCurves;

use 
phpseclib3\Math\Common\FiniteField;
use 
phpseclib3\Math\BigInteger;

/**
 * Base
 *
 * @package Prime
 * @author  Jim Wigginton <terrafrost@php.net>
 * @access  public
 */
abstract class Base
{
    
/**
     * Doubles
     *
     * @var object[]
     */
    
protected $doubles;

    
/**
     * NAF Points
     *
     * @var int[]
     */
    
private $naf;

    
/**
     * The Order
     *
     * @var BigInteger
     */
    
protected $order;

    
/**
     * Finite Field Integer factory
     *
     * @var \phpseclib3\Math\FiniteField\Integer
     */
    
protected $factory;

    
/**
     * Returns a random integer
     *
     * @return object
     */
    
public function randomInteger()
    {
        return 
$this->factory->randomInteger();
    }

    
/**
     * Converts a BigInteger to a FiniteField integer
     *
     * @return object
     */
    
public function convertInteger(BigInteger $x)
    {
        return 
$this->factory->newInteger($x);
    }

    
/**
     * Returns the length, in bytes, of the modulo
     *
     * @return integer
     */
    
public function getLengthInBytes()
    {
        return 
$this->factory->getLengthInBytes();
    }

    
/**
     * Returns the length, in bits, of the modulo
     *
     * @return integer
     */
    
public function getLength()
    {
        return 
$this->factory->getLength();
    }

    
/**
     * Multiply a point on the curve by a scalar
     *
     * Uses the montgomery ladder technique as described here:
     *
     * https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication#Montgomery_ladder
     * https://github.com/phpecc/phpecc/issues/16#issuecomment-59176772
     *
     * @return array
     */
    
public function multiplyPoint(array $pFiniteField\Integer $d)
    {
        
$alreadyInternal = isset($p[2]);
        
$r $alreadyInternal ?
            [[], 
$p] :
            [[], 
$this->convertToInternal($p)];

        
$d $d->toBits();
        for (
$i 0$i strlen($d); $i++) {
            
$d_i = (int) $d[$i];
            
$r[$d_i] = $this->addPoint($r[0], $r[1]);
            
$r[$d_i] = $this->doublePoint($r[$d_i]);
        }

        return 
$alreadyInternal $r[0] : $this->convertToAffine($r[0]);
    }

    
/**
     * Creates a random scalar multiplier
     *
     * @return FiniteField
     */
    
public function createRandomMultiplier()
    {
        static 
$one;
        if (!isset(
$one)) {
            
$one = new BigInteger(1);
        }

        
$dA BigInteger::randomRange($one$this->order->subtract($one));
        return 
$this->factory->newInteger($dA);
    }

    
/**
     * Sets the Order
     */
    
public function setOrder(BigInteger $order)
    {
        
$this->order $order;
    }

    
/**
     * Returns the Order
     *
     * @return \phpseclib3\Math\BigInteger
     */
    
public function getOrder()
    {
        return 
$this->order;
    }

    
/**
     * Use a custom defined modular reduction function
     *
     * @return object
     */
    
public function setReduction(callable $func)
    {
        
$this->factory->setReduction($func);
    }

    
/**
     * Returns the affine point
     *
     * @return object[]
     */
    
public function convertToAffine(array $p)
    {
        return 
$p;
    }

    
/**
     * Converts an affine point to a jacobian coordinate
     *
     * @return object[]
     */
    
public function convertToInternal(array $p)
    {
        return 
$p;
    }

    
/**
     * Negates a point
     *
     * @return object[]
     */
    
public function negatePoint(array $p)
    {
        
$temp = [
            
$p[0],
            
$p[1]->negate()
        ];
        if (isset(
$p[2])) {
            
$temp[] = $p[2];
        }
        return 
$temp;
    }

    
/**
     * Multiply and Add Points
     *
     * @return int[]
     */
    
public function multiplyAddPoints(array $points, array $scalars)
    {
        
$p1 $this->convertToInternal($points[0]);
        
$p2 $this->convertToInternal($points[1]);
        
$p1 $this->multiplyPoint($p1$scalars[0]);
        
$p2 $this->multiplyPoint($p2$scalars[1]);
        
$r $this->addPoint($p1$p2);
        return 
$this->convertToAffine($r);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0068 ]--