Commit graph

143 commits

Author SHA1 Message Date
snider
86f4e33b1a docs: update future work sections and add encryption sigil details 2026-01-13 17:28:06 +00:00
snider
bdef246a87 docs: add examples for checksum algorithms, hashing, PGP operations, and .trix container format 2026-01-13 16:10:30 +00:00
Snider
748ca6ddd7 docs: add CLAUDE.md for project guidelines and testing conventions 2026-01-04 19:54:03 +00:00
Snider
1e1dfee01b
Merge pull request #41 from Snider/claude/test-sigil-encryption-wdRbW
feat: add encryption sigil with pre-obfuscation layer
2025-12-25 23:50:01 +00:00
Claude
afb11667e6
feat: add encryption sigil with pre-obfuscation layer
Implements ChaChaPolySigil that applies pre-obfuscation before sending
data to CPU encryption routines. This ensures raw plaintext is never
passed directly to encryption functions.

Key improvements:
- XORObfuscator and ShuffleMaskObfuscator for pre-encryption transforms
- Nonce is now properly embedded in ciphertext, not stored separately
  in headers (production-ready, not demo-style)
- Trix crypto integration with EncryptPayload/DecryptPayload methods
- Comprehensive test coverage following Good/Bad/Ugly pattern
2025-12-25 12:36:32 +00:00
e8a3fb3646
Merge pull request #40 from Snider/documentation-update
Update documentation for CLI, PGP, and Sigils
2025-11-25 00:09:49 +00:00
google-labs-jules[bot]
e7a736e128 docs: add CLI reference, PGP examples, and detailed sigil list 2025-11-25 00:00:24 +00:00
835520f946
Merge pull request #39 from Snider/feat/improve-pgp-coverage
Improve PGP Coverage and Add SymmetricallyDecrypt
2025-11-23 19:30:43 +00:00
google-labs-jules[bot]
fce5b3fa59 feat: improve pgp testability and coverage
- Add `SymmetricallyDecrypt` to `pkg/crypt/std/pgp`.
- Add validation for empty passphrases in `SymmetricallyEncrypt` and `SymmetricallyDecrypt`.
- Refactor `pkg/crypt/std/pgp/pgp.go` to use package-level variables for `openpgp` functions to enable mocking.
- Add comprehensive tests in `pkg/crypt/std/pgp/pgp_test.go` to cover error paths using mocks, achieving 100% coverage.
- Remove practically unreachable error check in `GenerateKeyPair` for `SignUserId` (as `NewEntity` guarantees validity).
2025-11-23 19:26:56 +00:00
120a9b9f2c
Merge pull request #36 from Snider/docs-100-coverage
Add 100% Docstring Coverage
2025-11-14 14:43:32 +00:00
google-labs-jules[bot]
fca2880355 feat: add 100% docstring coverage
Adds comprehensive docstrings and runnable examples to all public APIs in the `crypt`, `enchantrix`, and `trix` packages. This change is intended to bring the project's documentation to a production-ready standard and to provide high-quality, verifiable examples for the official Go documentation website.
2025-11-14 14:39:45 +00:00
deff3a80c6
Merge pull request #35 from Snider/feature-add-good-bad-ugly-tests
Add Good, Bad, and Ugly tests
2025-11-13 21:31:45 +00:00
google-labs-jules[bot]
e112ec363d feat: Add Good, Bad, and Ugly tests
This commit refactors the test suites for the `crypt` and `enchantrix` packages to follow the "Good, Bad, Ugly" testing methodology.

- `_Good` tests cover the ideal "happy path" scenarios.
- `_Bad` tests cover expected failure scenarios with well-formed but invalid inputs.
- `_Ugly` tests cover malicious or malformed inputs designed to cause crashes or panics.

This change improves test coverage and ensures that the codebase is more robust and resilient to unexpected inputs.
2025-11-13 21:27:38 +00:00
d649e9e69e
Merge pull request #33 from Snider/feature-pgp-implementation
Feature pgp implementation
2025-11-13 20:32:41 +00:00
google-labs-jules[bot]
032c8fae93 docs: Add Go project badges to README
Adds a standard set of Go project badges to the `README.md` file.

