Skip to content

RIFT Transport Protocol - Next-gen UDP transport for real-time communications with mobile-first multipath, seamless Wi-Fi/LTE handover, Noise crypto, QoS scheduler, and anti-censorship extensions

License

Notifications You must be signed in to change notification settings

rokoss21/rift-spec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RIFT Transport Protocol Specification

Specification Status Version License

RIFT Protocol Preview

RIFT: Realtime Interactive Fast Transport β€” A next-generation transport protocol for real-time communications (VoIP, video, collaboration) designed for mobile-first, multipath-native, and censorship-resistant environments.

πŸ“‹ Overview

This repository contains the official specification for the RIFT Transport Protocol.

RIFT is designed to address the limitations of traditional transport protocols (TCP, QUIC) in real-time communication scenarios:

  • βœ… Seamless roaming across network changes (Wi-Fi ↔ LTE) without connection drops
  • βœ… Low tail-latency for audio/video even with packet loss and jitter
  • βœ… Multipath-native with active-backup and duplication modes
  • βœ… Adaptive FEC for resilience in poor network conditions
  • βœ… Built-in QoS scheduler with programmable priority policies
  • βœ… Censorship-resistant extensions (obfuscation, relay, fallback transports)

Mobile-First: Seamless Network Handover

Multipath Handover

RIFT's multipath capabilities enable seamless transitions between network interfaces (Wi-Fi ↔ LTE) without connection drops. The protocol validates multiple paths simultaneously and performs instant failover when the active path degrades, ensuring uninterrupted real-time communication.


πŸ“– Specification Documents

Core Specification

πŸ“„ RIFT-SPEC-RC1.md β€” Main protocol specification (RC1 Final)

  • Status: Release Candidate 1 (Final) βœ“
  • Wire Format: FROZEN for v1.0
  • Ready for: Independent implementation and interoperability testing

Supporting Documents

πŸ“ RC1-CHANGES.md β€” Critical changes log

  • Documents all interoperability fixes
  • Verification checklist
  • Confidence assessment

πŸš€ Quick Start

For Protocol Implementers

  1. Read the specification: Start with RIFT-SPEC-RC1.md
  2. Pay attention to critical sections: Look for CRITICAL (interop) markers
  3. Implement conformance: Follow all MUST/MUST NOT requirements (RFC 2119)
  4. Test interoperability: Verify against other implementations

Key Sections for First Implementation:

  • Section 4: Packetization and Header Formats
  • Section 5: Cryptographic Handshake (Noise Framework)
  • Section 6: Core Frames
  • Section 7: Loss Recovery and Timers
  • Section 8: Congestion Control and Pacing

For Researchers

RIFT introduces several novel approaches:

  • Mobile-first multipath: Seamless Wi-Fi/LTE handover without application-level reconnection
  • Noise-first crypto: Lightweight alternative to TLS for transport-layer security
  • Adaptive FEC: Dynamic forward error correction based on network conditions
  • Programmable QoS: Application-controlled priority scheduling with deadlines

πŸ—οΈ What's Included

v1.0 Core Protocol

  • βœ… Packet Formats: Long/Short headers with Header Protection
  • βœ… Frame Types: All core frames (ACK, STREAM, DATAGRAM, PATH_CHALLENGE, etc.)
  • βœ… Cryptography: Noise IK pattern with ChaCha20-Poly1305
  • βœ… Loss Recovery: ACK-based with PTO (Probe Timeout)
  • βœ… Congestion Control: BBRv2 and Cubic support
  • βœ… Multipath: Path validation, migration, active-backup, duplication
  • βœ… QoS Scheduler: 4 priority classes (P0-P3) with deadline support
  • βœ… Forward Error Correction: XOR and Reed-Solomon FEC

QoS Priority Scheduler

QoS Scheduler

RIFT's built-in QoS scheduler manages four priority classes (P0-P3) with deadline-aware packet handling. P0 (audio/signaling) receives highest priority with aggressive dropping of stale packets, while P1 (video) uses adaptive FEC. P2/P3 handle interactive and bulk data with anti-starvation guarantees, ensuring fair bandwidth allocation even under congestion.

v2.x Anti-Censorship Extensions

  • πŸ” Obfuscation: obfs4, TLS-mimic, ShadowSocks transforms
  • 🌐 Relay Infrastructure: Single-hop and multi-hop forwarding
  • πŸ›‘οΈ Stealth Mode: Port knocking, timing jitter, decoy traffic
  • πŸ”„ Fallback Transports: TCP wrapper, WebSocket tunnel

v3.x Universal Extensions (Non-Wire)

  • 🌍 TUN/TAP Integration: VPN-like functionality
  • πŸ”Œ SOCKS5 Proxy: Transparent proxying
  • 🎯 Traffic Classification: Application-aware routing

πŸ“Š Specification Status

RC1 Final (February 10, 2026)

βœ… Wire format complete and frozen βœ… All critical ambiguities resolved βœ… Transport Parameters and Error Codes registries added βœ… Golden test vectors and conformance tests defined βœ… Interoperability-ready βœ… No known blocking issues

Conformance Requirements

