chore: rename quicproquo → quicprochat in Rust workspace

Rename all crate directories, package names, binary names, proto
package/module paths, ALPN strings, env var prefixes, config filenames,
mDNS service names, and plugin ABI symbols from quicproquo/qpq to
quicprochat/qpc.
This commit is contained in:
2026-03-07 18:24:52 +01:00
parent d8c1392587
commit a710037dde
212 changed files with 609 additions and 609 deletions

View File

@@ -3,14 +3,14 @@ requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "quicproquo"
name = "quicprochat"
version = "0.1.0"
description = "Python SDK for quicproquo E2E encrypted messenger"
description = "Python SDK for quicprochat E2E encrypted messenger"
readme = "README.md"
license = "MIT"
requires-python = ">=3.10"
authors = [{ name = "quicproquo contributors" }]
keywords = ["quicproquo", "e2e", "encrypted", "messaging", "quic"]
authors = [{ name = "quicprochat contributors" }]
keywords = ["quicprochat", "e2e", "encrypted", "messaging", "quic"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
@@ -40,11 +40,11 @@ dev = [
]
[project.urls]
Homepage = "https://github.com/nicholasgasior/quicproquo"
Repository = "https://github.com/nicholasgasior/quicproquo"
Homepage = "https://github.com/nicholasgasior/quicprochat"
Repository = "https://github.com/nicholasgasior/quicprochat"
[tool.setuptools.packages.find]
include = ["quicproquo*"]
include = ["quicprochat*"]
[tool.ruff]
target-version = "py310"

View File

@@ -1,8 +1,8 @@
[package]
name = "qpq-wasm-crypto"
name = "qpc-wasm-crypto"
version = "0.1.0"
edition = "2021"
description = "WASM bindings for quicproquo crypto primitives"
description = "WASM bindings for quicprochat crypto primitives"
license = "MIT"
[lib]
@@ -10,7 +10,7 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
wasm-bindgen = "0.2"
quicproquo-core = { path = "../../../crates/quicproquo-core", default-features = false }
quicprochat-core = { path = "../../../crates/quicprochat-core", default-features = false }
js-sys = "0.3"
# Standalone crate — not part of the workspace.

View File

@@ -1,4 +1,4 @@
//! WASM bindings for quicproquo crypto primitives.
//! WASM bindings for quicprochat crypto primitives.
//!
//! Exposes Ed25519 identity keys, hybrid X25519+ML-KEM-768, safety numbers,
//! sealed sender envelopes, and message padding to JavaScript via wasm-bindgen.
@@ -10,7 +10,7 @@ use wasm_bindgen::prelude::*;
/// Generate a fresh Ed25519 identity keypair. Returns the 32-byte seed.
#[wasm_bindgen]
pub fn generate_identity() -> Vec<u8> {
let kp = quicproquo_core::IdentityKeypair::generate();
let kp = quicprochat_core::IdentityKeypair::generate();
kp.seed_bytes().to_vec()
}
@@ -20,7 +20,7 @@ pub fn identity_public_key(seed: &[u8]) -> Result<Vec<u8>, JsError> {
let seed: [u8; 32] = seed
.try_into()
.map_err(|_| JsError::new("seed must be exactly 32 bytes"))?;
let kp = quicproquo_core::IdentityKeypair::from_seed(seed);
let kp = quicprochat_core::IdentityKeypair::from_seed(seed);
Ok(kp.public_key_bytes().to_vec())
}
@@ -30,7 +30,7 @@ pub fn sign(seed: &[u8], message: &[u8]) -> Result<Vec<u8>, JsError> {
let seed: [u8; 32] = seed
.try_into()
.map_err(|_| JsError::new("seed must be exactly 32 bytes"))?;
let kp = quicproquo_core::IdentityKeypair::from_seed(seed);
let kp = quicprochat_core::IdentityKeypair::from_seed(seed);
Ok(kp.sign_raw(message).to_vec())
}
@@ -43,7 +43,7 @@ pub fn verify(public_key: &[u8], message: &[u8], signature: &[u8]) -> Result<boo
let sig: [u8; 64] = signature
.try_into()
.map_err(|_| JsError::new("signature must be exactly 64 bytes"))?;
match quicproquo_core::IdentityKeypair::verify_raw(&pk, message, &sig) {
match quicprochat_core::IdentityKeypair::verify_raw(&pk, message, &sig) {
Ok(()) => Ok(true),
Err(_) => Ok(false),
}
@@ -58,7 +58,7 @@ pub fn verify(public_key: &[u8], message: &[u8], signature: &[u8]) -> Result<boo
/// Public key layout: x25519_pk(32) || mlkem_ek(1184)
#[wasm_bindgen]
pub fn hybrid_generate_keypair() -> Vec<u8> {
let kp = quicproquo_core::HybridKeypair::generate();
let kp = quicprochat_core::HybridKeypair::generate();
let private_bytes = kp.private_to_bytes(); // 2432 bytes
let public_bytes = kp.public_key().to_bytes(); // 1216 bytes
let mut out = Vec::with_capacity(private_bytes.len() + public_bytes.len());
@@ -81,9 +81,9 @@ pub fn hybrid_public_key(keypair_blob: &[u8]) -> Result<Vec<u8>, JsError> {
/// Returns the encrypted envelope.
#[wasm_bindgen]
pub fn hybrid_encrypt(public_key: &[u8], plaintext: &[u8]) -> Result<Vec<u8>, JsError> {
let pk = quicproquo_core::HybridPublicKey::from_bytes(public_key)
let pk = quicprochat_core::HybridPublicKey::from_bytes(public_key)
.map_err(|e| JsError::new(&format!("invalid hybrid public key: {e}")))?;
quicproquo_core::hybrid_encrypt(&pk, plaintext, b"", b"")
quicprochat_core::hybrid_encrypt(&pk, plaintext, b"", b"")
.map_err(|e| JsError::new(&format!("encryption failed: {e}")))
}
@@ -100,9 +100,9 @@ pub fn hybrid_decrypt(keypair_blob: &[u8], envelope: &[u8]) -> Result<Vec<u8>, J
"keypair must be 2432 (private only) or 3648 (full blob) bytes",
));
};
let kp = quicproquo_core::HybridKeypair::from_private_bytes(private_bytes)
let kp = quicprochat_core::HybridKeypair::from_private_bytes(private_bytes)
.map_err(|e| JsError::new(&format!("invalid hybrid private key: {e}")))?;
quicproquo_core::hybrid_decrypt(&kp, envelope, b"", b"")
quicprochat_core::hybrid_decrypt(&kp, envelope, b"", b"")
.map_err(|e| JsError::new(&format!("decryption failed: {e}")))
}
@@ -119,7 +119,7 @@ pub fn compute_safety_number(key_a: &[u8], key_b: &[u8]) -> Result<String, JsErr
let b: [u8; 32] = key_b
.try_into()
.map_err(|_| JsError::new("key_b must be exactly 32 bytes"))?;
Ok(quicproquo_core::safety_numbers::compute_safety_number(&a, &b))
Ok(quicprochat_core::safety_numbers::compute_safety_number(&a, &b))
}
// ── Sealed sender ───────────────────────────────────────────────────────────
@@ -131,14 +131,14 @@ pub fn seal(seed: &[u8], payload: &[u8]) -> Result<Vec<u8>, JsError> {
let seed: [u8; 32] = seed
.try_into()
.map_err(|_| JsError::new("seed must be exactly 32 bytes"))?;
let kp = quicproquo_core::IdentityKeypair::from_seed(seed);
Ok(quicproquo_core::sealed_sender::seal(&kp, payload))
let kp = quicprochat_core::IdentityKeypair::from_seed(seed);
Ok(quicprochat_core::sealed_sender::seal(&kp, payload))
}
/// Unseal a sealed sender envelope. Returns sender_public_key(32) || inner_payload.
#[wasm_bindgen]
pub fn unseal(envelope: &[u8]) -> Result<Vec<u8>, JsError> {
let (sender_key, inner) = quicproquo_core::sealed_sender::unseal(envelope)
let (sender_key, inner) = quicprochat_core::sealed_sender::unseal(envelope)
.map_err(|e| JsError::new(&format!("unseal failed: {e}")))?;
let mut out = Vec::with_capacity(32 + inner.len());
out.extend_from_slice(&sender_key);
@@ -151,12 +151,12 @@ pub fn unseal(envelope: &[u8]) -> Result<Vec<u8>, JsError> {
/// Pad a message to a fixed bucket size (256, 1024, 4096, or 16384 bytes).
#[wasm_bindgen]
pub fn pad_message(data: &[u8]) -> Vec<u8> {
quicproquo_core::padding::pad(data)
quicprochat_core::padding::pad(data)
}
/// Remove padding and recover the original message.
#[wasm_bindgen]
pub fn unpad_message(data: &[u8]) -> Result<Vec<u8>, JsError> {
quicproquo_core::padding::unpad(data)
quicprochat_core::padding::unpad(data)
.map_err(|e| JsError::new(&format!("unpad failed: {e}")))
}