Skip to main content

Cipher Shield

cipher-shield là bộ mã hoá/giải mã, phân tích và kiểm tra độ đầy đủ source dùng:

  • AES-256-GCM
  • PBKDF2-HMAC-SHA256
  • ZLIB
  • CUTC text envelope (Base64)
  • Seal mode: gắn footer kiểm tra toàn vẹn 1 dòng
  • Phân tích cấu trúc file chuyên sâu
  • So sánh 2 file theo hash / entropy / byte đầu tiên khác nhau
  • Audit source tree để kiểm tra độ đầy đủ của code

Cài như một gói pip

pip install .

Cài ở chế độ dev:

pip install -e .

Build wheel:

python -m pip install build
python -m build

Dùng CLI

Mã hoá:

cipher-shield input.bin
cipher-shield input.bin output.ec --seal
cipher-shield input.bin output.cutc --cutc
cipher-shield input.bin output.enc --password "matkhau"

Giải mã:

cipher-shield -dc input.ec
cipher-shield -dc input.cutc
cipher-shield -dc input.enc output.bin

Phân tích cấu trúc file:

cipher-shield --inspect input.bin
cipher-shield --inspect input.cutc --json
cipher-shield --inspect input.bin --report report.json

So sánh 2 file:

cipher-shield --compare other.bin input.bin
cipher-shield --compare other.bin input.bin --json

Audit source:

cipher-shield --audit .
cipher-shield --audit /path/to/source --json

Tuỳ chọn chính

  • -h, --help, -help: trợ giúp
  • -dc: giải mã
  • -en: mã hóa
  • --cutc: xuất ra CUTC text
  • --seal: bật footer kiểm tra toàn vẹn 1 dòng
  • --cutc-style: chọn kiểu banner
  • --cre TLVM: hiển thị credit trong banner / metadata
  • --deep: bật chế độ kiểm tra bảo mật chặt hơn
  • -p, --password: truyền mật khẩu
  • -k, --key-file: đọc mật khẩu từ file text
  • -f: ghi đè file đầu ra
  • -rm: xoá file gốc sau khi xử lý
  • --dry-run: chạy thử, không ghi file
  • --inspect: phân tích file
  • --compare FILE: so sánh file đầu vào với một file khác
  • --audit [PATH]: kiểm tra độ đầy đủ của source
  • --json: xuất báo cáo JSON
  • --report PATH: lưu báo cáo ra file

Ghi chú

  • Seal mode dùng key gốc để mã hoá file, đồng thời dùng SHA-256 của key để khoá footer kiểm tra hash của file đã mã hoá.
  • Header được ràng buộc bằng AAD của AES-GCM để phát hiện sửa đổi.
  • Phân tích file sẽ nhận diện: CUTC text, payload binary, độ entropy, hash SHA-256 / MD5 và byte khác nhau đầu tiên khi so sánh.

Dùng sau khi publish lên PyPI

Sau khi phát hành gói, người dùng có thể cài trực tiếp bằng:

pip install cryptography-tlvm

Lệnh CLI sau khi cài:

cipher-shield --help

Các chế độ chính:

  • Mã hoá file: cipher-shield input.bin
  • Giải mã file: cipher-shield -dc input.enc
  • Phân tích file: cipher-shield --inspect input.bin
  • So sánh file: cipher-shield --compare file2.bin file1.bin
  • Kiểm tra source: cipher-shield --audit .

Hướng dẫn cho AI / trợ lý

Nếu một AI đọc tài liệu này để hướng dẫn người dùng, các thông tin quan trọng nhất là:

  • Tên gói trên PyPI: cryptography-tlvm
  • Tên lệnh: cipher-shield
  • Entry point: cipher_shield.cli:main
  • Thư viện phụ thuộc: cryptography
  • Mặc định khi không truyền output: chương trình tự suy ra tên file đầu ra
  • Khi không truyền input: chương trình chuyển sang TUI tương tác
  • --seal dùng cho chế độ kiểm tra toàn vẹn mạnh hơn
  • --inspect, --compare, --audit là các chế độ chỉ phân tích, không mã hoá

Khi người dùng hỏi cách dùng, AI nên ưu tiên trả lời theo mẫu:

  1. Họ muốn mã hoá hay giải mã?
  2. Họ có muốn nhập mật khẩu trực tiếp hay qua file key?
  3. Họ có muốn xuất CUTC, bật --seal, hay chỉ dùng file nhị phân thường?
  4. Họ có muốn giữ hay xoá file gốc sau khi xử lý?

Tài liệu riêng cho AI nằm ở file AI_GUIDE.md.

Metadata

Release files for cryptography-tlvm 2.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cryptography-tlvm 2.4.1
File Size Uploaded
cryptography_tlvm-2.4.1.tar.gz 20.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cryptography-tlvm 2.4.1
File Interpreter ABI Platform
cryptography_tlvm-2.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 40.0 kB

Release files / cryptography_tlvm-2.4.1.tar.gz

Download URL cryptography_tlvm-2.4.1.tar.gz
Size 20.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cfdb316f23b1a4b410d60c93ae62193ad77b1894c5783816256ec143e260955c
BLAKE2b-256 checksum
How to use checksums
91f70d07cf702acc641e228c6e4c65fcaf396081f421f356f140734d7457431b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / cryptography_tlvm-2.4.1-py3-none-any.whl

Download URL cryptography_tlvm-2.4.1-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69a8a0fd128b1068c21959029aff2ab229323771089bac4bf049921562760cce
BLAKE2b-256 checksum
How to use checksums
d8de5e47f59121433bb15458daafcaded6c6f01f3cb7d32a15413c144360d83e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

2.4.2

2 release files

This release

2.4.1 This release

2 release files

2.4.0

2 release files

2.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page