ed448DerivePublicKey function
Derives the public key for privateKey.
Implementation
Uint8List ed448DerivePublicKey(Uint8List privateKey) {
if (privateKey.length != ed448.KEY_LENGTH) {
throw FormatException('Bad private key length');
}
if ((privateKey[ed448.KEY_LENGTH - 1] & 0x80) == 0) {
return _bytes(ed448.secretToPublic(privateKey));
}
final scalar = _secretScalarForHdPrivateKey(privateKey);
return _bytes(ed448.secretToPublicFromScalar(scalar));
}