Two independent implementations MUST be able to:

  • Complete Noise handshake (INITIAL β†’ HANDSHAKE β†’ 1-RTT)
  • Exchange STREAM and DATAGRAM frames
  • Process ACK frames correctly (PN space scoping)
  • Validate paths (PATH_CHALLENGE/PATH_RESPONSE with 5-tuple binding)
  • Handle packet loss and retransmission
  • Perform multipath operations
  • Apply Header Protection correctly
  • Construct AEAD nonces correctly

Cryptographic Handshake Flow

RIFT Handshake

RIFT uses the Noise IK pattern for its cryptographic handshake, providing 0-RTT capability with Perfect Forward Secrecy. The handshake progresses through three independent packet number spaces (INITIAL, HANDSHAKE, 1-RTT), each with its own cryptographic protection level and ACK tracking.


πŸ”§ Implementation

Reference Implementation

πŸ¦€ Rust: rokoss21/rift-rs (coming soon)

  • Modular architecture (rift-wire, rift-crypto, rift-core, rift-io)
  • v1.0 baseline + v2.x anti-censorship extensions
  • Linux, Windows, macOS support

Known Implementations

(Will be updated as implementations become available)


πŸ“ Protocol Design Principles

  1. Mobile-First: Optimized for LTE/Wi-Fi roaming and NAT traversal
  2. Realtime-Friendly: Low latency (P0 audio < 50ms), deadline-aware scheduling
  3. Resilience: Multipath, FEC, adaptive keep-alive
  4. Security: Noise Protocol Framework, PFS, AEAD, Header Protection
  5. Observability: RTT/loss/jitter metrics without decrypting payload
  6. Anti-Ossification: Greasing, reserved bits, extensible frame types

How RIFT Works

RIFT Protocol Architecture

The diagram above illustrates the complete RIFT protocol stack, from UDP datagram handling through cryptographic protection, multipath management, QoS scheduling, and application-level streams/datagrams.


🀝 Contributing

We welcome contributions to the specification! Here's how you can help:

Reporting Issues

  • πŸ› Ambiguities: Found unclear text? Open an issue
  • πŸ” Interop Problems: Implementation not compatible? Report it
  • πŸ“ Errata: Spotted a typo or technical error? Submit a fix

Pull Requests

  • Read CONTRIBUTING.md before submitting
  • For v1.0, the wire format is frozen β€” only clarifications/errata accepted
  • For v2.x+ extensions, proposals are welcome

Discussion


πŸ“š Additional Resources

Documentation

Related Projects

  • RIFT-RS: Reference Rust implementation
  • RIFT-CLI: Command-line client for testing
  • RIFT-Server: Production server implementation

πŸ“œ License

This specification is released under the MIT License. See LICENSE for details.

Copyright (c) 2026 Emil Rokossovskiy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

🎯 Roadmap

Phase 1: v1.0 Foundation (Current)

  • Complete wire specification (RC1)
  • Golden test vectors (Appendix C)
  • Conformance test plan (22-point checklist)
  • Reference implementation (rift-rs)
  • Interoperability testing

Phase 2: v2.0 Anti-Censorship

  • Obfuscation layer implementation
  • Relay infrastructure deployment
  • Field testing in censored regions
  • Performance optimization

Phase 3: v3.0 Universal Extensions

  • TUN/TAP integration
  • SOCKS5 proxy support
  • Traffic classification engine
  • VPN-like features

πŸ‘€ Author

Emil Rokossovskiy


🌟 Acknowledgments

Special thanks to:

  • QUIC Working Group for protocol design inspiration
  • Noise Protocol Framework authors for elegant cryptographic handshake design
  • obfs4 and ShadowSocks projects for censorship resistance techniques

πŸ“Š Quick Reference

Core Frame Types (v1.0)

Type Name Purpose
0x00 FRAME_BUNDLE Frame bundling container
0x01 ACK Acknowledge packets
0x10 PING Liveness probe
0x11 PONG Ping response
0x12 PATH_CHALLENGE Path validation
0x13 PATH_RESPONSE Path validation response
0x20 STREAM Reliable byte stream
0x30 DATAGRAM Unreliable datagram
0x40 NEW_TOKEN 0-RTT token issuance
0x50 CC_EVENT Congestion control feedback
0x62 NEW_CONNECTION_ID CID rotation
0x64 CONNECTION_CLOSE Terminate connection

Critical Constraints

  • CID Length: [0, 20] bytes, fixed for connection lifetime
  • PN Spaces: INITIAL, HANDSHAKE, 1-RTT (independent)
  • ACK Scoping: Within PN space only (no cross-PN-space ACKs)
  • Path Validation: Bound to 5-tuple, not PathID

πŸ“ˆ Citation

If you use RIFT in academic work, please cite:

@techreport{rokossovskiy2026rift,
  title={RIFT Transport Protocol Specification (RC1)},
  author={Rokossovskiy, Emil},
  year={2026},
  institution={RIFT Protocol Project},
  url={https://github.com/rokoss21/rift-spec}
}

Repository: https://github.com/rokoss21/rift-spec Status: RC1 Final β€” Ready for Implementation πŸš€ Last Updated: February 10, 2026

About

RIFT Transport Protocol - Next-gen UDP transport for real-time communications with mobile-first multipath, seamless Wi-Fi/LTE handover, Noise crypto, QoS scheduler, and anti-censorship extensions

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Contributors 2

  •  
  •