Skip to content

Add RC4 CryptoAPI / Standard AES decryption and DateTimeExtended support#4

Merged
dominion525 merged 8 commits into
mainfrom
feature/rc4-cryptoapi-and-fixes
Feb 19, 2026
Merged

Add RC4 CryptoAPI / Standard AES decryption and DateTimeExtended support#4
dominion525 merged 8 commits into
mainfrom
feature/rc4-cryptoapi-and-fixes

Conversation

@dominion525

Copy link
Copy Markdown
Owner

Summary

  • Add RC4 CryptoAPI and Standard/NonStandard AES decryption for password-protected .accdb files
  • Add DateTimeExtended (0x14) column type for Access 2019 nanosecond-precision timestamps
  • Harden decryption: add AES-192 CBC support, wrap intermediate keys with Zeroizing
  • Extract shared CLI test helpers into common/mod.rs, add boundary-value tests, document test data provenance

Verification

  • scripts/quality-check.sh all passed (test, clippy, audit, doc, coverage 94.96%, complexity)
  • Verified reading RC4 CryptoAPI, NonStandard AES, and Agile encrypted files
  • Verified DateTimeExtended column export

🤖 Generated with Claude Code

dominion525 and others added 8 commits February 19, 2026 04:15
In addition to the existing Agile Encryption, add decryption support
for RC4 CryptoAPI and Standard/NonStandard AES. This enables reading
password-protected .accdb files in Access 2007 encryption format.

- Rename agile.rs to crypto.rs, consolidating all three schemes
- RC4 CryptoAPI: implement password verification and page decryption
- Standard/NonStandard AES: implement AES-ECB password verification
  and page decryption
- Add ecb crate dependency
- Harden encryption parameter validation (header_size overflow
  prevention, key_size and verifier_hash_size range checks,
  rejection of malformed EncryptionInfo)
- Add encryption specification documentation (English and Japanese)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add crypto-level parse and verify tests using real .accdb files
  for RC4 CryptoAPI and NonStandard AES (matching existing Agile test)
- Add validation tests with synthetic data: EncryptionInfo too short,
  header_size overflow, invalid RC4/AES key sizes, invalid
  verifier_hash_size (zero and >20)
- Strengthen nonstandard_aes_read_table to verify actual row values
  (ID=1, Field1="test")

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add DateTimeExtended variant to ColumnType enum (0x14, 42 bytes fixed)
- Add format_ext_datetime() to timestamp.rs for ISO 8601 formatting
- Add Value::DateTimeExtended variant and parsing logic in data.rs
- Add DDL type mappings for all 4 dialects (Access/PostgreSQL/MySQL/SQLite)
- Add DateTimeExtended handling to CLI export and prop commands
- Add unit tests and integration tests with extDateTestV2019.accdb

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create testdata/SOURCES.md recording the origin of all test files (Jackcess / jackcessencrypt / independently created)
- Add jackcessencrypt to acknowledgments in README.md / README.ja.md with link to SOURCES.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ntegration

- Add Agile encryption data read tests (db2007-enc.accdb, db2013-enc.accdb, enc_vbaV2007.accdb)
- Add Jet RC4 (.mdb) data read tests (v2000, v2003, overflow)
- Add CLI integration tests for RC4 CryptoAPI / NonStandard AES / Agile (tables, export, schema)
- Add test data db2007-enc.accdb and db2013-enc.accdb from jackcessencrypt
- Fix SOURCES.md source URL and upstream path for jackcessencrypt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add AES-192 CBC decryption support (aes_cbc_decrypt, decrypt_page_agile)
- Wrap intermediate secret values with Zeroizing<Vec<u8>> in 6 crypto functions
  (derive_key, verify_password, verify_password_rc4_cryptoapi,
  verify_password_standard_aes, iterate_hash_sha1, derive_standard_aes_key)
- Update README (EN/JA) Features/Limitations to list all supported encryption
  schemes (Agile, RC4 CryptoAPI, Standard/NonStandard AES)
- Fix jackcessencrypt URL to jahlborn/jackcessencrypt; generalize MS-OFFCRYPTO
  description
- Add comment explaining absence of Standard AES test (no test data available)
- Document why DateTimeExtended uses String representation
- Add 4 boundary-value tests for parse_ext_datetime (short buffer, all zeros,
  non-UTF-8, non-digit)
- Extract shared CLI test helpers (test_data_path, skip_if_missing!, jetdb_bin)
  into common/mod.rs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Results were not published anywhere; both checks remain available
locally via scripts/quality-check.sh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verify the declared MSRV with `cargo check` on Rust 1.85.
Runs in parallel with clippy and audit, as a prerequisite for test.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dominion525 dominion525 merged commit c065bd3 into main Feb 19, 2026
7 checks passed
@dominion525 dominion525 deleted the feature/rc4-cryptoapi-and-fixes branch February 19, 2026 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant