Trang này chuyển một phong bì Sekuvo đã mã hóa sẵn thành các khung QR mà điện thoại của bạn có thể quét. Nó không thực hiện mã hóa và không bao giờ hỏi bí mật: bạn tạo phong bì trên máy của chính mình, và ở đây chỉ dán văn bản đã mã hóa.
Con đường thận trọng nhất vẫn là aktar.html được tải xuống, mở từ chính ổ đĩa của bạn. Trang này tồn tại cho trường hợp bạn mã hóa trong terminal của mình và chỉ cần phần hiển thị QR.
Đoạn mã dưới đây tạo ra chính xác phong bì mà ứng dụng mở (PBKDF2-HMAC-SHA256 · 310.000 vòng + AES-256-GCM). Lưu nó thành zarf-uret.py và đọc trước khi chạy — khoảng ba mươi dòng. Hãy tạo mật khẩu bằng máy thay vì tự nghĩ; lệnh đầu tiên làm việc đó.
# macOS / Linux # generate a password (letters+digits, ~119 bits): python3 -c "import secrets,string; print(''.join(secrets.choice(string.ascii_letters+string.digits) for _ in range(20)))" pip3 install cryptography python3 zarf-uret.py "Server SSH" > zarf.json # paste the secret, then Ctrl-D pbcopy < zarf.json # macOS; Linux: xclip -sel clip < zarf.json
# Windows (PowerShell) # generate a password (letters+digits, ~119 bits): python -c "import secrets,string; print(''.join(secrets.choice(string.ascii_letters+string.digits) for _ in range(20)))" pip install cryptography python zarf-uret.py "Server SSH" > zarf.json # paste the secret, then Ctrl-Z + Enter Get-Content zarf.json | Set-Clipboard
#!/usr/bin/env python3
# zarf-uret.py - reads the secret from stdin, writes a Sekuvo envelope to stdout.
# Usage: python3 zarf-uret.py "Title" > zarf.json (paste the secret, then Ctrl-D)
# Requires: pip install cryptography
import sys, os, json, time, base64, hashlib, getpass
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
title = sys.argv[1] if len(sys.argv) > 1 else "Transfer"
secret = sys.stdin.read()
# The app refuses entries above 256 KB; say so here instead of after the scan.
assert len(secret.encode()) <= 256 * 1024, "secret is over 256 KB, the app will not import it"
password = getpass.getpass("Envelope password (ASCII, generated): ")
assert password.isascii() and len(password) >= 8, "ASCII and at least 8 characters"
now = int(time.time() * 1000)
payload = json.dumps({"entries": [{
"type": "NOTE", "title": title,
"createdAt": now, "updatedAt": now, "quick": False,
"data": {"notes": secret},
}]}, ensure_ascii=False)
salt = os.urandom(16)
key = hashlib.pbkdf2_hmac("sha256", password.encode(), salt, 310_000, 32)
iv = os.urandom(12)
blob = iv + AESGCM(key).encrypt(iv, payload.encode(), None)
print(json.dumps({
"app": "vault", "version": 1,
"kdf": {"algo": "PBKDF2WithHmacSHA256", "iterations": 310_000,
"salt": base64.b64encode(salt).decode()},
"cipher": "AES-256-GCM",
"data": base64.b64encode(blob).decode(),
}))
Dán bí mật vào đầu vào của đoạn mã thay vì gõ nó trên dòng lệnh — như vậy nó không bao giờ nằm lại trong lịch sử shell của bạn.
Sekuvo → + → Nhập qua QR → quét các khung → nhập cùng mật khẩu → Thêm vào các mục hiện có.
← Quay lại sekuvo.com