Skip to main content

Module protocol

Module protocol 

Source
Expand description

Protocol abstraction layer for multiple protocol support Copyright © 2025-2026 Wenze Wei. All Rights Reserved.

This file is part of Ri. The Ri project belongs to the Dunimd Team.

Licensed under the Apache License, Version 2.0 (the “License”); You may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

§Protocol Module

This module provides protocol implementations for Ri, including global protocol, private protocol, post-quantum cryptography, and integration features.

§Features

  • RiProtocol: Main protocol interface (trait definition)
  • RiGlobalProtocol: Global protocol implementation (basic implementation)
  • RiPrivateProtocol: Private protocol implementation (basic implementation)
  • RiCrypto: Cryptographic operations
  • Post-Quantum Cryptography: Kyber, Dilithium, Falcon implementations using liboqs

§Security Status

This module now uses the liboqs library for post-quantum cryptography, which is:

  • The reference implementation from the NIST PQC competition
  • Actively maintained and regularly audited
  • Suitable for production use

Post-Quantum Cryptography algorithms (Kyber, Dilithium, Falcon):

  • Based on NIST PQC competition algorithms
  • Have undergone formal security analysis
  • Constant-time implementations for side-channel resistance
  • Recommended for protecting sensitive data

§Recommendation

For cryptographic operations, this module uses audited libraries:

  • liboqs - NIST PQC reference implementation
  • ring - Modern, audited crypto library
  • openssl - Industry-standard crypto library

Re-exports§

pub use frames::RiFrameBuilder;
pub use frames::RiFrameParser;

Modules§

frames
Frame definitions for binary protocol encoding Copyright © 2025-2026 Wenze Wei. All Rights Reserved.

Structs§

RiBaseProtocol
RiConnectionInfo
Connection information
RiConnectionStats
Connection statistics
RiFrame
Protocol frame
RiFrameHeader
Frame header
RiGlobalProtocol
RiMessageFlags
Message flags for protocol messages
RiPrivateProtocol
RiProtocolConfig
Protocol configuration
RiProtocolManager
Protocol manager
RiProtocolResponse
Protocol response structure
RiProtocolStats
Protocol statistics

Enums§

ProtocolError
RiConnectionState
Connection state
RiFrameType
Frame type enumeration
RiProtocolHealth
Protocol health status
RiProtocolStatus
Protocol status
RiProtocolType
Protocol type enumeration
RiSecurityLevel
Security level

Traits§

RiProtocol
Core protocol trait
RiProtocolConnection
Protocol connection trait