#
# Copyright 2025 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

Title = Test RSA KEM

PrivateKey = RSA-2048
-----BEGIN PRIVATE KEY-----

fMkTd7GabVourqIZdgvu1Q==
-----END PRIVATE KEY-----

# Corresponding public key

PublicKey = RSA-2048-PUBLIC
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzQCB6nsq4eoG1Z98c9n/
uUoJYVwuS6fGNs7wjdNTPsMYVSWwFcdpuZp31nJb+cNTKptuX2Yn1fuFFgdo092p
y9NZdFEXF9w9MJ0vxH7kH5fjKtt/ndhkocR2emZuzXG8Gqz151F/SzhZT+qbBeQt
WtqZEgCAE+RTFqTZu47QhriNKHWLrK+SLUaoaLSF0jnJuusOK2RZJxD0Ky0eoKS0
gCwL7Ksyj4posAc721Rv7qmAnShJkSs5DBUyvH4px2WPgXX65G80My/4e8qz5AZJ
uYV3hp2g6nGDU/ByJ1SIaRNkh2DRIr5nbg/Eg90g/8Mb2pajGWbJqi51rQPeR+HE
TwIDAQAB
-----END PUBLIC KEY-----

# We only keep the private key for RSA-512 since it is only used for
# testing the FIPS provider's ability to detect short keys.  If a
# positive test is added, the public key will be required too.
PrivateKey = RSA-512
-----BEGIN PRIVATE KEY-----
MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEA0aGpl/FjkDOqV8yF
Gw7IFXcLLVf0scal6HRJMJhLoB4iN0jq2XeVCDHNsIzTI7WmdYOV7FAdyOjCm74h
AFl+KQIDAQABAkAsWYBQte/zbQrHwmwSmmD4MZQ6xpXtGnK1KAzn7ABr4jHdV+OG
ic1+sY3aKj+C79GWF5WEd+NHnTrV+bSXPrXRAiEA+ahiTkZ9x0m1JmQ5/cJGm8zS
YOBdE0SlJZJrPskfGzUCIQDW9PkYpIddXU+vJoIIaTgoXmjMsETzcjcyjVkdK+LB
pQIgScvIIzMbAsl6znpZ2fSPQoZsuU4YtRVZa524LbrtgvECIQDFkRTdhGLx+hCC
ECeVqXe3CsbR0vUcuA5phSaxvCNHDQIgUaYqag90Gnxe9kST5K1DRRoKpksaIPbG
NDL6WCBbets=
-----END PRIVATE KEY-----

# RSA Encapsulate/Decapsulate
Kem = RSA
KeyName = RSA-2048
Op = RSASVE

# Check default KEM op which was added in 3.5.0 so skip this for earlier versions
FIPSversion = >=3.5.0
Kem = RSA
KeyName = RSA-2048

# RSA Decapsulate
Kem = RSA
KeyName = RSA-2048
Op = RSASVE
Input =  
Output =  

# Test small RSA keys are not allowed for Encapsulation in FIPS mode
FIPSversion = >=3.4.0
Kem = RSA
KeyName = RSA-512
Securitycheck = 1
Op = RSASVE
Result = TEST_ENCAPSULATE_INIT_ERROR

# Test small RSA keys are not allowed for Decapsulation in FIPS mode
FIPSversion = >=3.4.0
Kem = RSA
KeyName = RSA-512
Securitycheck = 1
Op = RSASVE
Input = 431937b777ae3ddda69da20ea602aeb76f87a7e120f24ff2bf7757de4302413fd875eb740d5ea108d0bce1102d9f0ec1613aa433ab33164afeb06b531334e4a0ea0965a4ef1c06ad783ce5799a35a62c1f8926b878be7400bd39a35a144ddccb1161f9b22891afb84bff8c31028fee69eaeca4c73d9d1dc0db371d52f33c950d
Result = TEST_DECAPSULATE_INIT_ERROR

# Test FIPS indicator callback is triggered
FIPSversion = >=3.4.0
Kem = RSA
KeyName = RSA-512
Securitycheck = 1
Unapproved = 1
CtrlInit = key-check:0
Op = RSASVE
