Skip to content

Conversation

@JackDoan
Copy link
Contributor

No description provided.

Copy link

@nbrownus nbrownus left a comment

Choose a reason for hiding this comment

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

@johnmaguire did you have any concerns? I know there was some prior complaints about the PEM banners.

@JackDoan JackDoan changed the title Cert v2 nebula v1.10 compat Dec 10, 2025
keys/crypto.go Outdated
}

// newNebulaX25519KeypairPEM returns a new Nebula keypair (X25519) in PEM format.
// newNebulaX25519KeypairPEM returns a new Nebula key-agreement keypair (ED25519) in PEM format.
Copy link
Member

Choose a reason for hiding this comment

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

suuuuuper nit, but i think it's Ed25519. i don't think the D stands for anything.

what does key-agreement mean in this context exactly? what other types of Nebula keypairs exist?

Copy link
Member

Choose a reason for hiding this comment

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

Actually, I'm doubly confused. The function name is X25519, not Ed25519. why was the comment updated?

Copy link
Member

Choose a reason for hiding this comment

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

I think "key-agreement" is correct, but the parens should've stayed X25519? I think Ed25519 is signing, not key-agreement? I always get this stuff mixed up.

Choose a reason for hiding this comment

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

X25519 - ECDH - diffie helmen aka key agreement
Ed25519 (Edwards curve) - ECDSA (EdDSA) - signing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the public keys we use for CAs are "signing keys", not "key agreement keys". You're technically not allowed to interchange them.

keys/crypto.go Outdated
return nil, nil, err
}
pubkey, privkey = cert.MarshalX25519PublicKey(pubkey), cert.MarshalX25519PrivateKey(privkey)
pubkey, privkey = cert.MarshalPublicKeyToPEM(cert.Curve_CURVE25519, pubkey), cert.MarshalPrivateKeyToPEM(cert.Curve_P256, privkey)
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this should be P256.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep this is wrong, thank you!!!

Copy link
Member

@johnmaguire johnmaguire left a comment

Choose a reason for hiding this comment

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

I think the P256 thing needs fixed.

@JackDoan JackDoan requested a review from johnmaguire December 10, 2025 21:12
@JackDoan JackDoan merged commit 8ae1e67 into main Dec 10, 2025
2 checks passed
@JackDoan JackDoan deleted the cert-v2 branch December 10, 2025 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants