danog/php-rtc-srtp

Pure-PHP SRTP and SRTCP encryption using phpseclib, with AES-CM and AES-GCM profiles. MadelineProto's PHP 8.2+ fork removes the libsrtp/FFI dependency.

Maintainers

Package info

github.com/danog/php-rtc-srtp

pkg:composer/danog/php-rtc-srtp

Transparency log

Fund package maintenance!

php-webrtc

Statistics

Installs: 0

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1005 2026-08-25 17:57 UTC

This package is auto-updated.

Last update: 2026-08-25 18:03:05 UTC


README

PHP Version License

A pure-PHP library for Secure RTP (SRTP) and SRTCP packet encryption and decryption. It supports the AES-CM and AES-GCM protection profiles used by WebRTC without requiring OpenSSL or libsrtp FFI bindings.

About this fork

This is the danog/php-rtc-srtp fork used by MadelineProto. It targets PHP 8.2+, replaces the upstream libsrtp binding with an RFC 3711/RFC 7714 implementation backed by phpseclib, and includes interoperability fixes verified against pion/srtp.

All internal Composer dependencies use their danog/php-rtc-* package names directly, so installing a component selects the maintained danog packages throughout the dependency graph.

Features

  • AES-GCM and AES-CM encryption for RTP/RTCP packets
  • HMAC-SHA1 authentication
  • Replay protection
  • Interoperable with standard WebRTC implementations

Requirements

  • PHP ≥ 8.2
  • phpseclib 3 (installed through Composer)
  • Linux environment (Windows/macOS support planned)

Documentation

This package is part of the PHP WebRTC library. For complete documentation, examples, and API reference, visit:

PHP WebRTC Documentation

Credits

Authors

Reporting Issues

Found a bug? Please report it on our issues.

License

BSD 3-Clause License. See LICENSE for details.

References