-
-
Notifications
You must be signed in to change notification settings - Fork 320
Comparing changes
Open a pull request
base repository: burrowers/garble
base: master
head repository: AeonDave/garble
compare: master
- 20 commits
- 77 files changed
- 1 contributor
Commits on Oct 3, 2025
-
- Cache build flag hash input to optimize hashing.
- Implement memory-based caching for package cache to avoid redundant computations. - Add test reflecting standard library behavior, addressing issue #966. - Refactor and organize transformer logic for modularity and better readability. - Update `.gitignore` to exclude IDE-specific files. - Improve error handling and logging in transformer process.
Configuration menu - View commit details
-
Copy full SHA for ef96772 - Browse repository at this point
Copy the full SHA ef96772View commit details -
Configuration menu - View commit details
-
Copy full SHA for cd2e2df - Browse repository at this point
Copy the full SHA cd2e2dfView commit details
Commits on Oct 4, 2025
-
Add build nonce support and improve seed handling
- Introduced `GARBLE_BUILD_NONCE` to enhance reproducibility and randomness. - Combined seed and nonce for more robust obfuscation. - Updated tests and documentation to reflect build nonce support. - Improved error handling during seed and nonce generation.
Configuration menu - View commit details
-
Copy full SHA for ecdcd39 - Browse repository at this point
Copy the full SHA ecdcd39View commit details
Commits on Oct 5, 2025
-
Improve obfuscation strategies: Add ASCON-128 and enhance XOR-based m…
…ethod - Introduced ASCON-128 obfuscation as the primary strategy for better security (NIST-compliant). - Enhanced the simple XOR obfuscator with nonce, position-mixing, and chaining for improved resistance to analysis. - Updated obfuscator probability weights for balanced performance and security. - Added tests for improved XOR and ASCON obfuscation integration. - Included inline ASCON decryption code generation and validation. - Refactored obfuscators for improved modularity and compatibility.
Configuration menu - View commit details
-
Copy full SHA for 4333f12 - Browse repository at this point
Copy the full SHA 4333f12View commit details
Commits on Oct 6, 2025
-
Introduce
-reversibleobfuscation mode and enhance reflection behavior- Added `-reversible` flag for reversible obfuscation with debugging and `garble reverse` support. - Default irreversibility now uses stronger security measures, eliminating name mapping leakage. - Updated XOR-based obfuscation to handle both reversible and irreversible modes. - Improved reflection logic to respect `-reversible` flag and prevent original name leakage in default mode. - Added detailed tests for reversible/irreversible obfuscation and reflection compatibility.
Configuration menu - View commit details
-
Copy full SHA for bd48454 - Browse repository at this point
Copy the full SHA bd48454View commit details -
Add Feistel cipher implementation and tests for encryption and obfusc…
…ation - Introduced a 4-round balanced Feistel cipher with hashing-based round function. - Added support for encryption/decryption of 64-bit values and 32-bit pairs. - Implemented deterministic key derivation from seeds with test coverage. - Included test cases to validate avalanche effect, seed-based differentiation, and deterministic behavior. - Added benchmark tests for performance measurement. - Extended runtime metadata testing to cover obfuscation with Feistel-based strategies. Phase1
Configuration menu - View commit details
-
Copy full SHA for e0ddcb6 - Browse repository at this point
Copy the full SHA e0ddcb6View commit details -
Phase 2: Linker infrastructure for Feistel lazy decryption table
- Add Feistel encryption with table generation in linker patch - Linker creates runtime.feistelDecryptTable symbol with: * 32-byte seed for runtime decryption * Entry count and flags (reversible mode) * Mappings: encrypted offset → original offset - Add feistelSeed() to hash.go for deterministic seed generation - Update linker environment variables (FeistelSeedEnv, ReversibleEnv) - Update main.go to pass Feistel parameters to linker - Uses existing -reversible flag (no new CLI arguments) Architecture: BUILD TIME: Linker encrypts and generates table STARTUP TIME: Runtime init() will decrypt table (next step) HOT PATH: entry() will use map lookup (zero crypto overhead) Status: Linker side complete, runtime side pending Tests: All Feistel unit tests passing (8/8) Next: Create runtime patch for decryption table loading
Configuration menu - View commit details
-
Copy full SHA for 4876fea - Browse repository at this point
Copy the full SHA 4876feaView commit details -
Phase 2: Runtime decryption table implementation
- Create runtime patch system (internal/runtime/) - Add Feistel decryption patch for runtime/symtab.go: * Inject Feistel cipher functions (round, decrypt, derive keys) * Add global lookup maps for O(1) decryption * Inject init() to read linker-generated table * Modify entry() to use map lookup (zero crypto overhead) - Update transformer.go to apply runtime patches in reversible mode - Add runtime patch loader similar to linker patch system - Create integration test (feistel_phase2.txtar) Architecture complete: ✅ BUILD: Linker encrypts + generates table ✅ INIT: Runtime reads table and populates maps ✅ HOT PATH: entry() does simple map[offset] lookup Status: Implementation complete, ready for testing Tests: Feistel unit tests passing (8/8) Next: Run integration test to verify end-to-end functionality
Configuration menu - View commit details
-
Copy full SHA for d2723a0 - Browse repository at this point
Copy the full SHA d2723a0View commit details -
Phase 2: Remove Feistel lazy decryption table patch and related statu…
…s documentation for cleanup and preparation of updated implementation.
Configuration menu - View commit details
-
Copy full SHA for 2e40cd3 - Browse repository at this point
Copy the full SHA 2e40cd3View commit details
Commits on Oct 7, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 339b406 - Browse repository at this point
Copy the full SHA 339b406View commit details -
Feistel encryption implementation:
- Removed legacy runtime lazy decryption table and updated related documentation. - Added 4-round Feistel obfuscation for `entryOff` to enhance runtime metadata encryption. - Updated SECURITY.md to reflect Feistel cipher adoption and status changes. - Fixed runtime patch to inject cryptographic functions with `//go:nosplit` for compatibility with `runtime.Caller`. - Refactored key derivation and encryption helpers for maintainability. - Removed outdated references, ensuring code aligns with Phase 2 architecture.
Configuration menu - View commit details
-
Copy full SHA for fd48406 - Browse repository at this point
Copy the full SHA fd48406View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2e3e17 - Browse repository at this point
Copy the full SHA b2e3e17View commit details -
Implement ASCON-128 for cache encryption and add tampering detection:
- Added `cache_ascon.go` for ASCON-128 authenticated encryption of the build cache. - Introduced `encryptCacheWithASCON` and `decryptCacheWithASCON` functions with seed-based key derivation and domain separation. - Updated `cache_shared.go` and `cache_pkg.go` to use encryption by default when a seed is provided. - Added extensive unit tests for encryption, tampering detection, and key derivation in `cache_encryption_test.go`.
Configuration menu - View commit details
-
Copy full SHA for 2609dc8 - Browse repository at this point
Copy the full SHA 2609dc8View commit details -
Remove MinSize bypass for short literals and enhance chain dependency…
… handling: - Obfuscate all non-empty literals by eliminating the `MinSize` constraint. - Introduce conditional chain logic based on literal length to optimize obfuscation. - Add tests (`TestShortStringObfuscation` and `TestLongStringChainDependency`) to ensure proper handling of short and long literals. - Refactor `obfuscateReversible` and deobfuscation loop for improved readability and logic alignment.
Configuration menu - View commit details
-
Copy full SHA for b4c67cc - Browse repository at this point
Copy the full SHA b4c67ccView commit details -
Introduce control-flow obfuscation modes: off, directives, auto, all
- Added `-controlflow` flag and `GARBLE_CONTROLFLOW` environment variable to manage control-flow obfuscation scope. - Implemented support for `auto` mode, obfuscating all functions with bodies unless explicitly skipped via `//garble:nocontrolflow`. - Added `Mode` type to handle obfuscation levels (`off`, `directives`, `auto`, `all`) and corresponding logic. - Updated transformer and hashing logic to respect control-flow modes. - Extended tests (`mode_test.go` and `ctrlflow_auto.txtar`) to verify mode behavior and function skip directives.
Configuration menu - View commit details
-
Copy full SHA for cac62fc - Browse repository at this point
Copy the full SHA cac62fcView commit details -
Add comprehensive documentation for feature toggles and harden securi…
…ty architecture - Introduced `FEATURE_TOGGLES.md`, providing a detailed reference of CLI flags and environment variables, their defaults, and interactions. - Expanded `SECURITY.md` to include a complete technical overview of Garble's architecture, detailing threat models, encryption mechanisms (Feistel, ASCON-128), and design improvements. - Updated sections on metadata encryption, cache hardening, and runtime obfuscation for improved clarity and completeness.
Configuration menu - View commit details
-
Copy full SHA for ad2896f - Browse repository at this point
Copy the full SHA ad2896fView commit details
Commits on Oct 8, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 9cf122d - Browse repository at this point
Copy the full SHA 9cf122dView commit details -
Configuration menu - View commit details
-
Copy full SHA for be5c22c - Browse repository at this point
Copy the full SHA be5c22cView commit details -
Add extensive technical architecture documentation
- Introduced `ARCHITECTURE.md`, a detailed reference of Garble’s architecture. - Included high-level system diagrams and explicit separation of responsibilities for architecture layers. - Documented obfuscation mechanisms: name hashing, control-flow transformation, and runtime metadata encryption. - Provided in-depth implementation details for caching, cryptographic primitives, and obfuscation modules. - Detailed build and reverse execution flows, improving clarity for maintainers and contributors.
Configuration menu - View commit details
-
Copy full SHA for 13c9a03 - Browse repository at this point
Copy the full SHA 13c9a03View commit details
Commits on Oct 9, 2025
-
Enhance literals obfuscation pipeline to support linker-injected strings
- Introduced `literals.Builder` for better separation of obfuscation logic. - Added support for obfuscating linker-injected strings (`-ldflags -X`), securing them against static extraction. - Rewrote eligible constant strings to variables for enhanced obfuscation while preserving compile-time dependent constants. - Enhanced tests to verify proper obfuscation of linker-injected strings and rewritten constants in various scenarios.
Configuration menu - View commit details
-
Copy full SHA for bc811e6 - Browse repository at this point
Copy the full SHA bc811e6View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...master