Skip to main content

Crate cp_sync

Crate cp_sync 

Source
Expand description

CP Sync - Merkle trees, cognitive diffs, and crypto

Provides:

  • Diff generation and application
  • Encryption (XChaCha20-Poly1305)
  • Signatures (Ed25519)
  • Device identity and pairing (X25519 key agreement)
  • Serialization (CBOR + zstd compression)

Structs§

CryptoEngine
Cryptographic engine for encrypting and signing diffs
DeviceIdentity
Device identity containing signing keys and derived key agreement keys
EncryptedPayload
Encrypted payload for transmission
MerkleTree
Merkle tree for computing state roots
PairedDevice
A paired remote device with derived encryption key
PairingConfirmation
Pairing confirmation containing mutual verification data
PairingRequest
Pairing request containing public keys for key agreement
SignedDiff
Signed diff wrapper for relay transmission

Functions§

deserialize_diff
Decompress and deserialize a diff from CBOR
serialize_diff
Serialize a diff to CBOR and compress