-1
日增长
5,610
stars
912
forks
108
watchers
1,065
prs
1,194
issues
152
releases
README
phpseclib - PHP Secure Communications Library
| master | 4.0 | 3.0 | 2.0 | 1.0 |
|:------:|:---:|:---:|:---:|:---:|
| | | | | |
Supporting phpseclib
- Become a backer or sponsor on Patreon
- One-time donation via PayPal or crypto-currencies
- Subscribe to Tidelift
Introduction
MIT-licensed pure-PHP implementations of the following:
SSH-2, SFTP, X.509, an arbitrary-precision integer arithmetic library, Ed25519 / Ed449 / Curve25519 / Curve449, ECDSA / ECDH (with support for 66 curves), RSA (PKCS1 v2.2 compliant), DSA / DH, DES / 3DES / RC4 / Rijndael / AES / Blowfish / Twofish / Salsa20 / ChaCha20, GCM / Poly1305
Browse Git
Documentation
Documentation / Manual
API Documentation (generated by Doctum): master, 3.0, 2.0, 1.0
Branches
master
Development Branch
Unstable API
Do not use in production
4.0
Long term support (LTS) release
X509 split into separate X509, CRL, CSR and SPKAC classes
PFX and CMS classes added
All ASN1 classes are lazy loaded by default
Minimum PHP version: 8.1.0
PSR-4 autoloading with namespace rooted at \phpseclib4
Install via Composer: composer require phpseclib/phpseclib:~4.0
3.0
Long term support (LTS) release
Major expansion of cryptographic primitives
Minimum PHP version: 5.6.1
PSR-4 autoloading with namespace rooted at \phpseclib3
Install via Composer: composer require phpseclib/phpseclib:~3.0
2.0
Long term support (LTS) release
Modernized version of 1.0
Minimum PHP version: 5.3.3
PSR-4 autoloading with namespace rooted at \phpseclib
Install via Composer: composer require phpseclib/phpseclib:~2.0
1.0
Long term support (LTS) release
PHP4 compatible
Composer compatible (PSR-0 autoloading)
Install using Composer: composer require phpseclib/phpseclib:~1.0
Download 1.0.30 as ZIP
Security contact information
To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.
Support
Need Support?
Checkout Questions and Answers on Stack Overflow
Create a Support Ticket on GitHub
Special Thanks
Additional Thanks
- HeroDevs
- Allan Simon
- Anna Filina
- delovelady
- ChargeOver
-
Contributing
See CONTRIBUTING.md for how to set up a checkout, run the checks and send a pull request.Top issues
#1793Exception: Expected NET_SFTP_VERSION. Got packet type:18 comments · 2022-05-10#1647At least one byte needs to be present for successful C / b decodes18 comments · 2021-04-25#1440setTimeout doesn't work with the sleep command15 comments · 2019-12-11#1174Undefined offset: 0 in .../vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php on line 259615 comments · 2017-08-28#840Invalid HMAC with ppk key15 comments · 2015-10-08#1425Extremely slow uploads on SFTP13 comments · 2019-10-23#479SSH2: Implement input data for exec()13 comments · 2014-09-20#404Implement support for OpenSSH known_hosts files13 comments · 2014-07-12
Discussions
#2114Adding type hints to method signatures1 comments · 2025-12-09#2109Please close the channel (1) before trying to open it again3 comments · 2025-12-01#2046SSH2 (branch v3) : exec and timeout : how to stop the command ?1 comments · 2024-10-27#2036X509 getExtension is critical?2 comments · 2024-08-23#2007How can generate private and public key using version 3.01 comments · 2024-06-05#2004Can't Connect to EC2 Instance1 comments · 2024-05-23#1991How to login without password where ssh using putty can go in without password ?1 comments · 2024-04-06#1974AES En/Decryption and moving from phpseclib 2 to 32 comments · 2024-01-10
Latest release
4.0.3 4.0.3 2026-11-02- SymmetricKey: create upper bound for how many rounds PBKDFs will do - X509: harden certificate URL fetching