You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/03/01 05:27:22 UTC

[GitHub] [incubator-doris] yangzhg opened a new issue #8276: [Bug] encryption functions with iv may return wrong result

yangzhg opened a new issue #8276:
URL: https://github.com/apache/incubator-doris/issues/8276


   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Version
   
   0.15
   
   ### What's Wrong?
   
   encryption function with iv  may return wrong result
   ```
   MySQL [test]> select to_base64(SM4_ENCRYPT('text','F3229A0B371ED2D9441B830D21A390C3', '0123456789','SM4_128_CBC'));
   +-----------------------------------------------------+
   | to_base64(sm4_encrypt('text', '***', '0123456789')) |
   +-----------------------------------------------------+
   | /Q0/XwXDm8Vy2kpDtSERZQ==                            |
   +-----------------------------------------------------+
   1 row in set (0.004 sec)
   
   MySQL [test]> select to_base64(SM4_ENCRYPT('text','F3229A0B371ED2D9441B830D21A390C3', '0123456789','SM4_128_CBC'));
   +-----------------------------------------------------+
   | to_base64(sm4_encrypt('text', '***', '0123456789')) |
   +-----------------------------------------------------+
   | Yd/afQ1l5WZZ1VFSiWPQVg==                            |
   +-----------------------------------------------------+
   1 row in set (0.004 sec)
   
   MySQL [test]> select to_base64(SM4_ENCRYPT('text','F3229A0B371ED2D9441B830D21A390C3', '0123456789','SM4_128_CBC'));
   +-----------------------------------------------------+
   | to_base64(sm4_encrypt('text', '***', '0123456789')) |
   +-----------------------------------------------------+
   | FgDet0kcwM5jumAsE8vh9g==                            |
   +-----------------------------------------------------+
   1 row in set (0.006 sec)
   ```
   
   ### What You Expected?
   
   result for same text, key, iv the result should be same 
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] yangzhg closed issue #8276: [Bug] encryption functions with iv may return wrong result

Posted by GitBox <gi...@apache.org>.
yangzhg closed issue #8276:
URL: https://github.com/apache/incubator-doris/issues/8276


   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org