Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-37586

Add cipher mode option and set default cipher mode for aes_encrypt and aes_decrypt

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.3.0
    • SQL
    • None

    Description

      https://github.com/apache/spark/pull/32801 added aes_encrypt/aes_decrypt functions to spark. However they rely on the jvm's configuration regarding which cipher mode to support, this is problematic as it is not fixed across versions and systems.

      Let's hardcode a default cipher mode and also allow users to set a cipher mode as an argument to the function.

      In the future, we can support other modes like GCM and CBC that have been already supported by other systems:

      1. Snowflake: https://docs.snowflake.com/en/sql-reference/functions/encrypt.html
      2. Bigquery: https://cloud.google.com/bigquery/docs/reference/standard-sql/aead-encryption-concepts#block_cipher_modes

      Attachments

        Issue Links

          Activity

            People

              maxgekk Max Gekk
              maxgekk Max Gekk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: