一个为 Rust 提供安全内存处理原语的库,包括销毁时清零、内存锁定、常量时间比较和编译时保护区域,零依赖且支持 no_std。

Stars

131

7 天增长

暂无数据

Fork 数

2

开放 Issue

0

开源协议

Apache-2.0

最近更新

2026-07-22

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它在一个依赖为零、支持 no_std 的 crate 中整合了多种必要的保护原语(清零、mlock、常量时间比较、保护区域),并提供了安全的公开 API,是保护敏感数据的全面工具集。

适合谁使用

  • 处理加密密钥或身份验证令牌的 Rust 开发人员
  • 构建安全敏感应用(如密码管理器、密钥库)的开发人员
  • 在 no_std 环境下工作的嵌入式系统开发人员
  • 希望最小化依赖审计范围的安全审计员与维护者

典型使用场景

  • 在密钥或秘密离开作用域时自动将其内存清零,防止泄露
  • 锁定内存页以防止秘密数据被交换到磁盘
  • 执行对 MAC 或令牌的常量时间比较,抵抗时序侧信道攻击
  • 在嵌入式或接近内核的代码中管理固定大小、已锁定的安全缓冲区

项目优势

  • 零依赖——无需审计任何传递性依赖
  • 支持 no_std——核心原语无需分配器或标准库即可工作
  • 安全的公开 API——所有 unsafe 代码都内部封装,对外提供安全抽象
  • 多种核心原语:内存清零、内存锁定、常量时间比较和编译时大小保护区域

使用前须知

  • 内存锁定(mlock/VirtualLock)需要 `std` 特性,在 no_std 模式下不可用
  • 最低 Rust 版本为 1.65,且可能在次要版本中无警告地提升
  • 该 crate 处于 0.1 版本,可能缺少生产级加固或审计覆盖

README 快速开始

Quick start

项目描述

Secure memory handling primitives for Rust — zeroization on drop, mlock-protected regions, constant-time comparison, and compile-time enforced memory safety boundaries

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

slvDev
精选
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI 与机器学习大语言模型
1,960
zju3dv
精选
zju3dv GitHub avatar

INTACT-JEPA

INTACT is an end-to-end JEPA world model that learns an isomorphic intent-to-action interface, enabling search-free direct control for goal-conditioned robot tasks with high success rates after just one epoch of training.

AI 与机器学习嵌入式与物联网
14
l0ng-ai
精选
l0ng-ai GitHub avatar

tty7

tty7 is a fast, GPU-accelerated terminal workbench with persistent sessions, built-in input tools, SSH support, and coding agent awareness.

开发者工具CLI 与终端
359