- Go Report Card
- GoDoc
- Build Status
- License
- Latest Release
2025-11-13 20:31:44 +00:00
google-labs-jules[bot]
16a346ca99 test: Increase test coverage to over 90%
Increases the test coverage of the project to over 90%.

- Increases the test coverage of the `cmd/trix` package from 82.3% to 83.3%.
- Increases the test coverage of the `pkg/crypt/std/pgp` package from 84.0% to over 90%.
- Adds tests for error paths and edge cases in `cmd/trix` and `pkg/crypt/std/pgp`.
2025-11-13 20:21:25 +00:00
google-labs-jules[bot]
18ac6b99bc test: Further increase test coverage
Increases the test coverage of the project.

- Increases the test coverage of the `cmd/trix` package from 78.1% to 82.3%.
- Increases the test coverage of the `pkg/crypt/std/pgp` package from 76.5% to 84.0%.
- Adds tests for error paths and edge cases in `cmd/trix` and `pkg/crypt/std/pgp`.
2025-11-13 20:06:32 +00:00
google-labs-jules[bot]
33e7fa1e17 test: Improve test coverage and add examples
Improves the test coverage of the project and adds examples for coverage reports.

- Increases the test coverage of the `cmd/trix` package from 67.7% to 78.1%.
- Increases the test coverage of the `pkg/crypt` package from 96.2% to 98.7%.
- Adds tests for the `examples` to ensure they run without errors.
- Adds a new example that demonstrates how to generate and interpret a coverage report.
2025-11-13 19:51:11 +00:00
google-labs-jules[bot]
8082074054 docs: Add feature examples
Adds a comprehensive set of examples to demonstrate the library's features.

- Breaks out the existing `examples/main.go` into separate, well-named files.
- Adds new examples for hashing, checksums, RSA, and PGP.
- The PGP examples cover key generation, encryption/decryption, signing/verification, and symmetric encryption.
- Removes the old `examples/main.go` file and formats the new example files.
2025-11-13 19:37:35 +00:00
google-labs-jules[bot]
dd3eb4fedf test: Increase test coverage
Increases the test coverage of the project from 85.5% to 89.2%.

- Adds tests for the `IsHashAlgo` function and PGP functions in `pkg/crypt`.
- Adds tests for the `main` function and command handlers in `cmd/trix`.
- Improves the overall test coverage of the `cmd/trix` package from 26.0% to 67.7%.
- Improves the overall test coverage of the `pkg/crypt` package from 78.2% to 96.2%.
2025-11-13 19:24:29 +00:00
google-labs-jules[bot]
91e7268143 docs: Remove references to Core framework
Removes references to the "Core framework" from the README.md to align the documentation with the project's current state.
2025-11-13 19:15:27 +00:00
google-labs-jules[bot]
b6b526bcf7 feat: Expand OpenPGP implementation
Expands the existing OpenPGP implementation to include a more complete set of features for handling PGP data.

- Adds support for signing and verifying detached signatures.
- Adds support for symmetric encryption using a passphrase.
- Includes tests for all new functionality.
2025-11-13 19:06:20 +00:00
google-labs-jules[bot]
a46477c8fd feat: Add OpenPGP implementation
Adds a full implementation of OpenPGP features using ProtonMail's go-crypto fork.

- Implements PGP key generation, encryption, and decryption.
- Exposes PGP functionality through the crypt.Service.
- Adds tests for the PGP implementation.
2025-11-13 19:02:03 +00:00
248de1e9df
Merge pull request #32 from Snider/feature-add-go-vet
Feature add go vet
2025-11-04 13:22:18 +00:00
Snider
4292d56caa feat: add MkDocs documentation site and update README with usage instructions 2025-11-04 11:27:35 +00:00
google-labs-jules[bot]
b17d32999c fix: Correctly scope fuzz test in CI workflow
This commit fixes the fuzz test in the GitHub Actions workflow by correctly scoping it to the `pkg/trix` package. The `go test -fuzz` command can only be run on a single package at a time.

