Commit graph

65 commits

Author SHA1 Message Date
google-labs-jules[bot]
47e12b1875 feat: Implement xmrig-proxy functionality
This commit introduces the initial implementation of the xmrig-proxy functionality.

It includes:
- A new `proxy` command to the CLI to start the proxy.
- A new `pkg/proxy` package to encapsulate the core proxy logic.
- A mock proxy service that simulates workers connecting.
- The initial implementation of the XMRig Proxy API, with the `/` and `/workers.json` endpoints.
2025-10-31 05:03:46 +00:00
Snider
3268e4a6e7
Merge pull request #14 from Snider/feat-refactor-crypt-service
feat: Implement Pre-Encryption Sigil Packing for Enhanced Security
2025-10-31 02:41:48 +00:00
Snider
ea3918559f
Merge branch 'main' into feat-refactor-crypt-service 2025-10-31 02:41:09 +00:00
google-labs-jules[bot]
519e5edd68 feat: Implement pre-encryption sigil packing for enhanced security
This commit introduces a more secure sigil workflow by separating the transformation logic from the serialization logic.

- The `Trix` struct now has `Pack()` and `Unpack()` methods to apply sigil transformations directly to the payload.
- The `Encode()` and `Decode()` functions are now solely responsible for serialization, no longer handling sigil logic.
- The recommended workflow is to `Pack()` the data (obfuscating it), then encrypt it, and finally `Encode()` the container. This prevents cleartext from being sent to the CPU's encryption instructions.

This change enhances security by adding a user-defined obfuscation layer before the encryption process begins, true to the spirit of Enchantrix.
2025-10-31 02:37:55 +00:00
Snider
57f4cec854
Merge pull request #13 from Snider/feat-refactor-crypt-service
feat: Implement Good, Bad, and Ugly testing strategy
2025-10-31 02:24:08 +00:00
Snider
320beb53f0
Merge branch 'main' into feat-refactor-crypt-service 2025-10-31 02:22:33 +00:00
google-labs-jules[bot]
f7587b2471 feat: Introduce sigil transformers for trix containers
This commit introduces the concept of "sigils," which are programmable, pure-function transformers that can be applied to a Trix container's payload.

- A `Sigil` interface with `In` and `Out` methods is defined in the `trix` package.
- The `Trix` struct now includes a `Sigils` field to attach a chain of transformers.
- The `Encode` function applies the `In` transformations before encoding the payload.
- The caller is responsible for applying the `Out` transformations after decoding.

This new feature provides a flexible and extensible data pipeline for `Trix` containers.

The implementation is fully tested with the Good, Bad, and Ugly testing strategy.
2025-10-31 02:20:59 +00:00
google-labs-jules[bot]
d5ae9a44e1 feat: Implement Good, Bad, and Ugly testing strategy
This commit refactors the test suites for the `crypt` and `trix` packages to follow the Good, Bad, and Ugly testing strategy.

