DanielLeens commented on issue #13377: URL: https://github.com/apache/seatunnel/issues/13377#issuecomment-7078980778
Classification: F / Transform-V2 cryptographic SQL-function contract. Thank you for making the proposed mode, IV, key, envelope, and test-vector rules explicit. Two current-source facts mean this is still design-gated: 1. Current `CryptoFunction` is a Zeta SQL implementation that uses the JDK `Cipher` provider for `AES/CBC/PKCS5Padding` and returns a Base64 `String`; current `ZetaSQLType` also exposes AES functions as `STRING`. A raw `BINARY` SM4 result is therefore a new cross-engine SQL contract, not a direct extension of the existing AES implementation. 2. The proposal provides no maintained runtime provider for SM4. A handwritten block-cipher implementation inside the transform module is not an acceptable substitute for a reviewed provider, even when the algorithm specification is public. Please do not open the implementation PR with the proposed pure-Java cipher. First provide a provider and packaging decision that states the supported JDK/runtime availability, the exact dependency or distribution path, shading and license impact, and how the provider is initialized and exercised in the packaged runtime. The repository has isolated Bouncy Castle use in unrelated artifacts, which is not evidence that it is present for the SQL transform runtime. Then settle one wire contract before coding: either a documented Base64 `STRING` envelope compatible with the existing AES-function style, or a true `BINARY` result with the same observable type and byte layout in every supported SQL engine. For the latter, include the Zeta dispatcher/type path and Calcite's `CalciteUdf` SPI/`byte[]` bridge in the feasibility proof; do not claim engine parity from the Zeta implementation alone. The test plan should use published vectors and engine-level binary-type assertions in addition to the key, IV, malformed-input, and documentation cases already listed. Keep secrets and derived key material out of logs, exceptions, and persisted diagnostics. Once the provider and engine contract have maintainer agreement, a focused implementation proposal can be reviewed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
