Skip to content

Support Curve25519 keypair generation#39

Open
jcbbc wants to merge 1 commit intomasterfrom
curve25519-support
Open

Support Curve25519 keypair generation#39
jcbbc wants to merge 1 commit intomasterfrom
curve25519-support

Conversation

@jcbbc
Copy link
Contributor

@jcbbc jcbbc commented Feb 5, 2026

Introduce a new type field to select what kind of secret to generate and support new type curve25519_keypair to generate Curve25519 keypair

Introduce a new `type` field to select what kind of secret to generate and support new type `curve25519_keypair` to generate Curve25519 keypair
@jcbbc jcbbc requested a review from a team as a code owner February 5, 2026 14:35
subcategory: ""
description: |-
A cryptographic randomly generated secret stored as bytes in a Vault secret. The resulting Vault secret will have a custom metadata secret_type with the value random_secret and a custom metadata secret_length with the same value as the length attribute.
A cryptographic randomly generated secret stored as bytes in a Vault secret. Secret can be either a random bytes (random_secret) array or a Curve25519 keypair (curve25519_keypair). The resulting Vault secret will have a custom metadata secret_type with the type of the secret and a custom metadata secret_length with the same value as the length attribute.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A cryptographic randomly generated secret stored as bytes in a Vault secret. Secret can be either a random bytes (random_secret) array or a Curve25519 keypair (curve25519_keypair). The resulting Vault secret will have a custom metadata secret_type with the type of the secret and a custom metadata secret_length with the same value as the length attribute.
A cryptographic randomly generated secret stored as bytes in a Vault secret. A secret can be either an array of random bytes (random_secret) or a Curve25519 keypair (curve25519_keypair). The resulting Vault secret will have a custom metadata secret_type with the type of the secret and a custom metadata secret_length with the same value as the length attribute.

# vaultprov_random_secret (Resource)

A cryptographic randomly generated secret stored as bytes in a Vault secret. The resulting Vault secret will have a custom metadata `secret_type` with the value `random_secret` and a custom metadata `secret_length` with the same value as the `length` attribute.
A cryptographic randomly generated secret stored as bytes in a Vault secret. Secret can be either a random bytes (`random_secret`) array or a Curve25519 keypair (`curve25519_keypair`). The resulting Vault secret will have a custom metadata `secret_type` with the type of the secret and a custom metadata `secret_length` with the same value as the `length` attribute.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A cryptographic randomly generated secret stored as bytes in a Vault secret. Secret can be either a random bytes (`random_secret`) array or a Curve25519 keypair (`curve25519_keypair`). The resulting Vault secret will have a custom metadata `secret_type` with the type of the secret and a custom metadata `secret_length` with the same value as the `length` attribute.
A cryptographic randomly generated secret stored as bytes in a Vault secret. A secret can be either an array of random bytes (`random_secret`) or a Curve25519 keypair (`curve25519_keypair`). The resulting Vault secret will have a custom metadata `secret_type` with the type of the secret and a custom metadata `secret_length` with the same value as the `length` attribute.

if err != nil {
return nil, nil, err
}
return privateKey.Bytes(), privateKey.Public().(*ecdh.PublicKey).Bytes(), nil

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return privateKey.Bytes(), privateKey.Public().(*ecdh.PublicKey).Bytes(), nil
return privateKey.Bytes(), privateKey.PublicKey().Bytes(), nil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants