Commit Graph

11 Commits

Author SHA1 Message Date
75975478f2 Add requirements.txt and correct the dependency list
Add a requirements file (pyscard, opencv-python, openpyxl) so users can
pip install -r requirements.txt. Remove the incorrect cryptography
dependency from the README - all crypto uses the Python standard library.
2026-07-08 16:13:45 -07:00
08c77e1124 Fix pipeline diagram and document backup habits and dedup behavior
Replace the misaligned box diagram with a clean vertical flow. Expand
the intro to explain bulk-loading one or many authenticators and how
duplicates are handled at each stage. Add a "Backing up your OTP keys"
section covering screenshotting QR codes to secure storage with a
filename convention, and saving one-time backup/recovery codes.
2026-07-08 16:08:12 -07:00
3560964188 Expand README into full tool documentation 2026-07-08 15:44:31 -07:00
a8a405600c Add --import-qr to run the QR->CSV step before importing
Wrap the QR decode/append step behind --import-qr on the importer so a
single command runs the whole pipeline: decode QR images, append only
new credentials to the CSV (deduped on otpauth://, existing entries
silently skipped), then validate and import. QR folder defaults to the
CSV's folder; override with --qr-images. Refactor qr_to_sheet into
reusable collect_candidates / apply_new_candidates / run_qr_import.
2026-07-08 15:31:03 -07:00
0fad68b9f6 Replace a real OTP secret in a test with a dummy vector 2026-07-08 15:19:05 -07:00
07f65835d0 Add QR-to-CSV utility and switch canonical format to CSV
Add qr_to_sheet.py: decode saved OTP QR screenshots and append new
credentials to the canonical CSV, deduplicated on the otpauth:// data.
Add otpauth.py (parse_otpauth / canonical_key / build_otpauth), shared
by both tools. The canonical format becomes a minimal CSV (issuer,
account, otpauth_uri, source_file); load_credentials reads CSV or xlsx
and derives crypto from the immutable otpauth_uri while taking
issuer/account from their editable label columns.
2026-07-08 14:49:59 -07:00
cd705a446b Validate cell characters and digit/period sanity
Halt import on control characters or a ':'/'/' inside an issuer or
account (they collide with the OATH issuer:account separator and period/
prefix), on a composed name over 64 bytes with a clearer per-field
message, and on a digit count outside 6-8 or a non-positive period.
2026-07-08 13:49:48 -07:00
88a600ba66 Speed up --profile-memory with one memory read per credential
Reuse each credential's post-PUT memory reading as the baseline for the
next, halving the memory-applet SELECTs (each triggers a garbage
collection). A 34-credential profiling run now completes in seconds.
2026-07-08 13:45:48 -07:00
bb09e0636d Require auth to reset a locked applet
The applet gates RESET behind authentication when a password is set
(unlike Yubico OATH, which allows an unauthenticated reset). --reset now
authenticates with the applet password (--password or prompt) before
resetting a locked applet, and the RESET error includes the status-word
meaning.
2026-07-08 13:34:18 -07:00
602bbc13f7 Add --reset and post-import --set-password; fix algorithm nibble parsing
Add two admin operations on the OATH protocol layer: --reset (RESET
0x04/0xDEAD) and --set-password, which sets an access password after a
successful import only if the applet has none. Fix _parse_select to mask
the SELECT ALGORITHM tag to its low nibble (the applet reports the full
type|algo byte, e.g. 0x21), which previously broke validate on a locked
applet. Add a clean top-level OathError handler.
2026-07-08 11:38:50 -07:00
f8273fc904 Add Apex OTP importer
Import TOTP credentials from the export spreadsheet into a VivoKey Apex
OTP (ykneo-oath) applet over PC/SC. Includes the OATH protocol layer
(SELECT/VALIDATE/LIST/PUT with 61xx reassembly), PBKDF2 password
authentication, pre-flight input validation, ask-per-conflict handling,
optional javacard-memory profiling, and hardware-free unit tests.
2026-07-08 11:32:56 -07:00