Uploaded image for project: 'Erlang/OTP'
  1. Erlang/OTP
  2. ERL-864

Provide functions for EVP_MD_size(), EVP_CIPHER_key_length(), EVP_CIPHER_iv_length(), EVP_CIPHER_block_size()

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 21.2
    • Fix Version/s: 22.0
    • Component/s: crypto
    • Labels:
      None

      Description

      OpenSSL comes with the functions "EVP_MD_size(), EVP_CIPHER_key_length(), EVP_CIPHER_iv_length(), EVP_CIPHER_block_size()" to provide information about a hash or cipher. Erlang/OTP should have an interface for accessing the same information.

      Currently in RabbitMQ we have to do this to handle various hash and ciphers: https://github.com/rabbitmq/rabbitmq-common/blob/master/src/rabbit_pbe.erl#L111

      Support for such functions vary depending on language: https://github.com/nodejs/node/issues/22304#issuecomment-441754133

      Maybe Erlang/OTP can have crypto:hash_info/1 and crypto:cipher_info/1 that returns a map with various details about the hash/cipher? I can probably provide a PR if you think it's a good idea.

        Attachments

          Activity

            People

            Assignee:
            hans Hans Nilsson
            Reporter:
            essen essen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: