We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Now we use Dart ffi call Go for XEdDSA signature, we should use Dart implement it
Uint8List sha512HashFunc(Uint8List m) { var digest = sha512.convert(m).bytes; digest[0] &= 248; digest[31] &= 127; digest[31] |= 64; return digest; } Uint8List signature(Uint8List privateKey, Uint8List message, Uint8List random) { var pk = Ed25519.publickey(sha512HashFunc, privateKey); // Calculate r var diversifier = Uint8List.fromList([ 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ]); var output = new AccumulatorSink<Digest>(); var input = sha512.startChunkedConversion(output); input.add(diversifier); input.add(privateKey); input.add(message); input.add(random); input.close(); var r = output.events.single.bytes;
The text was updated successfully, but these errors were encountered:
#5
Sorry, something went wrong.
No branches or pull requests
Now we use Dart ffi call Go for XEdDSA signature, we should use Dart implement it
The text was updated successfully, but these errors were encountered: