mirror of
https://github.com/luxfi/crypto.git
synced 2026-07-27 01:54:50 +00:00
chore: sync local changes
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
"""luxcrypto — Python bindings for Lux post-quantum cryptography.
|
||||
|
||||
One library, one implementation. Uses libluxcrypto (Go/circl) via ctypes.
|
||||
Same PQ crypto from blockchain to AI agents.
|
||||
|
||||
from luxcrypto import mlkem768, mldsa65
|
||||
|
||||
pk, sk = mlkem768.keypair()
|
||||
ct, ss_enc = mlkem768.encapsulate(pk)
|
||||
ss_dec = mlkem768.decapsulate(sk, ct)
|
||||
assert ss_enc == ss_dec
|
||||
|
||||
pk, sk = mldsa65.keypair()
|
||||
sig = mldsa65.sign(sk, b"hello")
|
||||
assert mldsa65.verify(pk, b"hello", sig)
|
||||
"""
|
||||
|
||||
from luxcrypto._ffi import LUX_CRYPTO_AVAILABLE
|
||||
from luxcrypto import mlkem768, mldsa65
|
||||
|
||||
__version__ = "0.1.0"
|
||||
__all__ = ["mlkem768", "mldsa65", "LUX_CRYPTO_AVAILABLE"]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,62 @@
|
||||
"""FFI layer — loads libluxcrypto shared library."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import ctypes
|
||||
import ctypes.util
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
_LIB: ctypes.CDLL | None = None
|
||||
LUX_CRYPTO_AVAILABLE = False
|
||||
|
||||
|
||||
def _find_lib() -> str | None:
|
||||
"""Find libluxcrypto on the system."""
|
||||
# 1. Env var override
|
||||
env = os.environ.get("LUX_CRYPTO_LIB")
|
||||
if env and os.path.isfile(env):
|
||||
return env
|
||||
|
||||
# 2. Adjacent to this package (e.g. wheel ships the .dylib/.so)
|
||||
here = Path(__file__).parent
|
||||
for name in ("libluxcrypto.dylib", "libluxcrypto.so", "libluxcrypto.dll"):
|
||||
p = here / name
|
||||
if p.exists():
|
||||
return str(p)
|
||||
|
||||
# 3. In the lux/crypto/dist build output
|
||||
dist = Path.home() / "work" / "lux" / "crypto" / "dist"
|
||||
for name in ("libluxcrypto.dylib", "libluxcrypto.so", "libluxcrypto.dll"):
|
||||
p = dist / name
|
||||
if p.exists():
|
||||
return str(p)
|
||||
|
||||
# 4. System library path
|
||||
found = ctypes.util.find_library("luxcrypto")
|
||||
return found
|
||||
|
||||
|
||||
def _load() -> ctypes.CDLL | None:
|
||||
path = _find_lib()
|
||||
if path is None:
|
||||
return None
|
||||
try:
|
||||
return ctypes.CDLL(path)
|
||||
except OSError:
|
||||
return None
|
||||
|
||||
|
||||
_LIB = _load()
|
||||
LUX_CRYPTO_AVAILABLE = _LIB is not None
|
||||
|
||||
|
||||
def get_lib() -> ctypes.CDLL:
|
||||
"""Get the loaded library, raising if unavailable."""
|
||||
if _LIB is None:
|
||||
raise RuntimeError(
|
||||
"libluxcrypto not found. Build it with: "
|
||||
"cd ~/work/lux/crypto && make lib"
|
||||
)
|
||||
return _LIB
|
||||
@@ -0,0 +1,78 @@
|
||||
"""ML-DSA-65 (FIPS 204) — digital signatures via libluxcrypto."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import ctypes
|
||||
|
||||
from luxcrypto._ffi import get_lib
|
||||
|
||||
_PK_SIZE: int | None = None
|
||||
_SK_SIZE: int | None = None
|
||||
_SIG_SIZE: int | None = None
|
||||
|
||||
|
||||
def _sizes() -> tuple[int, int, int]:
|
||||
global _PK_SIZE, _SK_SIZE, _SIG_SIZE
|
||||
if _PK_SIZE is None:
|
||||
lib = get_lib()
|
||||
_PK_SIZE = lib.lux_mldsa65_pk_size()
|
||||
_SK_SIZE = lib.lux_mldsa65_sk_size()
|
||||
_SIG_SIZE = lib.lux_mldsa65_sig_size()
|
||||
return _PK_SIZE, _SK_SIZE, _SIG_SIZE
|
||||
|
||||
|
||||
def keypair() -> tuple[bytes, bytes]:
|
||||
"""Generate an ML-DSA-65 key pair.
|
||||
|
||||
Returns (public_key, secret_key).
|
||||
"""
|
||||
pk_size, sk_size, _ = _sizes()
|
||||
lib = get_lib()
|
||||
|
||||
pk_buf = ctypes.create_string_buffer(pk_size)
|
||||
sk_buf = ctypes.create_string_buffer(sk_size)
|
||||
pk_len = ctypes.c_int(0)
|
||||
sk_len = ctypes.c_int(0)
|
||||
|
||||
rc = lib.lux_mldsa65_keypair(pk_buf, ctypes.byref(pk_len), sk_buf, ctypes.byref(sk_len))
|
||||
if rc != 0:
|
||||
raise RuntimeError(f"lux_mldsa65_keypair failed: {rc}")
|
||||
|
||||
return pk_buf.raw[: pk_len.value], sk_buf.raw[: sk_len.value]
|
||||
|
||||
|
||||
def sign(secret_key: bytes, message: bytes) -> bytes:
|
||||
"""Sign a message with ML-DSA-65.
|
||||
|
||||
Returns signature bytes.
|
||||
"""
|
||||
_, _, sig_size = _sizes()
|
||||
lib = get_lib()
|
||||
|
||||
sig_buf = ctypes.create_string_buffer(sig_size)
|
||||
sig_len = ctypes.c_int(0)
|
||||
|
||||
rc = lib.lux_mldsa65_sign(
|
||||
secret_key, len(secret_key),
|
||||
message, len(message),
|
||||
sig_buf, ctypes.byref(sig_len),
|
||||
)
|
||||
if rc != 0:
|
||||
raise RuntimeError(f"lux_mldsa65_sign failed: {rc}")
|
||||
|
||||
return sig_buf.raw[: sig_len.value]
|
||||
|
||||
|
||||
def verify(public_key: bytes, message: bytes, signature: bytes) -> bool:
|
||||
"""Verify an ML-DSA-65 signature.
|
||||
|
||||
Returns True if valid, False otherwise.
|
||||
"""
|
||||
lib = get_lib()
|
||||
|
||||
rc = lib.lux_mldsa65_verify(
|
||||
public_key, len(public_key),
|
||||
message, len(message),
|
||||
signature, len(signature),
|
||||
)
|
||||
return rc == 0
|
||||
@@ -0,0 +1,88 @@
|
||||
"""ML-KEM-768 (FIPS 203) — key encapsulation via libluxcrypto."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import ctypes
|
||||
|
||||
from luxcrypto._ffi import get_lib
|
||||
|
||||
# Sizes (queried from lib at first call, cached)
|
||||
_PK_SIZE: int | None = None
|
||||
_SK_SIZE: int | None = None
|
||||
_CT_SIZE: int | None = None
|
||||
_SS_SIZE = 32
|
||||
|
||||
|
||||
def _sizes() -> tuple[int, int, int]:
|
||||
global _PK_SIZE, _SK_SIZE, _CT_SIZE
|
||||
if _PK_SIZE is None:
|
||||
lib = get_lib()
|
||||
_PK_SIZE = lib.lux_mlkem768_pk_size()
|
||||
_SK_SIZE = lib.lux_mlkem768_sk_size()
|
||||
_CT_SIZE = lib.lux_mlkem768_ct_size()
|
||||
return _PK_SIZE, _SK_SIZE, _CT_SIZE
|
||||
|
||||
|
||||
def keypair() -> tuple[bytes, bytes]:
|
||||
"""Generate an ML-KEM-768 key pair.
|
||||
|
||||
Returns (public_key, secret_key).
|
||||
"""
|
||||
pk_size, sk_size, _ = _sizes()
|
||||
lib = get_lib()
|
||||
|
||||
pk_buf = ctypes.create_string_buffer(pk_size)
|
||||
sk_buf = ctypes.create_string_buffer(sk_size)
|
||||
pk_len = ctypes.c_int(0)
|
||||
sk_len = ctypes.c_int(0)
|
||||
|
||||
rc = lib.lux_mlkem768_keypair(pk_buf, ctypes.byref(pk_len), sk_buf, ctypes.byref(sk_len))
|
||||
if rc != 0:
|
||||
raise RuntimeError(f"lux_mlkem768_keypair failed: {rc}")
|
||||
|
||||
return pk_buf.raw[: pk_len.value], sk_buf.raw[: sk_len.value]
|
||||
|
||||
|
||||
def encapsulate(public_key: bytes) -> tuple[bytes, bytes]:
|
||||
"""Encapsulate a shared secret for the given public key.
|
||||
|
||||
Returns (ciphertext, shared_secret).
|
||||
"""
|
||||
_, _, ct_size = _sizes()
|
||||
lib = get_lib()
|
||||
|
||||
ct_buf = ctypes.create_string_buffer(ct_size)
|
||||
ss_buf = ctypes.create_string_buffer(_SS_SIZE)
|
||||
ct_len = ctypes.c_int(0)
|
||||
ss_len = ctypes.c_int(0)
|
||||
|
||||
rc = lib.lux_mlkem768_encapsulate(
|
||||
public_key, len(public_key),
|
||||
ct_buf, ctypes.byref(ct_len),
|
||||
ss_buf, ctypes.byref(ss_len),
|
||||
)
|
||||
if rc != 0:
|
||||
raise RuntimeError(f"lux_mlkem768_encapsulate failed: {rc}")
|
||||
|
||||
return ct_buf.raw[: ct_len.value], ss_buf.raw[: ss_len.value]
|
||||
|
||||
|
||||
def decapsulate(secret_key: bytes, ciphertext: bytes) -> bytes:
|
||||
"""Decapsulate a shared secret from ciphertext.
|
||||
|
||||
Returns shared_secret.
|
||||
"""
|
||||
lib = get_lib()
|
||||
|
||||
ss_buf = ctypes.create_string_buffer(_SS_SIZE)
|
||||
ss_len = ctypes.c_int(0)
|
||||
|
||||
rc = lib.lux_mlkem768_decapsulate(
|
||||
secret_key, len(secret_key),
|
||||
ciphertext, len(ciphertext),
|
||||
ss_buf, ctypes.byref(ss_len),
|
||||
)
|
||||
if rc != 0:
|
||||
raise RuntimeError(f"lux_mlkem768_decapsulate failed: {rc}")
|
||||
|
||||
return ss_buf.raw[: ss_len.value]
|
||||
@@ -0,0 +1,27 @@
|
||||
[project]
|
||||
name = "luxcrypto"
|
||||
version = "0.1.0"
|
||||
description = "Python bindings for Lux post-quantum cryptography (ML-KEM, ML-DSA)"
|
||||
readme = "README.md"
|
||||
license = { text = "MIT" }
|
||||
authors = [{ name = "Lux Industries Inc", email = "dev@lux.network" }]
|
||||
requires-python = ">=3.10"
|
||||
keywords = ["pq", "post-quantum", "mlkem", "mldsa", "fips203", "fips204", "lux"]
|
||||
classifiers = [
|
||||
"Development Status :: 4 - Beta",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Topic :: Security :: Cryptography",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://lux.network"
|
||||
Repository = "https://github.com/luxfi/crypto"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["luxcrypto"]
|
||||
Generated
+65
@@ -0,0 +1,65 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "luxcrypto-sys"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.106"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.45"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.117"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "2.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "2.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
||||
@@ -0,0 +1,17 @@
|
||||
[package]
|
||||
name = "luxcrypto-sys"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "FFI bindings to libluxcrypto — ML-KEM-768 and ML-DSA-65 via Lux post-quantum cryptography"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/luxfi/crypto"
|
||||
keywords = ["pq", "post-quantum", "mlkem", "mldsa", "fips203", "fips204"]
|
||||
categories = ["cryptography", "external-ffi-bindings"]
|
||||
|
||||
[dependencies]
|
||||
thiserror = "2"
|
||||
|
||||
[build-dependencies]
|
||||
|
||||
[features]
|
||||
default = []
|
||||
@@ -0,0 +1,36 @@
|
||||
use std::env;
|
||||
use std::path::PathBuf;
|
||||
|
||||
fn main() {
|
||||
// Search order for libluxcrypto:
|
||||
// 1. LUX_CRYPTO_LIB_DIR env var
|
||||
// 2. ~/work/lux/crypto/dist/
|
||||
// 3. System library path
|
||||
|
||||
if let Ok(lib_dir) = env::var("LUX_CRYPTO_LIB_DIR") {
|
||||
println!("cargo:rustc-link-search=native={lib_dir}");
|
||||
} else {
|
||||
// Dev default: ~/work/lux/crypto/dist/
|
||||
if let Some(home) = env::var_os("HOME") {
|
||||
let dist = PathBuf::from(home).join("work/lux/crypto/dist");
|
||||
if dist.exists() {
|
||||
println!("cargo:rustc-link-search=native={}", dist.display());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
println!("cargo:rustc-link-lib=dylib=luxcrypto");
|
||||
|
||||
// macOS: set rpath for all link targets (binaries, tests, examples)
|
||||
if cfg!(target_os = "macos") {
|
||||
// Always include /usr/local/lib as rpath fallback
|
||||
println!("cargo:rustc-link-arg=-Wl,-rpath,/usr/local/lib");
|
||||
|
||||
if let Some(home) = env::var_os("HOME") {
|
||||
let dist = PathBuf::from(home).join("work/lux/crypto/dist");
|
||||
if dist.exists() {
|
||||
println!("cargo:rustc-link-arg=-Wl,-rpath,{}", dist.display());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,266 @@
|
||||
//! FFI bindings to libluxcrypto — ML-KEM-768 and ML-DSA-65.
|
||||
//!
|
||||
//! One library, one implementation: libluxcrypto (cloudflare/circl via Go).
|
||||
//! Same PQ crypto from Lux blockchain to AI agents.
|
||||
//!
|
||||
//! # Example
|
||||
//!
|
||||
//! ```rust,ignore
|
||||
//! use luxcrypto_sys::{mlkem768, mldsa65};
|
||||
//!
|
||||
//! // ML-KEM-768 key exchange
|
||||
//! let (pk, sk) = mlkem768::keypair().unwrap();
|
||||
//! let (ct, ss_enc) = mlkem768::encapsulate(&pk).unwrap();
|
||||
//! let ss_dec = mlkem768::decapsulate(&sk, &ct).unwrap();
|
||||
//! assert_eq!(ss_enc, ss_dec);
|
||||
//!
|
||||
//! // ML-DSA-65 signatures
|
||||
//! let (pk, sk) = mldsa65::keypair().unwrap();
|
||||
//! let sig = mldsa65::sign(&sk, b"hello").unwrap();
|
||||
//! assert!(mldsa65::verify(&pk, b"hello", &sig));
|
||||
//! ```
|
||||
|
||||
use std::os::raw::{c_char, c_int};
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum CryptoError {
|
||||
#[error("libluxcrypto operation failed: {0} (rc={1})")]
|
||||
FFIError(&'static str, i32),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, CryptoError>;
|
||||
|
||||
// ── Raw FFI ──────────────────────────────────────────────────────────
|
||||
|
||||
extern "C" {
|
||||
fn lux_mlkem768_keypair(pk: *mut c_char, pk_len: *mut c_int, sk: *mut c_char, sk_len: *mut c_int) -> c_int;
|
||||
fn lux_mlkem768_encapsulate(pk: *const c_char, pk_len: c_int, ct: *mut c_char, ct_len: *mut c_int, ss: *mut c_char, ss_len: *mut c_int) -> c_int;
|
||||
fn lux_mlkem768_decapsulate(sk: *const c_char, sk_len: c_int, ct: *const c_char, ct_len: c_int, ss: *mut c_char, ss_len: *mut c_int) -> c_int;
|
||||
fn lux_mlkem768_pk_size() -> c_int;
|
||||
fn lux_mlkem768_sk_size() -> c_int;
|
||||
fn lux_mlkem768_ct_size() -> c_int;
|
||||
|
||||
fn lux_mldsa65_keypair(pk: *mut c_char, pk_len: *mut c_int, sk: *mut c_char, sk_len: *mut c_int) -> c_int;
|
||||
fn lux_mldsa65_sign(sk: *const c_char, sk_len: c_int, msg: *const c_char, msg_len: c_int, sig: *mut c_char, sig_len: *mut c_int) -> c_int;
|
||||
fn lux_mldsa65_verify(pk: *const c_char, pk_len: c_int, msg: *const c_char, msg_len: c_int, sig: *const c_char, sig_len: c_int) -> c_int;
|
||||
fn lux_mldsa65_pk_size() -> c_int;
|
||||
fn lux_mldsa65_sk_size() -> c_int;
|
||||
fn lux_mldsa65_sig_size() -> c_int;
|
||||
}
|
||||
|
||||
// ── ML-KEM-768 (FIPS 203) ───────────────────────────────────────────
|
||||
|
||||
pub mod mlkem768 {
|
||||
use super::*;
|
||||
|
||||
/// ML-KEM-768 public key size in bytes.
|
||||
pub fn pk_size() -> usize {
|
||||
unsafe { lux_mlkem768_pk_size() as usize }
|
||||
}
|
||||
|
||||
/// ML-KEM-768 secret key size in bytes.
|
||||
pub fn sk_size() -> usize {
|
||||
unsafe { lux_mlkem768_sk_size() as usize }
|
||||
}
|
||||
|
||||
/// ML-KEM-768 ciphertext size in bytes.
|
||||
pub fn ct_size() -> usize {
|
||||
unsafe { lux_mlkem768_ct_size() as usize }
|
||||
}
|
||||
|
||||
/// Generate an ML-KEM-768 key pair.
|
||||
///
|
||||
/// Returns `(public_key, secret_key)`.
|
||||
pub fn keypair() -> Result<(Vec<u8>, Vec<u8>)> {
|
||||
let pk_sz = pk_size();
|
||||
let sk_sz = sk_size();
|
||||
|
||||
let mut pk = vec![0u8; pk_sz];
|
||||
let mut sk = vec![0u8; sk_sz];
|
||||
let mut pk_len: c_int = 0;
|
||||
let mut sk_len: c_int = 0;
|
||||
|
||||
let rc = unsafe {
|
||||
lux_mlkem768_keypair(
|
||||
pk.as_mut_ptr() as *mut c_char, &mut pk_len,
|
||||
sk.as_mut_ptr() as *mut c_char, &mut sk_len,
|
||||
)
|
||||
};
|
||||
if rc != 0 {
|
||||
return Err(CryptoError::FFIError("lux_mlkem768_keypair", rc));
|
||||
}
|
||||
|
||||
pk.truncate(pk_len as usize);
|
||||
sk.truncate(sk_len as usize);
|
||||
Ok((pk, sk))
|
||||
}
|
||||
|
||||
/// Encapsulate a shared secret for the given public key.
|
||||
///
|
||||
/// Returns `(ciphertext, shared_secret)`.
|
||||
pub fn encapsulate(public_key: &[u8]) -> Result<(Vec<u8>, Vec<u8>)> {
|
||||
let ct_sz = ct_size();
|
||||
|
||||
let mut ct = vec![0u8; ct_sz];
|
||||
let mut ss = vec![0u8; 32];
|
||||
let mut ct_len: c_int = 0;
|
||||
let mut ss_len: c_int = 0;
|
||||
|
||||
let rc = unsafe {
|
||||
lux_mlkem768_encapsulate(
|
||||
public_key.as_ptr() as *const c_char, public_key.len() as c_int,
|
||||
ct.as_mut_ptr() as *mut c_char, &mut ct_len,
|
||||
ss.as_mut_ptr() as *mut c_char, &mut ss_len,
|
||||
)
|
||||
};
|
||||
if rc != 0 {
|
||||
return Err(CryptoError::FFIError("lux_mlkem768_encapsulate", rc));
|
||||
}
|
||||
|
||||
ct.truncate(ct_len as usize);
|
||||
ss.truncate(ss_len as usize);
|
||||
Ok((ct, ss))
|
||||
}
|
||||
|
||||
/// Decapsulate a shared secret from ciphertext.
|
||||
///
|
||||
/// Returns the shared secret.
|
||||
pub fn decapsulate(secret_key: &[u8], ciphertext: &[u8]) -> Result<Vec<u8>> {
|
||||
let mut ss = vec![0u8; 32];
|
||||
let mut ss_len: c_int = 0;
|
||||
|
||||
let rc = unsafe {
|
||||
lux_mlkem768_decapsulate(
|
||||
secret_key.as_ptr() as *const c_char, secret_key.len() as c_int,
|
||||
ciphertext.as_ptr() as *const c_char, ciphertext.len() as c_int,
|
||||
ss.as_mut_ptr() as *mut c_char, &mut ss_len,
|
||||
)
|
||||
};
|
||||
if rc != 0 {
|
||||
return Err(CryptoError::FFIError("lux_mlkem768_decapsulate", rc));
|
||||
}
|
||||
|
||||
ss.truncate(ss_len as usize);
|
||||
Ok(ss)
|
||||
}
|
||||
}
|
||||
|
||||
// ── ML-DSA-65 (FIPS 204) ────────────────────────────────────────────
|
||||
|
||||
pub mod mldsa65 {
|
||||
use super::*;
|
||||
|
||||
/// ML-DSA-65 public key size in bytes.
|
||||
pub fn pk_size() -> usize {
|
||||
unsafe { lux_mldsa65_pk_size() as usize }
|
||||
}
|
||||
|
||||
/// ML-DSA-65 secret key size in bytes.
|
||||
pub fn sk_size() -> usize {
|
||||
unsafe { lux_mldsa65_sk_size() as usize }
|
||||
}
|
||||
|
||||
/// ML-DSA-65 signature size in bytes.
|
||||
pub fn sig_size() -> usize {
|
||||
unsafe { lux_mldsa65_sig_size() as usize }
|
||||
}
|
||||
|
||||
/// Generate an ML-DSA-65 key pair.
|
||||
///
|
||||
/// Returns `(public_key, secret_key)`.
|
||||
pub fn keypair() -> Result<(Vec<u8>, Vec<u8>)> {
|
||||
let pk_sz = pk_size();
|
||||
let sk_sz = sk_size();
|
||||
|
||||
let mut pk = vec![0u8; pk_sz];
|
||||
let mut sk = vec![0u8; sk_sz];
|
||||
let mut pk_len: c_int = 0;
|
||||
let mut sk_len: c_int = 0;
|
||||
|
||||
let rc = unsafe {
|
||||
lux_mldsa65_keypair(
|
||||
pk.as_mut_ptr() as *mut c_char, &mut pk_len,
|
||||
sk.as_mut_ptr() as *mut c_char, &mut sk_len,
|
||||
)
|
||||
};
|
||||
if rc != 0 {
|
||||
return Err(CryptoError::FFIError("lux_mldsa65_keypair", rc));
|
||||
}
|
||||
|
||||
pk.truncate(pk_len as usize);
|
||||
sk.truncate(sk_len as usize);
|
||||
Ok((pk, sk))
|
||||
}
|
||||
|
||||
/// Sign a message with ML-DSA-65.
|
||||
///
|
||||
/// Returns the signature.
|
||||
pub fn sign(secret_key: &[u8], message: &[u8]) -> Result<Vec<u8>> {
|
||||
let sig_sz = sig_size();
|
||||
|
||||
let mut sig = vec![0u8; sig_sz];
|
||||
let mut sig_len: c_int = 0;
|
||||
|
||||
let rc = unsafe {
|
||||
lux_mldsa65_sign(
|
||||
secret_key.as_ptr() as *const c_char, secret_key.len() as c_int,
|
||||
message.as_ptr() as *const c_char, message.len() as c_int,
|
||||
sig.as_mut_ptr() as *mut c_char, &mut sig_len,
|
||||
)
|
||||
};
|
||||
if rc != 0 {
|
||||
return Err(CryptoError::FFIError("lux_mldsa65_sign", rc));
|
||||
}
|
||||
|
||||
sig.truncate(sig_len as usize);
|
||||
Ok(sig)
|
||||
}
|
||||
|
||||
/// Verify an ML-DSA-65 signature.
|
||||
///
|
||||
/// Returns `true` if valid, `false` otherwise.
|
||||
pub fn verify(public_key: &[u8], message: &[u8], signature: &[u8]) -> bool {
|
||||
let rc = unsafe {
|
||||
lux_mldsa65_verify(
|
||||
public_key.as_ptr() as *const c_char, public_key.len() as c_int,
|
||||
message.as_ptr() as *const c_char, message.len() as c_int,
|
||||
signature.as_ptr() as *const c_char, signature.len() as c_int,
|
||||
)
|
||||
};
|
||||
rc == 0
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_mlkem768_roundtrip() {
|
||||
let (pk, sk) = mlkem768::keypair().unwrap();
|
||||
assert!(!pk.is_empty());
|
||||
assert!(!sk.is_empty());
|
||||
|
||||
let (ct, ss_enc) = mlkem768::encapsulate(&pk).unwrap();
|
||||
assert!(!ct.is_empty());
|
||||
assert_eq!(ss_enc.len(), 32);
|
||||
|
||||
let ss_dec = mlkem768::decapsulate(&sk, &ct).unwrap();
|
||||
assert_eq!(ss_enc, ss_dec);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mldsa65_sign_verify() {
|
||||
let (pk, sk) = mldsa65::keypair().unwrap();
|
||||
assert!(!pk.is_empty());
|
||||
assert!(!sk.is_empty());
|
||||
|
||||
let message = b"The quick brown fox jumps over the lazy dog";
|
||||
let sig = mldsa65::sign(&sk, message).unwrap();
|
||||
assert!(!sig.is_empty());
|
||||
|
||||
assert!(mldsa65::verify(&pk, message, &sig));
|
||||
assert!(!mldsa65::verify(&pk, b"wrong message", &sig));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc_fingerprint":9477532968629232852,"outputs":{"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/opt/homebrew/Cellar/rust/1.93.1\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"aes\"\ntarget_feature=\"crc\"\ntarget_feature=\"dit\"\ntarget_feature=\"dotprod\"\ntarget_feature=\"dpb\"\ntarget_feature=\"dpb2\"\ntarget_feature=\"fcma\"\ntarget_feature=\"fhm\"\ntarget_feature=\"flagm\"\ntarget_feature=\"fp16\"\ntarget_feature=\"frintts\"\ntarget_feature=\"jsconv\"\ntarget_feature=\"lor\"\ntarget_feature=\"lse\"\ntarget_feature=\"neon\"\ntarget_feature=\"paca\"\ntarget_feature=\"pacg\"\ntarget_feature=\"pan\"\ntarget_feature=\"pmuv3\"\ntarget_feature=\"ras\"\ntarget_feature=\"rcpc\"\ntarget_feature=\"rcpc2\"\ntarget_feature=\"rdm\"\ntarget_feature=\"sb\"\ntarget_feature=\"sha2\"\ntarget_feature=\"sha3\"\ntarget_feature=\"ssbs\"\ntarget_feature=\"vh\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n","stderr":""},"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.93.1 (01f6ddf75 2026-02-11) (Homebrew)\nbinary: rustc\ncommit-hash: 01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf\ncommit-date: 2026-02-11\nhost: aarch64-apple-darwin\nrelease: 1.93.1\nLLVM version: 21.1.8\n","stderr":""}},"successes":{}}
|
||||
@@ -0,0 +1,3 @@
|
||||
Signature: 8a477f597d28d172789f06886806bc55
|
||||
# This file is a cache directory tag created by cargo.
|
||||
# For information about cache directory tags see https://bford.info/cachedir/
|
||||
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
+1
@@ -0,0 +1 @@
|
||||
29f17395cca6daee
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"[\"default\"]","declared_features":"[\"default\"]","target":15787832334323807915,"profile":15057526963834790232,"path":10763286916239946207,"deps":[[2448563160050429386,"thiserror",false,7159742345589662007],[15125624049374313965,"build_script_build",false,106108562180998609]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/luxcrypto-sys-22cb8b632dec0d29/dep-test-lib-luxcrypto_sys","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
||||
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
+1
@@ -0,0 +1 @@
|
||||
752be3a3008a84fb
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"[\"default\"]","declared_features":"[\"default\"]","target":15787832334323807915,"profile":6675295047989516842,"path":10763286916239946207,"deps":[[2448563160050429386,"thiserror",false,7159742345589662007],[15125624049374313965,"build_script_build",false,106108562180998609]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/luxcrypto-sys-6d9a7fe12979877b/dep-lib-luxcrypto_sys","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
||||
+1
@@ -0,0 +1 @@
|
||||
d1056dd42cf97801
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[15125624049374313965,"build_script_build",false,2219318408235439230]],"local":[{"Precalculated":"1773364762.582276626s (Cargo.lock)"}],"rustflags":[],"config":0,"compile_kind":0}
|
||||
+1
@@ -0,0 +1 @@
|
||||
7ed45b76559acc1e
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"[\"default\"]","declared_features":"[\"default\"]","target":5408242616063297496,"profile":502103643719580362,"path":13767053534773805487,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/luxcrypto-sys-d22b001e31af610d/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
||||
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
546e25a32fb2b93e
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"[\"default\", \"proc-macro\"]","declared_features":"[\"default\", \"nightly\", \"proc-macro\", \"span-locations\"]","target":369203346396300798,"profile":3033921117576893,"path":11796298034813217202,"deps":[[4289358735036141001,"build_script_build",false,14317291900041222645],[8901712065508858692,"unicode_ident",false,5545813193160649117]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/proc-macro2-844f11875a29c911/dep-lib-proc_macro2","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
||||
+1
@@ -0,0 +1 @@
|
||||
d1864a12eeaa89cb
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"[\"default\", \"proc-macro\"]","declared_features":"[\"default\", \"nightly\", \"proc-macro\", \"span-locations\"]","target":5408242616063297496,"profile":3033921117576893,"path":10762107138850525432,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/proc-macro2-8e889234e93c8a80/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
||||
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
+1
@@ -0,0 +1 @@
|
||||
f5d98877203db1c6
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[4289358735036141001,"build_script_build",false,14666441600994543313]],"local":[{"RerunIfChanged":{"output":"debug/build/proc-macro2-920e1c20adb7ba1d/output","paths":["src/probe/proc_macro_span.rs","src/probe/proc_macro_span_location.rs","src/probe/proc_macro_span_file.rs"]}},{"RerunIfEnvChanged":{"var":"RUSTC_BOOTSTRAP","val":null}}],"rustflags":[],"config":0,"compile_kind":0}
|
||||
+1
@@ -0,0 +1 @@
|
||||
bf9395ead154a11d
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"[\"default\", \"proc-macro\"]","declared_features":"[\"default\", \"proc-macro\"]","target":5408242616063297496,"profile":3033921117576893,"path":14921797379192934227,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/quote-081f9018bead59b6/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
||||
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
7137c036fbfe1c99
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"[\"default\", \"proc-macro\"]","declared_features":"[\"default\", \"proc-macro\"]","target":8313845041260779044,"profile":3033921117576893,"path":2847745025501944588,"deps":[[4289358735036141001,"proc_macro2",false,4519839618713349716],[13111758008314797071,"build_script_build",false,10864397201038206260]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/quote-8ad041ba9d87d38f/dep-lib-quote","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
||||
+1
@@ -0,0 +1 @@
|
||||
3465a13ab117c696
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[13111758008314797071,"build_script_build",false,2135080958910895039]],"local":[{"RerunIfChanged":{"output":"debug/build/quote-b6de30b064ebdf51/output","paths":["build.rs"]}}],"rustflags":[],"config":0,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
9bdc28c5635611f2
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"[\"clone-impls\", \"default\", \"derive\", \"parsing\", \"printing\", \"proc-macro\"]","declared_features":"[\"clone-impls\", \"default\", \"derive\", \"extra-traits\", \"fold\", \"full\", \"parsing\", \"printing\", \"proc-macro\", \"test\", \"visit\", \"visit-mut\"]","target":9442126953582868550,"profile":3033921117576893,"path":8924370668164857710,"deps":[[4289358735036141001,"proc_macro2",false,4519839618713349716],[8901712065508858692,"unicode_ident",false,5545813193160649117],[13111758008314797071,"quote",false,11032973542059685745]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/syn-8233a26bb1bd5652/dep-lib-syn","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
||||
+1
@@ -0,0 +1 @@
|
||||
a1fe03fec9420048
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"[\"default\", \"std\"]","declared_features":"[\"default\", \"std\"]","target":5408242616063297496,"profile":3033921117576893,"path":3141114655945988584,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/thiserror-45c07610afafe3f2/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
||||
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
+1
@@ -0,0 +1 @@
|
||||
34efb4521eaaa47e
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[2448563160050429386,"build_script_build",false,5188220206048345761]],"local":[{"RerunIfChanged":{"output":"debug/build/thiserror-bc77be90aa5dd592/output","paths":["build/probe.rs"]}},{"RerunIfEnvChanged":{"var":"RUSTC_BOOTSTRAP","val":null}}],"rustflags":[],"config":0,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
37a131b8ba835c63
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"[\"default\", \"std\"]","declared_features":"[\"default\", \"std\"]","target":13586076721141200315,"profile":5347358027863023418,"path":5144795244375168160,"deps":[[2448563160050429386,"build_script_build",false,9125605792172797748],[10353313219209519794,"thiserror_impl",false,8571739218260324646]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/thiserror-fe25d7c6ceae311e/dep-lib-thiserror","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
||||
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
+1
@@ -0,0 +1 @@
|
||||
26f1b06b67eff476
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"[]","declared_features":"[]","target":6216210811039475267,"profile":3033921117576893,"path":7694621501952377418,"deps":[[4289358735036141001,"proc_macro2",false,4519839618713349716],[10420560437213941093,"syn",false,17442817818292182171],[13111758008314797071,"quote",false,11032973542059685745]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/thiserror-impl-71d9a262b0504628/dep-lib-thiserror_impl","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
||||
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
+1
@@ -0,0 +1 @@
|
||||
9de90359b7aff64c
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":12983045474342760211,"features":"[]","declared_features":"[]","target":14045917370260632744,"profile":3033921117576893,"path":6414790413539136625,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/unicode-ident-6e6833916f2a7d5d/dep-lib-unicode_ident","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
||||
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1,3 @@
|
||||
cargo:rustc-link-search=native=/Users/z/work/lux/crypto/dist
|
||||
cargo:rustc-link-lib=dylib=luxcrypto
|
||||
cargo:rustc-link-arg=-Wl,-rpath,/Users/z/work/lux/crypto/dist
|
||||
@@ -0,0 +1 @@
|
||||
/Users/z/work/lux/crypto/bindings/rust/target/debug/build/luxcrypto-sys-93c7bd416c45aa91/out
|
||||
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
+5
@@ -0,0 +1,5 @@
|
||||
/Users/z/work/lux/crypto/bindings/rust/target/debug/build/luxcrypto-sys-d22b001e31af610d/build_script_build-d22b001e31af610d.d: build.rs
|
||||
|
||||
/Users/z/work/lux/crypto/bindings/rust/target/debug/build/luxcrypto-sys-d22b001e31af610d/build_script_build-d22b001e31af610d: build.rs
|
||||
|
||||
build.rs:
|
||||
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
+5
@@ -0,0 +1,5 @@
|
||||
/Users/z/work/lux/crypto/bindings/rust/target/debug/build/proc-macro2-8e889234e93c8a80/build_script_build-8e889234e93c8a80.d: /Users/z/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/build.rs
|
||||
|
||||
/Users/z/work/lux/crypto/bindings/rust/target/debug/build/proc-macro2-8e889234e93c8a80/build_script_build-8e889234e93c8a80: /Users/z/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/build.rs
|
||||
|
||||
/Users/z/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/build.rs:
|
||||
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1,23 @@
|
||||
cargo:rustc-check-cfg=cfg(fuzzing)
|
||||
cargo:rustc-check-cfg=cfg(no_is_available)
|
||||
cargo:rustc-check-cfg=cfg(no_literal_byte_character)
|
||||
cargo:rustc-check-cfg=cfg(no_literal_c_string)
|
||||
cargo:rustc-check-cfg=cfg(no_source_text)
|
||||
cargo:rustc-check-cfg=cfg(proc_macro_span)
|
||||
cargo:rustc-check-cfg=cfg(proc_macro_span_file)
|
||||
cargo:rustc-check-cfg=cfg(proc_macro_span_location)
|
||||
cargo:rustc-check-cfg=cfg(procmacro2_backtrace)
|
||||
cargo:rustc-check-cfg=cfg(procmacro2_build_probe)
|
||||
cargo:rustc-check-cfg=cfg(procmacro2_nightly_testing)
|
||||
cargo:rustc-check-cfg=cfg(procmacro2_semver_exempt)
|
||||
cargo:rustc-check-cfg=cfg(randomize_layout)
|
||||
cargo:rustc-check-cfg=cfg(span_locations)
|
||||
cargo:rustc-check-cfg=cfg(super_unstable)
|
||||
cargo:rustc-check-cfg=cfg(wrap_proc_macro)
|
||||
cargo:rerun-if-changed=src/probe/proc_macro_span.rs
|
||||
cargo:rustc-cfg=wrap_proc_macro
|
||||
cargo:rerun-if-changed=src/probe/proc_macro_span_location.rs
|
||||
cargo:rustc-cfg=proc_macro_span_location
|
||||
cargo:rerun-if-changed=src/probe/proc_macro_span_file.rs
|
||||
cargo:rustc-cfg=proc_macro_span_file
|
||||
cargo:rerun-if-env-changed=RUSTC_BOOTSTRAP
|
||||
@@ -0,0 +1 @@
|
||||
/Users/z/work/lux/crypto/bindings/rust/target/debug/build/proc-macro2-920e1c20adb7ba1d/out
|
||||
Binary file not shown.
Executable
BIN
Binary file not shown.
+5
@@ -0,0 +1,5 @@
|
||||
/Users/z/work/lux/crypto/bindings/rust/target/debug/build/quote-081f9018bead59b6/build_script_build-081f9018bead59b6.d: /Users/z/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/build.rs
|
||||
|
||||
/Users/z/work/lux/crypto/bindings/rust/target/debug/build/quote-081f9018bead59b6/build_script_build-081f9018bead59b6: /Users/z/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/build.rs
|
||||
|
||||
/Users/z/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/build.rs:
|
||||
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1,2 @@
|
||||
cargo:rerun-if-changed=build.rs
|
||||
cargo:rustc-check-cfg=cfg(no_diagnostic_namespace)
|
||||
@@ -0,0 +1 @@
|
||||
/Users/z/work/lux/crypto/bindings/rust/target/debug/build/quote-b6de30b064ebdf51/out
|
||||
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
+5
@@ -0,0 +1,5 @@
|
||||
/Users/z/work/lux/crypto/bindings/rust/target/debug/build/thiserror-45c07610afafe3f2/build_script_build-45c07610afafe3f2.d: /Users/z/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-2.0.18/build.rs
|
||||
|
||||
/Users/z/work/lux/crypto/bindings/rust/target/debug/build/thiserror-45c07610afafe3f2/build_script_build-45c07610afafe3f2: /Users/z/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-2.0.18/build.rs
|
||||
|
||||
/Users/z/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-2.0.18/build.rs:
|
||||
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1,5 @@
|
||||
#[doc(hidden)]
|
||||
pub mod __private18 {
|
||||
#[doc(hidden)]
|
||||
pub use crate::private::*;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
cargo:rerun-if-changed=build/probe.rs
|
||||
cargo:rustc-check-cfg=cfg(error_generic_member_access)
|
||||
cargo:rustc-check-cfg=cfg(thiserror_nightly_testing)
|
||||
cargo:rustc-check-cfg=cfg(thiserror_no_backtrace_type)
|
||||
cargo:rerun-if-env-changed=RUSTC_BOOTSTRAP
|
||||
@@ -0,0 +1 @@
|
||||
/Users/z/work/lux/crypto/bindings/rust/target/debug/build/thiserror-bc77be90aa5dd592/out
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user