diff options
author | T <t@tjp.lol> | 2025-06-26 11:42:17 -0600 |
---|---|---|
committer | T <t@tjp.lol> | 2025-07-01 17:50:49 -0600 |
commit | 639ad6a02cbb4b713434671ec09f309aa5410921 (patch) | |
tree | 7dde9cce8136636d11f2f7c961072984cfc705e7 /compat-test/README.md |
Create authentic_kate: user authentication for go HTTP applications
Diffstat (limited to 'compat-test/README.md')
-rw-r--r-- | compat-test/README.md | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/compat-test/README.md b/compat-test/README.md new file mode 100644 index 0000000..c1e91b8 --- /dev/null +++ b/compat-test/README.md @@ -0,0 +1,44 @@ +# Kate libsodium Compatibility Tests + +This directory contains tests to verify that the `kate` package's `seal` and `open` functions are compatible with the real libsodium implementation. + +## Why? + +The `kate` library is designed to be CGO-free to avoid the complexity and deployment challenges that come with C dependencies. Rather than requiring applications to link against libsodium, `kate` implements a pure Go version of the NaCl secretbox encryption scheme. + +This separate compatibility test project verifies that `kate`'s implementation produces ciphertext that is fully interoperable with libsodium while keeping the CGO dependency isolated from the main package. This way, applications get the benefits of a pure Go library while maintaining confidence in libsodium compatibility. + +## Setup + +The tests require libsodium to be installed on your system. The project uses the `github.com/jamesruan/sodium` Go bindings for libsodium. + +### Installing libsodium + +On macOS: +```bash +brew install libsodium +``` + +On Ubuntu/Debian: +```bash +sudo apt-get install libsodium-dev +``` + +On CentOS/RHEL: +```bash +sudo yum install libsodium-devel +``` + +## Running the Tests + +```bash +cd compat-test +go test +``` + +## Test Cases + +The test suite includes: + +1. **KateEncrypt_LibsodiumDecrypt**: Encrypts data with kate's library and decrypts with libsodium +2. **LibsodiumEncrypt_KateDecrypt**: Encrypts data with libsodium and decrypts with kate's library |