Currently I am facing a situation in which Ed448 key pairs (private + public key) are available and the system should be extended by a Diffie-Hellman (ECDH) operation. First of let me summarize what I have understand so far.
Ed448: Is the digital signature algorithm on edwards448.
X448: Is the Diffie-Hellman function build for Curve448.
Curve448: Is an elliptic curve in Montgomery format as specified in RFC7748.
edwards448: Is an elliptic curve which is related to Curve448 by a map as specified in RFC7748.
For Curve25519 I read the Curve25519 over Ed25519 for key exchange? Why? and for me it sounded like it is possible to transform an existing Ed25519 public key to a X25519 key by applying a defined map. Somehow I am not that familiar with all the math being used here. Then after some more reading I found What does "birational equivalence" mean in a cryptographic context? which provided some more insights to me. Then I read RFC7748 again and saw that birationally equivalence is true for Curve448 too. Additionally there is the "edwards448" definition which provides a map between Montgomery and Edwards curve points too. The map to use is defined as:
$$ (u, v) = (\frac{y^2}{x^2}, \frac{(2 - x^2 - y^2)*y}{x^3}) $$
If I understood the above references correctly one should be able to transform the public key to a coordinate to be used in X448 function. The exception is that in case $x$ from above equation is 0 then the map can not be applied and there is no transformation possible. Additionally the chapter related to Curve448 in Elliptic Curve Cryptographx Ecc leads me to the same direction that it may be possible to transform existing key material and reuse it afterwards for X448. If I understood it correctly the private key in ECC is an integer instead of a "curve point".
Now I am curious if it is really possible to transform an existing key pair such it can be reused for ECDH and how. Or if it is necessary to "introduce" a second key pair for ECDH only. Therefore I kindly ask for some help as I am new to this topic.
"Scalars are assumed to be randomly generated bytes.... Likewise, for X448, set the two least significant bits of the first byte to 0, and the most significant bit of the last byte to 1. This means that the resulting integer is of the form 2^447 plus four times a value between 0 and 2^445 - 1 (inclusive)."
– dbog May 09 '22 at 09:03&= 0xFC
on the first byte and|= 0x80
on the last byte. Since this has already been done to the raw Ed448 private key during steps 1-3 of 5.2.5 of RFC8032 as described in my point 5 above, the hashed-and-altered Ed448 key you use for X448 will not be altered by the X448 clamping, and will be compatible. – knaccc May 09 '22 at 09:24