From 639ad6a02cbb4b713434671ec09f309aa5410921 Mon Sep 17 00:00:00 2001 From: T Date: Thu, 26 Jun 2025 11:42:17 -0600 Subject: Create authentic_kate: user authentication for go HTTP applications --- compat-test/README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 compat-test/README.md (limited to 'compat-test/README.md') 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 -- cgit v1.2.3