Repository navigation
Rewrite crypto/pki service in Go on the crud framework - #4
Merged
Merged
Conversation
Stdlib-first Go rewrite (services/crypto_svc) on the crud service framework, replacing the Python/FastAPI implementation while honoring the same API contract (REST /v1/crypto + /v1/serv, gRPC crypto.v1). - pure-Go crypto engine (crypto/* + hand-rolled CMAC, TR-31 vD, DUKPT, HKDF, PIN ISO-0) with known-answer tests cross-validated against the legacy implementation - HSM seam: internal/hsm.HSM interface + GP (software, LMK-wrapped TR-31 key blocks) implementation; PS/AT plug in via CRYPTO_HSM - PKI: cert create/renew + CRL (TBS -> HSM-sign -> pack, no library signing); TR-34 CMS key export (EnvelopedData + SignedData) - REST dual-auth (JWT or API key), gRPC API-key only, RBAC, health probes - shared framework vendored at services/common (auth, errs, respond, middleware, ...) - docs overhauled to the Go stack; ASC X9 DUKPT attribution retained Python tree retained as behavioral reference until Phase 5 removal (checkpoint: v1.0.0-python).
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrites the crypto/PKI service from the legacy Python/FastAPI implementation to Go, built on the
crudservice framework (services/common). Honors the same API contract — REST (/v1/crypto/*,/v1/serv/*) and gRPC (crypto.v1.CryptoService).What's included
internal/crypto, stdlibcrypto/*only): AES/TDES/CMAC, TR-31 vD key blocks, LMK-wrapped keys, RSA/ECC + DER, ECDH (X9.63 HKDF), ANSI X9.24-3 DUKPT (subpackage), PIN ISO-0, X.509 TBS/CRL, TR-34 CMS (EnvelopedData + SignedData). Known-answer tests cross-validated against the legacy implementation.internal/hsm):HSMinterface +GP(software) implementation. Real HSMs (PS/AT) plug in viaCRYPTO_HSMwith no usecase changes. Keys always LMK-wrapped.Note
The legacy Python tree is retained as the behavioral reference (recoverable via the
v1.0.0-pythontag) and is scheduled for removal in a follow-up.Verification
go vetclean.