PHPackages                             tourze/tls-crypto-curves - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. tourze/tls-crypto-curves

ActiveLibrary[Security](/categories/security)

tourze/tls-crypto-curves
========================

TLS椭圆曲线加密实现库，支持多种椭圆曲线

0.0.1(11mo ago)041MITPHPPHP ^8.1CI passing

Since May 24Pushed 6mo agoCompare

[ Source](https://github.com/tourze/tls-crypto-curves)[ Packagist](https://packagist.org/packages/tourze/tls-crypto-curves)[ RSS](/packages/tourze-tls-crypto-curves/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

TLS Crypto Curves
=================

[](#tls-crypto-curves)

[English](README.md) | [中文](README.zh-CN.md)

[![Latest Version](https://camo.githubusercontent.com/8febeb73625ad320816034df74e904c4ecd8954420579b77b6e537b40ba21281/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f746c732d63727970746f2d6375727665732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/tls-crypto-curves)[![PHP Version Require](https://camo.githubusercontent.com/d164fb5bc193e190ba8ad45481c3f2b4a81879039fc6bad717acb0e5c7d7a302/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f746c732d63727970746f2d6375727665732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/tls-crypto-curves)[![License](https://camo.githubusercontent.com/62706d0e6df09b5e8db09d289a07378e813010b45204eb2ba5f6ee687c6d756b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746f75727a652f746c732d63727970746f2d6375727665732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/tls-crypto-curves)[![Build Status](https://camo.githubusercontent.com/9b7a9612470ee68120c9a00696f4f4f04e09546149545c8346e540804ad573aa/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f746f75727a652f746c732d63727970746f2d6375727665732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/tourze/tls-crypto-curves)[![Quality Score](https://camo.githubusercontent.com/e8dfcf7a961059ab47696d45b0fe33276e19c3ec2a897d43bf785b17aebf0cb1/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f746f75727a652f746c732d63727970746f2d6375727665732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/tourze/tls-crypto-curves)[![Code Coverage](https://camo.githubusercontent.com/4bf2a7b14a82c99ffebf325d180624f40cb164d4db82b2ad5bf32d448360dc02/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f746f75727a652f746c732d63727970746f2d6375727665732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/tourze/tls-crypto-curves)[![Total Downloads](https://camo.githubusercontent.com/9941c574e0e5d4ab358ceccdb2eda1b4b923a226ac06a89ace242a39c4bd6616/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f75727a652f746c732d63727970746f2d6375727665732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/tls-crypto-curves)

A comprehensive elliptic curve cryptography library for TLS protocol support. This package provides secure implementations of various elliptic curves commonly used in TLS connections, including NIST standard curves and modern alternatives.

Features
--------

[](#features)

- **NIST Standard Curves**: Complete support for P-256, P-384, and P-521 curves
- **Modern Curves**: X25519 and X448 curve implementations using Sodium
- **Secure Key Management**: Cryptographically secure key pair generation and public key derivation
- **OpenSSL Integration**: Native OpenSSL extension support for NIST curves
- **Type Safety**: Full PHP 8.1+ strict typing with comprehensive error handling
- **Performance Optimized**: Efficient implementations designed for cryptographic operations
- **TLS Protocol Ready**: Designed specifically for TLS handshake and key exchange

Installation
------------

[](#installation)

### Requirements

[](#requirements)

- PHP 8.1 or higher
- OpenSSL extension
- Sodium extension (automatically provided via paragonie/sodium\_compat)

### Installation via Composer

[](#installation-via-composer)

```
composer require tourze/tls-crypto-curves
```

Quick Start
-----------

[](#quick-start)

### Basic Usage with NIST P-256

[](#basic-usage-with-nist-p-256)

```
