Skip to content
This repository was archived by the owner on Jan 25, 2026. It is now read-only.
/ buptLab-security Public archive

北京邮电大学 2025-2026 秋季学期《信息与网络安全》课程大作业代码实现

License

Notifications You must be signed in to change notification settings

agicy/buptLab-security

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

buptLab-security

这个仓库包含了北京邮电大学 2025-2026 秋季学期《信息与网络安全》课程期末大作业——Web 系统用户口令安全防护方案设计——的相关代码,主要实现了一个基于 HTTPS(TLS 1.3) + OPAQUE + Argon2id 的 Rust 的客户端-服务器应用,并包含了用于测试重放攻击防御机制的 Python 脚本。

环境配置

安装 Rust 依赖

本项目使用 cargo 管理 Rust 项目依赖,执行以下命令安装 Rust 项目依赖:

cargo build

安装 Python 依赖

本项目使用 uv 管理 Python 项目依赖,执行以下命令安装 Python 项目依赖:

uv sync

生成证书

本项目使用 OpenSSL 生成自签名证书,,执行以下命令创建 HTTPS 通信所需的证书:

./gen_certs.sh

目录结构

本项目目录结构如下:

.
├── client/              # Rust 客户端模块
│   ├── src/
│   │   └── main.rs      # 客户端主程序
│   └── Cargo.toml       # 客户端依赖配置
├── common/              # 共享 Rust 库
│   ├── src/
│   │   └── lib.rs       # 共享功能实现
│   └── Cargo.toml       # 共享库依赖配置
├── server/              # Rust 服务器模块
│   ├── src/
│   │   └── main.rs      # 服务器主程序
│   └── Cargo.toml       # 服务器依赖配置
├── tests/               # 测试目录
│   └── attack_script.py # 重放攻击测试脚本
├── .gitignore           
├── .python-version     
├── Cargo.toml           # Rust 工作区配置
├── gen_certs.sh         # 证书生成脚本
└── pyproject.toml       # Python 项目配置

使用说明

启动服务器

在项目根目录下执行以下命令启动服务器:

cargo run --bin server

运行客户端

打开新的终端窗口,在项目根目录下执行以下命令运行客户端:

cargo run --bin client

执行重放攻击测试

打开新的终端窗口,在项目根目录下执行以下命令运行攻击测试脚本:

uv run tests/attack_script.py

About

北京邮电大学 2025-2026 秋季学期《信息与网络安全》课程大作业代码实现

Topics

Resources

License

Stars

Watchers

Forks