This file provides guidance to Claude Code (claude.ai/code) when working with the Asherah encryption SDK.
Asherah is an application-layer encryption SDK providing envelope encryption with hierarchical key management, secure memory handling, and defense in depth against compromise. It supports multiple languages with pluggable KMS and metastore backends.
- C#:
cd csharp/<Project> && ./scripts/build.shordotnet build - Go:
cd go/<module> && ./scripts/build.shorgo build ./... - Java:
cd java/<module> && ./scripts/build.shormvn compile - Server:
cd server/<language> && ./scripts/build.sh
- Full test suites:
./scripts/test.sh(in respective language directories) - Integration tests:
./scripts/integration_test.sh(where available) - C# single test:
dotnet test --filter "FullyQualifiedName=Namespace.ClassName.MethodName" - Go single test:
go test -run TestName ./path/to/package - Java single test:
mvn -Dtest=TestClassName#methodName test - Cross-language tests:
cd tests/cross-language && ./scripts/encrypt_all.sh && ./scripts/decrypt_all.sh
- C#:
dotnet formatfor formatting, built-in analyzers - Go: Binary installation via
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.9.0- Alternatively:
brew install golangci-lint(installs latest v2) - Version should match CI configuration (currently v2.9.0)
- Run with:
golangci-lint runin module directory
- Alternatively:
- Java: Checkstyle via Maven (configured in pom.xml)
Common test environment variables:
export AWS_ACCESS_KEY_ID=dummykey
export AWS_SECRET_ACCESS_KEY=dummysecret
export AWS_DEFAULT_REGION=us-west-2
export MYSQL_HOSTNAME=localhost
export DYNAMODB_HOSTNAME=localhost- AppEncryption: Core encryption libraries (C#, Go, Java)
- SecureMemory: Protected memory allocation (C#, Go, Java)
- Server: gRPC service layer (Go, Java)
- Samples: Reference implementations and AWS deployment examples
- Uses TestContainers for integration testing (DynamoDB, MySQL)
- Docker Compose files for local development (
samples/directory) - Cross-language compatibility tests verify encrypt/decrypt operations work across all SDKs
- C#: Microsoft guidelines, 120 char line limit, prefer method overloading over optional args
- Go: Standard idioms, proper error handling with error propagation
- Java: Google's style guide with Checkstyle enforcement
- Envelope encryption with hierarchical key model (System Key → Intermediate Key → Data Encryption Key)
- Protected memory handling for sensitive data (off-heap, secure wiping)
- Session-based encryption with partition isolation
- KMS integration for root key management (AWS KMS, Static keys for testing)
- Pluggable metastore backends (DynamoDB, RDBMS, In-Memory)