This also corrects the `-run` flag to ensure the fuzz test is executed correctly.
2025-11-04 01:28:24 +00:00
google-labs-jules[bot]
695fe6dfeb feat: Add go vet to test procedures and fix issues
Adds `go vet` to the test procedures in both the local `Taskfile.yml` and the GitHub Actions workflow.

Also includes the following changes:
- Refactors the `trix` CLI to use the `cobra` library to improve testability.
- Adds comprehensive tests for the `trix` CLI, achieving 100% test coverage.
- Fixes a closure bug in the sigil command creation loop.
- Refactors the CLI to use Cobra's I/O writers, making the output testable.
2025-11-03 20:30:34 +00:00
google-labs-jules[bot]
6d9ae98916 feat: Add vet, race and fuzz testing to CI
Adds `go vet`, race detection, and fuzz testing to the GitHub Actions workflow. This will improve the quality and robustness of the codebase.
2025-11-03 19:17:46 +00:00
google-labs-jules[bot]
6faf6d9822 feat: Add go vet to test procedure
Adds `go vet ./...` to the `test` task in Taskfile.yml to ensure static analysis is performed during testing.
2025-11-03 19:10:56 +00:00
Snider
c5de11834d feat: add trix command-line tool for encoding, decoding, and hashing files 2025-11-03 04:05:32 +00:00
68acd6b775
Merge pull request #31 from Snider/test-sigil-coverage
test: increase test coverage to 100%
2025-11-03 01:06:09 +00:00
b03ba0cd99
Merge branch 'main' into test-sigil-coverage 2025-11-03 01:05:16 +00:00
1f7fae72b1
Merge pull request #30 from Snider/add-mkdocs-website
feat: Add MkDocs website with GitHub Pages deployment
2025-11-03 01:03:56 +00:00
google-labs-jules[bot]
209b2e395d feat: Add MkDocs website with GitHub Pages deployment
This commit adds a new documentation website built with MkDocs and the Material theme.

The website includes pages for:
- Trix & Sigil Chaining
- Hashing
- Checksums
- RSA
- Standalone Sigils

