PHPackages                             tourze/quic-crypto - 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. tourze/quic-crypto

ActiveLibrary

tourze/quic-crypto
==================

QUIC协议加密库 - AEAD加密、包头保护、密钥派生

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

Since Jun 3Pushed 6mo agoCompare

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

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

QUIC Crypto Library
===================

[](#quic-crypto-library)

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

[![Latest Version](https://camo.githubusercontent.com/7ea9016c5b65a642a86f4de053f6bf1384a57e7c356774988162eb6b110a8535/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f717569632d63727970746f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/quic-crypto)[![PHP Version](https://camo.githubusercontent.com/150e1fb3defd53b8f722bfb7cea27d0f7f129d8d8d472e092c6696a326bd69a4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e312d626c75652e7376673f7374796c653d666c61742d737175617265)](https://www.php.net/)[![License](https://camo.githubusercontent.com/6c711032aff1ca0eb6b211aa6cb3649ce7fd64a7714e1181d4bb457f9680e7cf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/07a93c6c3a828e1e929e2a173231acc84705e6f7a486f6d8d0f4103f204a79d1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c642d70617373696e672d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/tourze/php-monorepo)[![Code Coverage](https://camo.githubusercontent.com/e9118f6cfb6d298b03d6071558a977d100df49e8f0c3217957e362bab3e63370/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d39352532352d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/tourze/php-monorepo)

A comprehensive QUIC protocol cryptographic library providing AEAD encryption, header protection, key derivation, and other core security features.

Table of Contents
-----------------

[](#table-of-contents)

- [Features](#features)
- [Installation](#installation)
- [Requirements](#requirements)
- [Quick Start](#quick-start)
- [Basic Usage](#basic-usage)
    - [AEAD Encryption](#aead-encryption)
    - [Key Derivation](#key-derivation)
    - [Header Protection](#header-protection)
    - [Crypto Suite Management](#crypto-suite-management)
    - [Key Manager](#key-manager)
    - [Secure Random](#secure-random)
- [API Documentation](#api-documentation)
    - [Exception Handling](#exception-handling)
    - [Supported Algorithms](#supported-algorithms)
- [Security Considerations](#security-considerations)
- [Testing](#testing)
- [Contributing](#contributing)
- [References](#references)
- [License](#license)

Features
--------

[](#features)

- **AEAD Encryption**: Support for AES-128-GCM, AES-256-GCM, ChaCha20-Poly1305
- **Header Protection**: QUIC packet header protection implementation
- **Key Derivation**: HKDF-based key derivation following RFC 5869
- **Key Management**: Complete QUIC key lifecycle management
- **Crypto Suites**: Standard QUIC cipher suite management and selection
- **Secure Random**: Cryptographically secure random number generation
- **RFC Compliance**: Strict adherence to RFC 9001 (QUIC-TLS) and related standards

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

[](#installation)

```
composer require tourze/quic-crypto
```

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- OpenSSL extension (required)
- Sodium extension (optional, for enhanced security)
- Hash extension (required)

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

[](#quick-start)

Get started with the QUIC Crypto Library in minutes:

```
