    -- |
    -- Module      : Network.TLS.Extra
    -- License     : BSD-style
    -- Maintainer  : Kazu Yamamoto <kazu@iij.ad.jp>
    -- Stability   : experimental
    -- Portability : unknown
    --
    -- Finite Field Diffie-Hellman Ephemeral Parameters defined in RFC 7919.
    module Network.TLS.Extra.FFDHE where

    import Crypto.PubKey.DH
    import Network.TLS.Crypto.DH (DHParams)

    -- | 2048 bits finite field Diffie-Hellman ephemeral parameters
    --   defined in RFC 7919.
    --   The estimated symmetric-equivalent strength is 103 bits.
    ffdhe2048 :: DHParams
    ffdhe2048 :: DHParams
    ffdhe2048 = Params {
        params_p :: Integer
    params_p = Integer

      , params_g :: Integer
    params_g = Integer
    2
      , params_bits :: Int
    params_bits = Int
    2048
      }

    -- | 3072 bits finite field Diffie-Hellman ephemeral parameters
    --   defined in RFC 7919.
    --   The estimated symmetric-equivalent strength is 125 bits.
    ffdhe3072 :: DHParams
    ffdhe3072 :: DHParams
    ffdhe3072 = Params {
        params_p :: Integer
    params_p = Integer

      , params_g :: Integer
    params_g = Integer
    2
      , params_bits :: Int
    params_bits = Int
    3072
      }

    -- | 4096 bits finite field Diffie-Hellman ephemeral parameters
    --   defined in RFC 7919.
    --   The estimated symmetric-equivalent strength is 150 bits.
    ffdhe4096 :: DHParams
    ffdhe4096 :: DHParams
    ffdhe4096 = Params {
        params_p :: Integer
    params_p = Integer

      , params_g :: Integer
    params_g = Integer
    2
      , params_bits :: Int
    params_bits = Int
    4096
      }

    -- | 6144 bits finite field Diffie-Hellman ephemeral parameters
    --   defined in RFC 7919.
    --   The estimated symmetric-equivalent strength is 175 bits.
    ffdhe6144 :: DHParams
    ffdhe6144 :: DHParams
    ffdhe6144 = Params {
        params_p :: Integer
    params_p = Integer

      , params_g :: Integer
    params_g = Integer
    2
      , params_bits :: Int
    params_bits = Int
    6144
      }

    -- | 8192 bits finite field Diffie-Hellman ephemeral parameters
    --   defined in RFC 7919.
    --   The estimated symmetric-equivalent strength is 192 bits.
    ffdhe8192 :: DHParams
    ffdhe8192 :: DHParams
    ffdhe8192 = Params {
        params_p :: Integer
    params_p = Integer

      , params_g :: Integer
    params_g = Integer
    2
      , params_bits :: Int
    params_bits = Int
    8192
      }