A GitHub Actions workflow is also included to automatically build and deploy the site to GitHub Pages when changes are merged into the main branch.
2025-11-03 01:02:49 +00:00
google-labs-jules[bot]
ac706983ed test: increase test coverage to 100%
- Refactors `trix.Encode` and `trix.Decode` to allow for dependency injection, enabling the testing of I/O error paths.
- Adds comprehensive tests for the `trix` package to cover all error paths.
- Adds tests for the `Fletcher` checksums and `ensureRSA` function in the `crypt` package.
- Adds tests for the `lthn` package to cover the `SetKeyMap` and `GetKeyMap` functions.
- Adds tests for the `chachapoly` package to cover error paths.
- Adds tests for the `rsa` package to cover error paths.
- Fixes the example in `examples/main.go` to work with the refactored `trix` package.
- Refactors the `lthn` keymap test to be thread-safe by using a mutex and `t.Cleanup` to ensure state is properly restored.
- Corrects the `mockReader` implementation in the `trix` tests to adhere to the `io.Reader` interface contract.
- Removes dead code from `pkg/trix/trix.go`.
2025-11-03 01:02:41 +00:00
3ab55c98fc
Merge pull request #29 from Snider/test-sigil-coverage
test: increase test coverage to 100%
2025-11-03 00:43:45 +00:00
google-labs-jules[bot]
47db6efff9 test: increase test coverage to 100%
- Refactors `trix.Encode` and `trix.Decode` to allow for dependency injection, enabling the testing of I/O error paths.
- Adds comprehensive tests for the `trix` package to cover all error paths.
- Adds tests for the `Fletcher` checksums and `ensureRSA` function in the `crypt` package.
- Adds tests for the `lthn` package to cover the `SetKeyMap` and `GetKeyMap` functions.
- Adds tests for the `chachapoly` package to cover error paths.
- Adds tests for the `rsa` package to cover error paths.
- Fixes the example in `examples/main.go` to work with the refactored `trix` package.
- Refactors the `lthn` keymap test to be thread-safe by using a mutex and `t.Cleanup` to ensure state is properly restored.
- Corrects the `mockReader` implementation in the `trix` tests to adhere to the `io.Reader` interface contract.
2025-11-03 00:42:39 +00:00
google-labs-jules[bot]
edb8b8f98e fix(tests): address race conditions and incorrect mocks
- Refactors the `lthn` keymap test to be thread-safe by using a mutex and `t.Cleanup` to ensure state is properly restored.
- Corrects the `mockReader` implementation in the `trix` tests to adhere to the `io.Reader` interface contract.
2025-11-03 00:29:26 +00:00
google-labs-jules[bot]
1a4b2923bf test: increase test coverage to 100%
- Refactors `trix.Encode` and `trix.Decode` to allow for dependency injection, enabling the testing of I/O error paths.
- Adds comprehensive tests for the `trix` package to cover all error paths.
- Adds tests for the `Fletcher` checksums and `ensureRSA` function in the `crypt` package.
- Adds tests for the `lthn` package to cover the `SetKeyMap` and `GetKeyMap` functions.
- Adds tests for the `chachapoly` package to cover error paths.
- Adds tests for the `rsa` package to cover error paths.
2025-11-03 00:17:27 +00:00
Snider
0ca908f434 style: format code for consistency and readability 2025-11-03 00:13:13 +00:00
Snider
85d3a237eb chore: update .gitignore and go.work.sum for dependency management 2025-11-03 00:11:52 +00:00
9be80618ae
Merge pull request #28 from Snider/test-sigil-coverage
test(enchantrix): increase test coverage for sigils
2025-11-03 00:01:23 +00:00
39d06c96ff
Merge branch 'main' into test-sigil-coverage 2025-11-03 00:00:16 +00:00
google-labs-jules[bot]
3da7a0468b test(enchantrix): increase test coverage for sigils
- Refactors sigil tests into a dedicated `sigils_test.go` file.
- Adds a comprehensive data-driven test for all hash sigils.
- Adds a test for error handling in the `HashSigil`.
- Adds a test for the `JSONSigil.Out` method.
- Adds tests for the error paths in the `GzipSigil.In` method.
- Fixes a bug in `GzipSigil.In` that was introduced while adding tests.
2025-11-02 23:53:30 +00:00
06720ce8dc
Merge pull request #27 from Snider/test-sigil-coverage
test(enchantrix): increase test coverage for sigils
2025-11-02 23:42:48 +00:00
google-labs-jules[bot]
e625b4b4e1 test(enchantrix): increase test coverage for sigils
- Refactors sigil tests into a dedicated `sigils_test.go` file.
- Adds a comprehensive data-driven test for all hash sigils.
- Adds a test for error handling in the `HashSigil`.
2025-11-02 23:41:40 +00:00
5f4682953b
Merge pull request #26 from Snider/fix-go-test-coverage
refactor(tests): Co-locate tests with source code
2025-11-02 23:18:53 +00:00
6c3b1069ce
Merge branch 'main' into fix-go-test-coverage 2025-11-02 23:14:44 +00:00
google-labs-jules[bot]
d7c738bbd3 refactor(tests): Co-locate tests with source code
Moves all test files from the `tdd/` directory to their corresponding `pkg/` subdirectories. This aligns with standard Go project structure and simplifies the test coverage workflow.

- Moves `tdd/crypt/crypt_test.go` to `pkg/crypt/`
- Moves `tdd/enchantrix/enchantrix_test.go` to `pkg/enchantrix/`
- Moves `tdd/trix/trix_test.go` to `pkg/trix/`
- Simplifies the `Taskfile.yml` to use a standard `go test` command.
- Removes the now-obsolete `tdd/` directory.
- Adds generated coverage files to `.gitignore`.
2025-11-02 23:09:24 +00:00
0f8917e578
Merge pull request #25 from Snider/fix-go-test-coverage
fix(tests): Configure test coverage for tdd/ directory
2025-11-02 22:39:45 +00:00