Generating a curve25519 key and self signed certificate

Hi,

I’m looking to generate an EC key pair using Curve25519 along with a self signed cert that would include the public key portion of the pair.

I found the x.509 examples as well as the gen_key examples. I also have examples from nordic using the PSA module.

The issue I am seeing is that the PSA module returns NOT SUPPORTED when selected a 25519 curve. This is my code snippet:

    status = psa_crypto_init();
    if (status != PSA_SUCCESS) {
        printf("Failed to initialize PSA Crypto\n");
        return -1;
    }

    /* Generate a key */
    psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_SIGN_HASH);
    psa_set_key_algorithm(&attributes,
                          PSA_ALG_DETERMINISTIC_ECDSA(PSA_ALG_SHA_256));
    psa_set_key_type(&attributes,
                     PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_TWISTED_EDWARDS));
    psa_set_key_bits(&attributes, 256);

    PSA_CHECK(psa_generate_key(&attributes, &key_id));

psa_generate_key always returns -134

I could use some help in getting this to work and then using the x.509 module to generate a self signed cert. The examples don’t seem to work in the latest release for Curve25519

Thanks