#
# Copyright 2001-2026 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License").  You may not use
# this file except in compliance with the License.  You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html

# Tests start with one of these keywords
#       Cipher Decrypt Derive Digest Encoding KDF MAC PBE
#       PrivPubKeyPair Sign Verify VerifyRecover
# and continue until a blank line. Lines starting with a pound sign are ignored.


# ffdhe2048-1 and ffdhe2048-2 were randomly generated and have a shared secret
# less than 256 bytes in length (to test padding) other keys have no special
# properties
PrivateKey=ffdhe2048-1
-----BEGIN PRIVATE KEY-----
MIIBQwIBADCCARsGCSqGSIb3DQEDATCCAQwCggEBAP//////////rfhUWKK7Spqv
3FYgJz088di5xYPOLTaVqeE2QRRkM/vMk53OJJs++X0v42NjDHXY9oGyAq7EYXrT
3x7V1f1lYSQz9R9fBm7QhWNlVT3tGvO1VxNef1fJNZhPDHDg5ot34qaJ2vPv6HId
8VihNq3nNTCsyk9IOnl6vAqxgrMk+2HRCKlLssjj+7lq2rdg1/RoHU9Co945TfSu
Vu3nY3K7GQsHp8juCm1wngL84c334uzANATNKDQvYZFy/pzphYP/jk8SMu7ygYPD
/jsbTG+tczu1/LwuwiAFxY7xg30Wg7LG80omwbLv+ohrQjhhKFyX//////////8C
AQICAgDhBB8CHQGUa5iGUF9rGvDjv9PDFGIvtS9OIqbbi8rqm4b6
-----END PRIVATE KEY-----

PrivateKey=ffdhe2048-2
-----BEGIN PRIVATE KEY-----
MIIBQwIBADCCARsGCSqGSIb3DQEDATCCAQwCggEBAP//////////rfhUWKK7Spqv
3FYgJz088di5xYPOLTaVqeE2QRRkM/vMk53OJJs++X0v42NjDHXY9oGyAq7EYXrT
3x7V1f1lYSQz9R9fBm7QhWNlVT3tGvO1VxNef1fJNZhPDHDg5ot34qaJ2vPv6HId
8VihNq3nNTCsyk9IOnl6vAqxgrMk+2HRCKlLssjj+7lq2rdg1/RoHU9Co945TfSu
Vu3nY3K7GQsHp8juCm1wngL84c334uzANATNKDQvYZFy/pzphYP/jk8SMu7ygYPD
/jsbTG+tczu1/LwuwiAFxY7xg30Wg7LG80omwbLv+ohrQjhhKFyX//////////8C
AQICAgDhBB8CHQEYNZIth+/EaIgKK2gcxFutVjUTWYCaReyTKMvP
-----END PRIVATE KEY-----

PublicKey=ffdhe2048-1-pub
-----BEGIN PUBLIC KEY-----

jW/WDFmPnwAn5A7TEgiNeNu8pwsSKPgZqdW+lyw=
-----END PUBLIC KEY-----

PublicKey=ffdhe2048-2-pub
-----BEGIN PUBLIC KEY-----

TcY3pf9gGZ41xLFxCOdrUbR3QlieI+zl+TttLzM=
-----END PUBLIC KEY-----

PrivPubKeyPair=ffdhe2048-1:ffdhe2048-1-pub

PrivPubKeyPair=ffdhe2048-2:ffdhe2048-2-pub

# The following two testcases check that the padding is implicitly enabled
# with X942KDF-ASN1 KDF.
# The plain shared secret for these keys needs padding as seen above.
Derive=ffdhe2048-1
PeerKey=ffdhe2048-2-pub
Ctrl = kdf-type:X942KDF-ASN1
Ctrl = kdf-outlen:32
Ctrl = kdf-digest:SHA-256
Ctrl = cekalg:AES-128-WRAP
Ctrl = dh_pad:1
SharedSecret=89A249DF4EE9033B89C2B4E52072A736D94F51143A1ED5C8F1E91FCBEBE09654

# FIPS(3.0.0): allows the padding to be set, later versions do not #17859
FIPSversion = >3.0.0
Derive=ffdhe2048-2
PeerKey=ffdhe2048-1-pub
Ctrl = kdf-type:X942KDF-ASN1
Ctrl = kdf-outlen:32
Ctrl = kdf-digest:SHA-256
Ctrl = cekalg:AES-128-WRAP
Ctrl = dh_pad:0
SharedSecret=89A249DF4EE9033B89C2B4E52072A736D94F51143A1ED5C8F1E91FCBEBE09654