- `_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 new testing structure makes the test suite more organized, comprehensive, and robust.

Additionally, this commit includes a bug fix for the `Luhn` function, which now correctly handles empty and single-digit strings.
2025-10-31 02:03:33 +00:00
Snider
82c1df8f5b
Merge pull request #12 from Snider/feat-refactor-crypt-service
feat: Make trix magic number configurable
2025-10-31 01:56:02 +00:00
Snider
9c247d6322
Merge branch 'main' into feat-refactor-crypt-service 2025-10-31 01:55:28 +00:00
google-labs-jules[bot]
1c2d667b49 feat: Make trix magic number configurable
This commit makes the magic number in the trix file format configurable.

- The `Encode` and `Decode` functions in the `trix` package now accept a `magicNumber` string as a parameter.
- The example in `examples/main.go` has been updated to demonstrate the use of the new configurable magic number.
- The tests for the `trix` package have been updated to verify the new functionality, including tests for invalid magic numbers.
2025-10-31 01:53:49 +00:00
Snider
505b978fb0
Merge pull request #11 from Snider/feat-refactor-crypt-service
Refactor: Complete Project Restructuring
2025-10-31 01:42:28 +00:00
Snider
f3d0ce9e07
Merge branch 'main' into feat-refactor-crypt-service 2025-10-31 01:41:19 +00:00
google-labs-jules[bot]
edaaf0f0c9 refactor: Complete project restructuring
This commit finalizes the project restructuring into a Core-compatible service.

- The `crypt` package is now a service with methods instead of standalone functions.
- Cryptographic implementations (`lthn`, `chachapoly`, `rsa`) are now in `pkg/crypt/std`.
- The `trix` package has been moved to `pkg/trix`.
- The `rootfs` components have been removed to decouple the library from storage.
- All import paths have been updated to reflect the new structure.
- A `Taskfile.yml` has been added for managing common tasks.
2025-10-31 01:40:49 +00:00
Snider
6df419ba18
Delete .ideas directory 2025-10-31 01:37:00 +00:00
Snider
4211f0fdac
Merge pull request #10 from Snider/feat-refactor-crypt-service
Refactor: Restructure Crypt Service and Decouple from Storage
2025-10-31 01:36:02 +00:00
google-labs-jules[bot]
2ff894327b refactor: Restructure crypt service and decouple from storage
This commit restructures the `crypt` service to be more modular and decoupled from storage concerns.

- The standard cryptographic implementations (`lthn`, `chachapoly`, `rsa`) have been moved to the `pkg/crypt/std` directory.
- The `rootfs` components have been removed to decouple the library from storage.
- Import paths have been updated to reflect the new structure.
2025-10-31 01:34:24 +00:00
Snider
e21c910f91
Merge pull request #9 from Snider/generic-trix-format
Implement Generic .trix File Format
2025-10-31 01:08:00 +00:00
google-labs-jules[bot]
36884ecb53 feat: Implement generic .trix file format
This commit introduces a new, generic `.trix` file format, which is decoupled from any specific encryption algorithm.

The format is defined in `docs/trix_format.md` and consists of a magic number, version, a flexible JSON header, and a raw data payload.

A new `trix` Go package is implemented to handle the encoding and decoding of this format. Unit tests are included to verify the implementation.

An example file, `examples/main.go`, is also added to demonstrate how to use the `.trix` container to store data encrypted with the `chachapoly` package, showcasing the intended decoupled design.
2025-10-31 01:06:23 +00:00
Snider
cf48c6d623
Merge pull request #8 from Snider/feat-rootfs-passthrough-storage
feat: Implement rootfs passthrough storage
2025-10-31 00:59:03 +00:00
Snider
e100b53a18
Merge pull request #6 from Snider/feature-github-workflow
Enhance README and add future improvements log
2025-10-31 00:57:24 +00:00
google-labs-jules[bot]
4b7d76e993 feat: Implement rootfs passthrough storage
This commit introduces a new `rootfs` package that provides an encrypted passthrough storage system. The `LocalStorage` implementation uses the local file system as its backing store and encrypts all data at rest using the `chachapoly` package.

The functionality is exposed through the main `crypt` package, providing a clean and simple API for creating and interacting with encrypted file-based storage.
2025-10-30 23:55:25 +00:00
Snider
9f9f479ec8
Merge branch 'main' into feature-github-workflow 2025-10-30 23:38:22 +00:00
google-labs-jules[bot]
21d1c4fb5e docs: Enhance README and add future improvements log
This commit enhances the `README.md` file with more detailed information about the project, including a usage example and a development philosophy section. It also adds a new file, `.ideas/future_improvements.md`, to log out-of-scope ideas for future development.
2025-10-30 23:12:44 +00:00
Snider
5f53a8ab7b
Merge pull request #5 from Snider/feature-github-workflow
feat: Expand test coverage for chachapoly
2025-10-30 19:44:14 +00:00
Snider
2c4e7f4eec
Merge branch 'main' into feature-github-workflow 2025-10-30 19:38:08 +00:00
google-labs-jules[bot]
9f60f5696b feat: Expand test coverage for chachapoly
This commit expands the test coverage for the `chachapoly` package to include error and edge cases. It also adds `go.sum` to the `.gitignore` file.
2025-10-30 19:35:51 +00:00
Snider
18ebd002ab
Merge pull request #4 from Snider/feature-github-workflow
Add ChaCha20-Poly1305 encryption
2025-10-30 19:24:40 +00:00
Snider
67b9383432
Update chachapoly/chachapoly.go
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-30 19:22:09 +00:00
Snider
bbbbe68052
Apply suggestion from @coderabbitai[bot]
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-30 19:21:44 +00:00
Snider
0da27d9280
Apply suggestion from @coderabbitai[bot]
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-30 19:21:32 +00:00
Snider
fa4ad013ac
Merge branch 'main' into feature-github-workflow 2025-10-30 19:03:09 +00:00
google-labs-jules[bot]
63721e9811 feat: Add ChaCha20-Poly1305 encryption
This commit introduces ChaCha20-Poly1305 encryption functionality. It includes the following changes:

- A new `chachapoly` package has been added.
- The `chachapoly` package contains `Encrypt` and `Decrypt` functions.
- The functionality is fully tested.
- An `.ideas` directory has been created.
2025-10-30 19:01:08 +00:00
Snider
eebca47b27
Merge pull request #2 from Snider/feature-github-workflow
Add test coverage to workflow
2025-10-30 18:30:17 +00:00
Snider
ef2bca38e9
Merge pull request #3 from Snider/feature/github-workflow
Remove Deno workflow
2025-10-30 18:30:04 +00:00
Snider
b117f41995
Merge branch 'main' into feature-github-workflow 2025-10-30 18:24:01 +00:00
Snider
b704ab4101
Merge pull request #1 from Snider/feature-go-crypt-lib
Port crypt library from Core
2025-10-30 18:22:54 +00:00
google-labs-jules[bot]
085a8b3ba7 feat: Add test coverage to workflow
This commit adds a step to the GitHub Actions workflow to generate and upload a test coverage report. It also renames the `Verifyf` function in the `lthn` package to `Verify` to match the Core repository.
2025-10-30 18:21:38 +00:00
google-labs-jules[bot]
d3f991edc5 fix: Remove Deno workflow
This commit removes the Deno workflow file from the `.github/workflows` directory.
2025-10-30 17:59:39 +00:00
google-labs-jules[bot]
f59b6563ee feat: Update Go version and workflow
This commit updates the Go version to 1.25 in the `go.mod` and `go.work` files. It also updates the GitHub Actions workflow to use the `go.work` file to determine the Go version and adds a step to set up `task`.
2025-10-30 17:47:40 +00:00
google-labs-jules[bot]
8f469a4a31 feat: Add GitHub Actions workflow
This commit adds a GitHub Actions workflow to build and test the Go code on every push and pull request. It also corrects the Go version in the `go.mod` file to `1.22`.
2025-10-30 17:23:29 +00:00
google-labs-jules[bot]
c1434a45ce feat: Port crypt library from Core
This commit ports the crypt library from the Core repository to the Enchantrix repository. It includes the following changes:

- The project is now a Go module.
- The `lthn` and `crypt` packages have been ported from the Core repository.
- The PGP functionality has been commented out pending resolution of dependency issues.
- The old Deno project has been moved to the `vault` directory.
- The README has been updated to reflect the new project structure.
2025-10-30 17:11:31 +00:00
Snider
ff59745c7d updates hash function to lastest. 2022-08-08 02:39:42 +01:00
Snider
b268768c36 Switching machines, ffmpeg + readable byte stream 2022-01-24 07:43:24 +00:00
Snider
243fb46fc3 42 2022-01-23 21:49:14 +00:00
Snider
d149871e9a w.i.p 2022-01-23 21:14:25 +00:00
Snider
b4c343e890 w.i.p 2022-01-23 20:50:38 +00:00
Snider
be4654d645 w.i.p 2022-01-23 20:48:38 +00:00
Snider
a18dc8bf16 w.i.p 2022-01-23 20:44:48 +00:00
Snider
26edbd1675 w.i.p 2022-01-23 20:42:18 +00:00