Implement transit encryption engine with versioned key management
Add complete transit engine supporting symmetric encryption (AES-256-GCM, XChaCha20-Poly1305), asymmetric signing (Ed25519, ECDSA P-256/P-384), and HMAC (SHA-256/SHA-512) with versioned key rotation, min decryption version enforcement, key trimming, batch operations, and rewrap. Includes proto definitions, gRPC handlers, REST routes, and comprehensive tests covering all 18 operations, auth enforcement, and edge cases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1602
internal/engine/transit/transit.go
Normal file
1602
internal/engine/transit/transit.go
Normal file
File diff suppressed because it is too large
Load Diff
1025
internal/engine/transit/transit_test.go
Normal file
1025
internal/engine/transit/transit_test.go
Normal file
File diff suppressed because it is too large
Load Diff
15
internal/engine/transit/types.go
Normal file
15
internal/engine/transit/types.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package transit
|
||||
|
||||
// TransitConfig is the transit engine configuration stored in the barrier.
|
||||
type TransitConfig struct {
|
||||
MaxKeyVersions int `json:"max_key_versions"`
|
||||
}
|
||||
|
||||
// KeyConfig is per-key configuration stored in the barrier.
|
||||
type KeyConfig struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"` // aes256-gcm, chacha20-poly, ed25519, ecdsa-p256, ecdsa-p384, hmac-sha256, hmac-sha512
|
||||
CurrentVersion int `json:"current_version"`
|
||||
MinDecryptionVersion int `json:"min_decryption_version"`
|
||||
AllowDeletion bool `json:"allow_deletion"`
|
||||
}
|
||||
Reference in New Issue
Block a user