xref: /dokuwiki/vendor/phpseclib/phpseclib/README.md (revision 7a48b45e8159fda5cdf0bf07c87cff9744ba1a9c)
1# phpseclib - PHP Secure Communications Library
2
3[![CI Status](https://github.com/phpseclib/phpseclib/actions/workflows/ci.yml/badge.svg?branch=3.0&event=push "CI Status")](https://github.com/phpseclib/phpseclib)
4
5## Supporting phpseclib
6
7- [Become a backer or sponsor on Patreon](https://www.patreon.com/phpseclib)
8- [One-time donation via PayPal or crypto-currencies](http://sourceforge.net/donate/index.php?group_id=198487)
9- [Subscribe to Tidelift](https://tidelift.com/subscription/pkg/packagist-phpseclib-phpseclib?utm_source=packagist-phpseclib-phpseclib&utm_medium=referral&utm_campaign=readme)
10
11## Introduction
12
13MIT-licensed pure-PHP implementations of the following:
14
15SSH-2, SFTP, X.509, an arbitrary-precision integer arithmetic library, Ed25519 / Ed449 / Curve25519 / Curve449, ECDSA / ECDH (with support for 66 curves), RSA (PKCS#1 v2.2 compliant), DSA / DH, DES / 3DES / RC4 / Rijndael / AES / Blowfish / Twofish / Salsa20 / ChaCha20, GCM / Poly1305
16
17* [Browse Git](https://github.com/phpseclib/phpseclib)
18
19## Documentation
20
21* [Documentation / Manual](https://phpseclib.com/)
22* [API Documentation](https://api.phpseclib.com/3.0/) (generated by Doctum)
23
24## Branches
25
26### master
27
28* Development Branch
29* Unstable API
30* Do not use in production
31
32### 4.0
33
34* Expected Release Date: September 2026
35* Long term support (LTS) release
36* X509 split into separate X509, CRL, CSR and SPKAC classes
37* PFX and CMS classes added
38* All ASN1 classes are lazy loaded by default
39* Minimum PHP version: 8.1.0
40* PSR-4 autoloading with namespace rooted at `\phpseclib4`
41* Install via Composer: `composer require phpseclib/phpseclib:4.0.x-dev`
42
43### 3.0
44
45* Long term support (LTS) release
46* Major expansion of cryptographic primitives
47* Minimum PHP version: 5.6.1
48* PSR-4 autoloading with namespace rooted at `\phpseclib3`
49* Install via Composer: `composer require phpseclib/phpseclib:~3.0`
50
51### 2.0
52
53* Long term support (LTS) release
54* Modernized version of 1.0
55* Minimum PHP version: 5.3.3
56* PSR-4 autoloading with namespace rooted at `\phpseclib`
57* Install via Composer: `composer require phpseclib/phpseclib:~2.0`
58
59### 1.0
60
61* Long term support (LTS) release
62* PHP4 compatible
63* Composer compatible (PSR-0 autoloading)
64* Install using Composer: `composer require phpseclib/phpseclib:~1.0`
65* [Download 1.0.25 as ZIP](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.30.zip/download)
66
67## Security contact information
68
69To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
70
71## Support
72
73Need Support?
74
75* [Checkout Questions and Answers on Stack Overflow](http://stackoverflow.com/questions/tagged/phpseclib)
76* [Create a Support Ticket on GitHub](https://github.com/phpseclib/phpseclib/issues/new)
77
78## Special Thanks
79
80<p align="left">
81    <a target="_blank" href="https://www.sovereign.tech/tech/phpseclib">
82        <img src="https://phpseclib.com/img/sponsors/sovereign-tech-agency.webp" alt="Sovereign Tech Agency" style="width: 200px">
83    </a>
84</p>
85
86## Additional Thanks
87
88- Allan Simon
89- [Anna Filina](https://afilina.com/)
90- delovelady
91- [ChargeOver](https://chargeover.com/)
92- <a href="https://jb.gg/OpenSource"><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.svg" height="20px"></a>
93
94## Contributing
95
961. Fork the Project
97
982. Ensure you have Composer installed (see [Composer Download Instructions](https://getcomposer.org/download/))
99
1003. Install Development Dependencies
101    ```sh
102    composer install
103    ```
104
1054. Create a Feature Branch
106
1075. Run continuous integration checks:
108   ```sh
109   composer global require php:^8.1 squizlabs/php_codesniffer friendsofphp/php-cs-fixer vimeo/psalm
110   phpcs --standard=build/php_codesniffer.xml
111   php-cs-fixer fix --config=build/php-cs-fixer.php --diff --dry-run --using-cache=no
112   psalm --config=build/psalm.xml --no-cache --long-progress --report-show-info=false --output-format=text
113   vendor/bin/phpunit --verbose --configuration tests/phpunit.xml
114   ```
115
1166. Send us a Pull Request
117