Can anyone tell me if there is a glaring problem with my conversion technique?
PrivateECKCDSA = First32Bytes(Hash512(PrivateEdDSA))
PublicECKCDSA = Convert_ED25519_to_Curve25519_public_key(PublicKeyEdDSA)
This conversion makes no sense.
- There is no meaningful connection between what you have called
PrivateECKCDSA
and PublicECKCDSA
, so they in no way constitute a key pair.
- If by Curve25519 you mean X25519, the public key conversion also doesn't make sense because ECKCDSA needs a full point, not just an $x$ coordinate.
- Why are you even doing ECKCDSA over Curve25519? Are there any protocols that use this?
- If you have to use ECKCDSA you most likely have to use a curve standardized by KISA, which is unlikely to have any relation to the curve edwards25519.
- If you don't have to use ECKCDSA, why don't you just use Ed25519 signatures?
A note on nomenclature these days: Curve25519 means the Montgomery curve $y^2 = x^3 + 486662 x^2 + x$ over $\mathbb F_{2^{255} - 19}$, while X25519 means the Diffie–Hellman function of $x$-restricted scalar multiplication on Curve25519. Edwards25519 means the twisted Edwards curve $-u^2 + v^2 = 1 - (121665/121666) u^2 v^2$ over $\mathbb F_{2^{255} - 19}$, while Ed25519 means the EdDSA instance with edwards25519, SHA-512, etc.
Can any buffer be considered an ECKCDSA private key? I know that because we are using curves and fields there might be some limitation (I'm really clueless about this).
An ECKCDSA private key is a near-uniform random scalar modulo the order of the curve. For a curve with a 256-bit order, like NIST P-256, you can generally use a uniform random 32-bit string as the private key.
Also can every EdDSA public key be converted into curve25519, or are some excluded?
Can't meaningfully convert an Ed448 key to an X25519 key. But if you restrict your question to converting Ed25519 keys to X25519 keys, then the answer is essentially yes: edwards25519 and Curve25519 are birationally equivalent with a map that extends to a group isomorphism, and to almost every Curve25519 public key there are two corresponding Ed25519 public keys. However, the birational map has a handful of exceptional cases, like $u = 0$, $v = -1$, etc. So be careful!
If no named this conversion I'd like to call it the Yaffe Bender key conversion.
Who seeks eponymy, might learn humility!
Convert_ED25519_to_Curve25519_public_key
without thePrivateECKCDSA
, while the private key is derived using a hash? Is that a cryptographic hash? $\endgroup$